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