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.util.LinkedHashMap;
19
20 import javax.persistence.Column;
21 import javax.persistence.Entity;
22 import javax.persistence.FetchType;
23 import javax.persistence.Id;
24 import javax.persistence.JoinColumn;
25 import javax.persistence.ManyToOne;
26 import javax.persistence.Table;
27
28 import org.kuali.rice.kim.bo.reference.EmailType;
29 import org.kuali.rice.kim.bo.reference.impl.EmailTypeImpl;
30
31
32
33
34
35
36
37 @Entity
38 @Table(name = "KRIM_PND_EMAIL_MT")
39 public class PersonDocumentEmail extends PersonDocumentBoDefaultBase{
40 @Id
41 @Column(name = "ENTITY_EMAIL_ID")
42 protected String entityEmailId;
43
44 @Column(name = "ENT_TYP_CD")
45 protected String entityTypeCode;
46
47 @Column(name = "EMAIL_TYP_CD")
48 protected String emailTypeCode;
49
50 @Column(name = "EMAIL_ADDR")
51 protected String emailAddress;
52
53 @ManyToOne(targetEntity=EmailTypeImpl.class, fetch = FetchType.EAGER, cascade = {})
54 @JoinColumn(name = "EMAIL_TYP_CD", insertable = false, updatable = false)
55 protected EmailType emailType;
56
57 public PersonDocumentEmail() {
58 this.active = true;
59 }
60
61
62
63
64 public String getEmailAddress() {
65 return emailAddress;
66 }
67
68
69
70
71 public String getEmailTypeCode() {
72 return emailTypeCode;
73 }
74
75
76
77
78 public String getEntityEmailId() {
79 return entityEmailId;
80 }
81
82
83
84
85 public void setEmailAddress(String emailAddress) {
86 this.emailAddress = emailAddress;
87 }
88
89
90
91
92 public void setEmailTypeCode(String emailTypeCode) {
93 this.emailTypeCode = emailTypeCode;
94 }
95
96
97
98
99 public String getEntityTypeCode() {
100 return entityTypeCode;
101 }
102
103
104
105
106 public void setEntityTypeCode(String entityTypeCode) {
107 this.entityTypeCode = entityTypeCode;
108 }
109
110
111
112
113 @Override
114 protected LinkedHashMap toStringMapper() {
115 LinkedHashMap m = super.toStringMapper();
116 m.put("entityEmailId", entityEmailId);
117 m.put("entityTypeCode", entityTypeCode);
118 m.put("emailTypeCode", emailTypeCode);
119 return m;
120 }
121
122 public void setEntityEmailId(String entityEmailId) {
123 this.entityEmailId = entityEmailId;
124 }
125
126 public EmailType getEmailType() {
127 return this.emailType;
128 }
129
130 public void setEmailType(EmailType emailType) {
131 this.emailType = emailType;
132 }
133
134 @Override
135 public boolean isActive(){
136 return this.active;
137 }
138
139 }