View Javadoc

1   /**
2    * Copyright 2005-2012 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 edu.sampleu.travel.approval.dataobject;
17  
18  import org.kuali.rice.krad.bo.PersistableBusinessObjectBase;
19  import java.util.LinkedHashMap;
20  import javax.persistence.Column;
21  import javax.persistence.Entity;
22  import javax.persistence.Id;
23  import javax.persistence.Table;
24  
25  @Entity
26  @Table(name="TRVL_EM_CONT_T")
27  public class TravelerDetailEmergencyContact extends PersistableBusinessObjectBase {
28  
29      private Integer id;
30      private String documentNumber;
31      private Integer financialDocumentLineNumber;
32      private boolean primary;
33      private String contactRelationTypeCode;
34      private String contactName;
35      private String phoneNumber;
36      private String emailAddress;
37      private TravelerDetail traveler;
38      private Integer travelerDetailId;
39  
40      public TravelerDetailEmergencyContact() {
41      }
42  
43      public Integer getTravelerDetailId() {
44          return travelerDetailId;
45      }
46  
47      public void setTravelerDetailId(Integer travelerDetailId) {
48          this.travelerDetailId = travelerDetailId;
49      }
50  
51      public TravelerDetail getTraveler() {
52          return traveler;
53      }
54  
55      public void setTraveler(TravelerDetail traveler) {
56          this.traveler = traveler;
57      }
58  
59      @Id
60      @Column(name="id",nullable=false)
61      public Integer getId() {
62          return id;
63      }
64  
65      public void setId(Integer id) {
66          this.id = id;
67      }
68  
69      /**
70       * Gets the documentNumber attribute.
71       *
72       * @return Returns the documentNumber
73       */
74      @Column(name="FDOC_NBR")
75      public String getDocumentNumber() {
76          return documentNumber;
77      }
78  
79  
80      /**
81       * Sets the documentNumber attribute.
82       *
83       * @param documentNumber The documentNumber to set.
84       */
85      public void setDocumentNumber(String documentNumber) {
86          this.documentNumber = documentNumber;
87      }
88  
89      /**
90       * Gets the financialDocumentLineNumber attribute.
91       *
92       * @return Returns the financialDocumentLineNumber
93       */
94      @Column(name="FDOC_LINE_NBR")
95      public Integer getFinancialDocumentLineNumber() {
96          return financialDocumentLineNumber;
97      }
98  
99      /**
100      * Sets the financialDocumentLineNumber attribute.
101      *
102      * @param financialDocumentLineNumber The financialDocumentLineNumber to set.
103      */
104     public void setFinancialDocumentLineNumber(Integer financialDocumentLineNumber) {
105         this.financialDocumentLineNumber = financialDocumentLineNumber;
106     }
107 
108     @Column(name="cont_rel_typ_cd",length=3,nullable=false)
109     public String getContactRelationTypeCode() {
110         return contactRelationTypeCode;
111     }
112 
113     public void setContactRelationTypeCode(String contactRelationTypeCode) {
114         this.contactRelationTypeCode = contactRelationTypeCode;
115     }
116 
117     @Column(name="cont_nm",length=40,nullable=false)
118     public String getContactName() {
119         return contactName;
120     }
121 
122     public void setContactName(String contactName) {
123         this.contactName = contactName;
124     }
125 
126     /**
127      * Gets the emailAddress attribute.
128      * @return Returns the emailAddress.
129      */
130     @Column(name="email_addr",length=50,nullable=true)
131     public String getEmailAddress() {
132         return emailAddress;
133     }
134 
135     /**
136      * Sets the emailAddress attribute value.
137      * @param emailAddress The emailAddress to set.
138      */
139     public void setEmailAddress(String emailAddress) {
140         this.emailAddress = emailAddress;
141     }
142 
143     /**
144      * Gets the phoneNumber attribute.
145      * @return Returns the phoneNumber.
146      */
147     @Column(name="phone_nbr",length=20,nullable=true)
148     public String getPhoneNumber() {
149         return phoneNumber;
150     }
151 
152     /**
153      * Sets the phoneNumber attribute value.
154      * @param phoneNumber The phoneNumber to set.
155      */
156     public void setPhoneNumber(String phoneNumber) {
157         this.phoneNumber = phoneNumber;
158     }
159 
160     protected LinkedHashMap toStringMapper() {
161         LinkedHashMap map = new LinkedHashMap();
162         map.put("id", id);
163         map.put("contactName", contactName);
164         map.put("contactRelationTypeCode", contactRelationTypeCode);
165 
166         return map;
167     }
168 
169     public boolean isPrimary() {
170         return primary;
171     }
172 
173     public void setPrimary(boolean primary) {
174         this.primary = primary;
175     }
176 
177 }
178