001 /**
002 * Copyright 2005-2014 The Kuali Foundation
003 *
004 * Licensed under the Educational Community License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 * http://www.opensource.org/licenses/ecl2.php
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016 package edu.sampleu.travel.approval.dataobject;
017
018 import org.kuali.rice.krad.bo.PersistableBusinessObjectBase;
019 import java.util.LinkedHashMap;
020 import javax.persistence.Column;
021 import javax.persistence.Entity;
022 import javax.persistence.Id;
023 import javax.persistence.Table;
024
025 @Entity
026 @Table(name="TRVL_EM_CONT_T")
027 public class TravelerDetailEmergencyContact extends PersistableBusinessObjectBase {
028
029 private Integer id;
030 private String documentNumber;
031 private Integer financialDocumentLineNumber;
032 private boolean primary;
033 private String contactRelationTypeCode;
034 private String contactName;
035 private String phoneNumber;
036 private String emailAddress;
037 private TravelerDetail traveler;
038 private Integer travelerDetailId;
039
040 public TravelerDetailEmergencyContact() {
041 }
042
043 public Integer getTravelerDetailId() {
044 return travelerDetailId;
045 }
046
047 public void setTravelerDetailId(Integer travelerDetailId) {
048 this.travelerDetailId = travelerDetailId;
049 }
050
051 public TravelerDetail getTraveler() {
052 return traveler;
053 }
054
055 public void setTraveler(TravelerDetail traveler) {
056 this.traveler = traveler;
057 }
058
059 @Id
060 @Column(name="id",nullable=false)
061 public Integer getId() {
062 return id;
063 }
064
065 public void setId(Integer id) {
066 this.id = id;
067 }
068
069 /**
070 * Gets the documentNumber attribute.
071 *
072 * @return Returns the documentNumber
073 */
074 @Column(name="FDOC_NBR")
075 public String getDocumentNumber() {
076 return documentNumber;
077 }
078
079
080 /**
081 * Sets the documentNumber attribute.
082 *
083 * @param documentNumber The documentNumber to set.
084 */
085 public void setDocumentNumber(String documentNumber) {
086 this.documentNumber = documentNumber;
087 }
088
089 /**
090 * Gets the financialDocumentLineNumber attribute.
091 *
092 * @return Returns the financialDocumentLineNumber
093 */
094 @Column(name="FDOC_LINE_NBR")
095 public Integer getFinancialDocumentLineNumber() {
096 return financialDocumentLineNumber;
097 }
098
099 /**
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