View Javadoc
1   /*
2    * The Kuali Financial System, a comprehensive financial management system for higher education.
3    * 
4    * Copyright 2005-2014 The Kuali Foundation
5    * 
6    * This program is free software: you can redistribute it and/or modify
7    * it under the terms of the GNU Affero General Public License as
8    * published by the Free Software Foundation, either version 3 of the
9    * License, or (at your option) any later version.
10   * 
11   * This program is distributed in the hope that it will be useful,
12   * but WITHOUT ANY WARRANTY; without even the implied warranty of
13   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14   * GNU Affero General Public License for more details.
15   * 
16   * You should have received a copy of the GNU Affero General Public License
17   * along with this program.  If not, see <http://www.gnu.org/licenses/>.
18   */
19  package org.kuali.kfs.module.tem.businessobject;
20  
21  import java.util.LinkedHashMap;
22  
23  import javax.persistence.Column;
24  import javax.persistence.Id;
25  import javax.persistence.JoinColumn;
26  import javax.persistence.ManyToOne;
27  
28  import org.kuali.rice.krad.bo.PersistableBusinessObjectBase;
29  
30  /**
31   * Emergency Contact
32   *
33   */
34  public abstract class EmergencyContact extends PersistableBusinessObjectBase {
35  
36      private Integer id;
37  
38      private boolean primary;
39      private String contactRelationTypeCode;
40      private ContactRelationType contactRelationType;
41      private String contactName;
42      private String phoneNumber;
43      private String emailAddress;
44  
45      @Id
46      @Column(name="id",nullable=false)
47      public Integer getId() {
48          return id;
49      }
50  
51      public void setId(Integer id) {
52          this.id = id;
53      }
54  
55      @Column(name="cont_rel_typ_cd",length=3,nullable=false)
56      public String getContactRelationTypeCode() {
57          return contactRelationTypeCode;
58      }
59  
60      public void setContactRelationTypeCode(String contactRelationTypeCode) {
61          this.contactRelationTypeCode = contactRelationTypeCode;
62      }
63  
64      @ManyToOne
65      @JoinColumn(name="cont_rel_typ_cd")
66      public ContactRelationType getContactRelationType() {
67          return contactRelationType;
68      }
69  
70      public void setContactRelationType(ContactRelationType contactRelationType) {
71          this.contactRelationType = contactRelationType;
72      }
73  
74      @Column(name="cont_nm",length=40,nullable=false)
75      public String getContactName() {
76          return contactName;
77      }
78  
79      public void setContactName(String contactName) {
80          this.contactName = contactName;
81      }
82  
83      /**
84       * Gets the emailAddress attribute.
85       * @return Returns the emailAddress.
86       */
87      @Column(name="email_addr",length=50,nullable=true)
88      public String getEmailAddress() {
89          return emailAddress;
90      }
91  
92      /**
93       * Sets the emailAddress attribute value.
94       * @param emailAddress The emailAddress to set.
95       */
96      public void setEmailAddress(String emailAddress) {
97          this.emailAddress = emailAddress;
98      }
99  
100     /**
101      * Gets the phoneNumber attribute.
102      * @return Returns the phoneNumber.
103      */
104     @Column(name="phone_nbr",length=20,nullable=true)
105     public String getPhoneNumber() {
106         return phoneNumber;
107     }
108 
109     /**
110      * Sets the phoneNumber attribute value.
111      * @param phoneNumber The phoneNumber to set.
112      */
113     public void setPhoneNumber(String phoneNumber) {
114         this.phoneNumber = phoneNumber;
115     }
116 
117     @SuppressWarnings("rawtypes")
118     protected LinkedHashMap toStringMapper_RICE20_REFACTORME() {
119         LinkedHashMap map = new LinkedHashMap();
120         map.put("id", id);
121         map.put("contactName", contactName);
122         map.put("contactRelationTypeCode", contactRelationTypeCode);
123 
124         return map;
125     }
126 
127     public boolean isPrimary() {
128         return primary;
129     }
130 
131     public void setPrimary(boolean primary) {
132         this.primary = primary;
133     }
134 
135 }