View Javadoc
1   /**
2    * Copyright 2005-2014 The Kuali Foundation
3    *
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    * http://www.opensource.org/licenses/ecl2.php
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
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   * This is a description of what this class does - shyu don't forget to fill this in. 
33   * 
34   * @author Kuali Rice Team (rice.collab@kuali.org)
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  	 * @see org.kuali.rice.kim.api.identity.email.EntityEmailContract#getEmailAddress()
66  	 */
67      public String getEmailAddress() {
68          return emailAddress;
69      }
70  
71      /**
72  	 * @see org.kuali.rice.kim.api.identity.email.EntityEmailContract#getEmailType()
73  	 */
74      public String getEmailTypeCode() {
75          return emailTypeCode;
76      }
77  
78      /**
79  	 * @see org.kuali.rice.kim.api.identity.email.EntityEmailContract#getId()
80  	 */
81      public String getEntityEmailId() {
82          return entityEmailId;
83      }
84  
85      /**
86  	 * @see org.kuali.rice.kim.api.identity.email.EntityEmailContract#setEmailAddress(java.lang.String)
87  	 */
88      public void setEmailAddress(String emailAddress) {
89          this.emailAddress = emailAddress;
90      }
91  
92      /**
93  	 * @see org.kuali.rice.kim.api.identity.email.EntityEmailContract#setEmailType(java.lang.String)
94  	 */
95      public void setEmailTypeCode(String emailTypeCode) {
96          this.emailTypeCode = emailTypeCode;
97      }
98  
99      /**
100 	 * @see org.kuali.rice.kim.bo.entity.KimDefaultableEntityTypeData#getEntityTypeCode()
101 	 */
102     public String getEntityTypeCode() {
103         return entityTypeCode;
104     }
105 
106     /**
107 	 * @see org.kuali.rice.kim.bo.entity.KimDefaultableEntityTypeData#setEntityTypeCode(java.lang.String)
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 }