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 javax.persistence.CascadeType;
19 import javax.persistence.Column;
20 import javax.persistence.Entity;
21 import javax.persistence.GeneratedValue;
22 import javax.persistence.Id;
23 import javax.persistence.JoinColumn;
24 import javax.persistence.ManyToOne;
25 import javax.persistence.Table;
26
27 import org.kuali.rice.kim.impl.identity.email.EntityEmailBo;
28 import org.kuali.rice.kim.impl.identity.email.EntityEmailTypeBo;
29 import org.kuali.rice.krad.data.jpa.PortableSequenceGenerator;
30
31
32
33
34
35
36
37 @Entity
38 @Table(name = "KRIM_PND_EMAIL_MT")
39 public class PersonDocumentEmail extends PersonDocumentBoDefaultBase {
40 private static final long serialVersionUID = 1L;
41
42 @PortableSequenceGenerator(name = "KRIM_ENTITY_EMAIL_ID_S")
43 @GeneratedValue(generator = "KRIM_ENTITY_EMAIL_ID_S")
44 @Id
45 @Column(name = "ENTITY_EMAIL_ID")
46 protected String entityEmailId;
47
48 @Column(name = "ENT_TYP_CD")
49 protected String entityTypeCode;
50
51 @Column(name = "EMAIL_TYP_CD")
52 protected String emailTypeCode;
53
54 @Column(name = "EMAIL_ADDR")
55 protected String emailAddress;
56
57 @ManyToOne(targetEntity = EntityEmailBo.class, cascade = { CascadeType.REFRESH })
58 @JoinColumn(name = "EMAIL_TYP_CD", referencedColumnName = "ENTITY_EMAIL_ID", insertable = false, updatable = false)
59 protected EntityEmailTypeBo emailType;
60
61 public PersonDocumentEmail() {
62 }
63
64
65
66
67 public String getEmailAddress() {
68 return emailAddress;
69 }
70
71
72
73
74 public String getEmailTypeCode() {
75 return emailTypeCode;
76 }
77
78
79
80
81 public String getEntityEmailId() {
82 return entityEmailId;
83 }
84
85
86
87
88 public void setEmailAddress(String emailAddress) {
89 this.emailAddress = emailAddress;
90 }
91
92
93
94
95 public void setEmailTypeCode(String emailTypeCode) {
96 this.emailTypeCode = emailTypeCode;
97 }
98
99
100
101
102 public String getEntityTypeCode() {
103 return entityTypeCode;
104 }
105
106
107
108
109 public void setEntityTypeCode(String entityTypeCode) {
110 this.entityTypeCode = entityTypeCode;
111 }
112
113 public void setEntityEmailId(String entityEmailId) {
114 this.entityEmailId = entityEmailId;
115 }
116
117 public EntityEmailTypeBo getEmailType() {
118 return this.emailType;
119 }
120
121 public void setEmailType(EntityEmailTypeBo emailType) {
122 this.emailType = emailType;
123 }
124 }