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