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.bo.reference.EntityNameType; |
21 | |
import org.kuali.rice.kim.bo.reference.impl.EntityNameTypeImpl; |
22 | |
|
23 | |
import javax.persistence.*; |
24 | |
|
25 | |
|
26 | |
|
27 | |
|
28 | |
|
29 | |
|
30 | |
|
31 | |
@IdClass(PersonDocumentNameId.class) |
32 | |
@Entity |
33 | |
@Table(name = "KRIM_PND_NM_MT") |
34 | |
public class PersonDocumentName extends PersonDocumentBoDefaultBase { |
35 | |
|
36 | |
@Id |
37 | |
@GeneratedValue(generator="KRIM_ENTITY_NM_ID_S") |
38 | |
@GenericGenerator(name="KRIM_ENTITY_NM_ID_S",strategy="org.kuali.rice.core.jpa.spring.RiceNumericStringSequenceStyleGenerator",parameters={ |
39 | |
@Parameter(name="sequence_name",value="KRIM_ENTITY_NM_ID_S"), |
40 | |
@Parameter(name="value_column",value="id") |
41 | |
}) |
42 | |
@Column(name = "ENTITY_NM_ID") |
43 | |
protected String entityNameId; |
44 | |
|
45 | |
|
46 | |
@Transient |
47 | |
protected String entityId; |
48 | |
|
49 | |
@Column(name = "NM_TYP_CD") |
50 | |
protected String nameTypeCode ; |
51 | |
|
52 | |
@Column(name = "FIRST_NM") |
53 | |
protected String firstName; |
54 | |
|
55 | |
@Column(name = "MIDDLE_NM") |
56 | |
protected String middleName; |
57 | |
|
58 | |
@Column(name = "LAST_NM") |
59 | |
protected String lastName; |
60 | |
|
61 | |
@Column(name = "TITLE_NM") |
62 | |
protected String title; |
63 | |
|
64 | |
@Column(name = "SUFFIX_NM") |
65 | |
protected String suffix; |
66 | |
|
67 | |
@ManyToOne(targetEntity=EntityNameTypeImpl.class, fetch = FetchType.EAGER, cascade = {}) |
68 | |
@JoinColumn(name = "NM_TYP_CD", insertable = false, updatable = false) |
69 | |
protected EntityNameType entityNameType; |
70 | |
|
71 | 0 | public PersonDocumentName() { |
72 | 0 | this.active = true; |
73 | 0 | } |
74 | |
|
75 | |
|
76 | |
|
77 | |
|
78 | |
public String getEntityNameId() { |
79 | 0 | return entityNameId; |
80 | |
} |
81 | |
|
82 | |
|
83 | |
|
84 | |
|
85 | |
public String getFirstName() { |
86 | 0 | return firstName; |
87 | |
} |
88 | |
|
89 | |
|
90 | |
|
91 | |
|
92 | |
public String getLastName() { |
93 | 0 | return lastName; |
94 | |
} |
95 | |
|
96 | |
|
97 | |
|
98 | |
|
99 | |
public String getMiddleName() { |
100 | 0 | return middleName; |
101 | |
} |
102 | |
|
103 | |
|
104 | |
|
105 | |
|
106 | |
public String getNameTypeCode() { |
107 | 0 | return nameTypeCode; |
108 | |
} |
109 | |
|
110 | |
|
111 | |
|
112 | |
|
113 | |
public String getSuffix() { |
114 | 0 | return suffix; |
115 | |
} |
116 | |
|
117 | |
|
118 | |
|
119 | |
|
120 | |
public String getTitle() { |
121 | 0 | return title; |
122 | |
} |
123 | |
|
124 | |
public void setFirstName(String firstName) { |
125 | 0 | this.firstName = firstName; |
126 | 0 | } |
127 | |
|
128 | |
public void setLastName(String lastName) { |
129 | 0 | this.lastName = lastName; |
130 | 0 | } |
131 | |
|
132 | |
public void setMiddleName(String middleName) { |
133 | 0 | this.middleName = middleName; |
134 | 0 | } |
135 | |
|
136 | |
public void setNameTypeCode(String nameTypeCode) { |
137 | 0 | this.nameTypeCode = nameTypeCode; |
138 | 0 | } |
139 | |
|
140 | |
public void setSuffix(String suffix) { |
141 | 0 | this.suffix = suffix; |
142 | 0 | } |
143 | |
|
144 | |
public void setTitle(String title) { |
145 | 0 | this.title = title; |
146 | 0 | } |
147 | |
|
148 | |
|
149 | |
|
150 | |
|
151 | |
|
152 | |
|
153 | |
public String getFormattedName() { |
154 | 0 | return getLastName() + ", " + getFirstName() + " " + getMiddleName(); |
155 | |
} |
156 | |
|
157 | |
public String getEntityId() { |
158 | 0 | return this.entityId; |
159 | |
} |
160 | |
|
161 | |
public void setEntityId(String entityId) { |
162 | 0 | this.entityId = entityId; |
163 | 0 | } |
164 | |
|
165 | |
public EntityNameType getEntityNameType() { |
166 | 0 | return this.entityNameType; |
167 | |
} |
168 | |
|
169 | |
public void setEntityNameType(EntityNameType entityNameType) { |
170 | 0 | this.entityNameType = entityNameType; |
171 | 0 | } |
172 | |
|
173 | |
public void setEntityNameId(String entityNameId) { |
174 | 0 | this.entityNameId = entityNameId; |
175 | 0 | } |
176 | |
} |