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 | 0 | public PersonDocumentName() { |
90 | 0 | this.active = true; |
91 | 0 | } |
92 | |
|
93 | |
|
94 | |
|
95 | |
|
96 | |
public String getEntityNameId() { |
97 | 0 | return entityNameId; |
98 | |
} |
99 | |
|
100 | |
|
101 | |
|
102 | |
|
103 | |
public String getFirstName() { |
104 | 0 | return firstName; |
105 | |
} |
106 | |
|
107 | |
|
108 | |
|
109 | |
|
110 | |
public String getLastName() { |
111 | 0 | return lastName; |
112 | |
} |
113 | |
|
114 | |
|
115 | |
|
116 | |
|
117 | |
public String getMiddleName() { |
118 | 0 | return middleName; |
119 | |
} |
120 | |
|
121 | |
|
122 | |
|
123 | |
|
124 | |
public String getNameCode() { |
125 | 0 | return nameCode; |
126 | |
} |
127 | |
|
128 | |
|
129 | |
|
130 | |
|
131 | |
public String getNameSuffix() { |
132 | 0 | return nameSuffix; |
133 | |
} |
134 | |
|
135 | |
|
136 | |
|
137 | |
|
138 | |
public String getNamePrefix() { |
139 | 0 | return namePrefix; |
140 | |
} |
141 | |
|
142 | |
public String getNameTitle() { |
143 | 0 | return nameTitle; |
144 | |
} |
145 | |
|
146 | |
public String getNoteMessage() { |
147 | 0 | return noteMessage; |
148 | |
} |
149 | |
|
150 | |
public Timestamp getNameChangedDate() { |
151 | 0 | return nameChangedDate; |
152 | |
} |
153 | |
|
154 | |
public void setFirstName(String firstName) { |
155 | 0 | this.firstName = firstName; |
156 | 0 | } |
157 | |
|
158 | |
public void setLastName(String lastName) { |
159 | 0 | this.lastName = lastName; |
160 | 0 | } |
161 | |
|
162 | |
public void setMiddleName(String middleName) { |
163 | 0 | this.middleName = middleName; |
164 | 0 | } |
165 | |
|
166 | |
public void setNameCode(String nameCode) { |
167 | 0 | this.nameCode = nameCode; |
168 | 0 | } |
169 | |
|
170 | |
public void setNameSuffix(String nameSuffix) { |
171 | 0 | this.nameSuffix = nameSuffix; |
172 | 0 | } |
173 | |
|
174 | |
public void setNamePrefix(String namePrefix) { |
175 | 0 | this.namePrefix = namePrefix; |
176 | 0 | } |
177 | |
|
178 | |
public void setNameTitle(String nameTitle) { |
179 | 0 | this.nameTitle = nameTitle; |
180 | 0 | } |
181 | |
|
182 | |
public void setNoteMessage(String noteMessage) { |
183 | 0 | this.noteMessage = noteMessage; |
184 | 0 | } |
185 | |
|
186 | |
public void setNameChangedDate(Timestamp timestamp) { |
187 | 0 | this.nameChangedDate = timestamp; |
188 | 0 | } |
189 | |
|
190 | |
|
191 | |
|
192 | |
|
193 | |
|
194 | |
|
195 | |
public String getCompositeName() { |
196 | 0 | return getLastName() + ", " + getFirstName() + " " + getMiddleName(); |
197 | |
} |
198 | |
|
199 | |
public String getEntityId() { |
200 | 0 | return this.entityId; |
201 | |
} |
202 | |
|
203 | |
public void setEntityId(String entityId) { |
204 | 0 | this.entityId = entityId; |
205 | 0 | } |
206 | |
|
207 | |
public EntityNameTypeBo getEntityNameType() { |
208 | 0 | return this.entityNameType; |
209 | |
} |
210 | |
|
211 | |
public void setEntityNameType(EntityNameTypeBo entityNameType) { |
212 | 0 | this.entityNameType = entityNameType; |
213 | 0 | } |
214 | |
|
215 | |
public void setEntityNameId(String entityNameId) { |
216 | 0 | this.entityNameId = entityNameId; |
217 | 0 | } |
218 | |
} |