1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.kim.bo.ui;
17
18 import org.hibernate.annotations.GenericGenerator;
19 import org.hibernate.annotations.Parameter;
20 import org.kuali.rice.kim.impl.identity.name.EntityNameTypeBo;
21
22 import javax.persistence.Column;
23 import javax.persistence.Entity;
24 import javax.persistence.FetchType;
25 import javax.persistence.GeneratedValue;
26 import javax.persistence.Id;
27 import javax.persistence.IdClass;
28 import javax.persistence.JoinColumn;
29 import javax.persistence.ManyToOne;
30 import javax.persistence.Table;
31 import javax.persistence.Transient;
32 import java.sql.Timestamp;
33
34
35
36
37
38
39
40 @IdClass(PersonDocumentNameId.class)
41 @Entity
42 @Table(name = "KRIM_PND_NM_MT")
43 public class PersonDocumentName extends PersonDocumentBoDefaultBase {
44
45 @Id
46 @GeneratedValue(generator="KRIM_ENTITY_NM_ID_S")
47 @GenericGenerator(name="KRIM_ENTITY_NM_ID_S",strategy="org.kuali.rice.core.jpa.spring.RiceNumericStringSequenceStyleGenerator",parameters={
48 @Parameter(name="sequence_name",value="KRIM_ENTITY_NM_ID_S"),
49 @Parameter(name="value_column",value="id")
50 })
51 @Column(name = "ENTITY_NM_ID")
52 protected String entityNameId;
53
54
55 @Transient
56 protected String entityId;
57
58 @Column(name = "NM_TYP_CD")
59 protected String nameCode;
60
61 @Column(name = "FIRST_NM")
62 protected String firstName;
63
64 @Column(name = "MIDDLE_NM")
65 protected String middleName;
66
67 @Column(name = "LAST_NM")
68 protected String lastName;
69
70 @Column(name = "PREFIX_NM")
71 protected String namePrefix;
72
73 @Column(name = "TITLE_NM")
74 protected String nameTitle;
75
76 @Column(name = "SUFFIX_NM")
77 protected String nameSuffix;
78
79 @Column(name = "NOTE_MSG")
80 protected String noteMessage;
81
82 @Column(name = "NM_CHNG_DT")
83 protected Timestamp nameChangedDate;
84
85 @ManyToOne(targetEntity=EntityNameTypeBo.class, fetch = FetchType.EAGER, cascade = {})
86 @JoinColumn(name = "NM_TYP_CD", insertable = false, updatable = false)
87 protected EntityNameTypeBo entityNameType;
88
89 public PersonDocumentName() {
90 this.active = true;
91 }
92
93
94
95
96 public String getEntityNameId() {
97 return entityNameId;
98 }
99
100
101
102
103 public String getFirstName() {
104 return firstName;
105 }
106
107
108
109
110 public String getLastName() {
111 return lastName;
112 }
113
114
115
116
117 public String getMiddleName() {
118 return middleName;
119 }
120
121
122
123
124 public String getNameCode() {
125 return nameCode;
126 }
127
128
129
130
131 public String getNameSuffix() {
132 return nameSuffix;
133 }
134
135
136
137
138 public String getNamePrefix() {
139 return namePrefix;
140 }
141
142 public String getNameTitle() {
143 return nameTitle;
144 }
145
146 public String getNoteMessage() {
147 return noteMessage;
148 }
149
150 public Timestamp getNameChangedDate() {
151 return nameChangedDate;
152 }
153
154 public void setFirstName(String firstName) {
155 this.firstName = firstName;
156 }
157
158 public void setLastName(String lastName) {
159 this.lastName = lastName;
160 }
161
162 public void setMiddleName(String middleName) {
163 this.middleName = middleName;
164 }
165
166 public void setNameCode(String nameCode) {
167 this.nameCode = nameCode;
168 }
169
170 public void setNameSuffix(String nameSuffix) {
171 this.nameSuffix = nameSuffix;
172 }
173
174 public void setNamePrefix(String namePrefix) {
175 this.namePrefix = namePrefix;
176 }
177
178 public void setNameTitle(String nameTitle) {
179 this.nameTitle = nameTitle;
180 }
181
182 public void setNoteMessage(String noteMessage) {
183 this.noteMessage = noteMessage;
184 }
185
186 public void setNameChangedDate(Timestamp timestamp) {
187 this.nameChangedDate = timestamp;
188 }
189
190
191
192
193
194
195 public String getCompositeName() {
196 return getLastName() + ", " + getFirstName() + " " + getMiddleName();
197 }
198
199 public String getEntityId() {
200 return this.entityId;
201 }
202
203 public void setEntityId(String entityId) {
204 this.entityId = entityId;
205 }
206
207 public EntityNameTypeBo getEntityNameType() {
208 return this.entityNameType;
209 }
210
211 public void setEntityNameType(EntityNameTypeBo entityNameType) {
212 this.entityNameType = entityNameType;
213 }
214
215 public void setEntityNameId(String entityNameId) {
216 this.entityNameId = entityNameId;
217 }
218 }