1 /**
2 * Copyright 2011-2012 The Kuali Foundation Licensed under the
3 * Educational Community License, Version 2.0 (the "License"); you may
4 * not use this file except in compliance with the License. You may
5 * obtain a copy of the License at
6 *
7 * http://www.osedu.org/licenses/ECL-2.0
8 *
9 * Unless required by applicable law or agreed to in writing,
10 * software distributed under the License is distributed on an "AS IS"
11 * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
12 * or implied. See the License for the specific language governing
13 * permissions and limitations under the License.
14 */
15
16 package org.kuali.mobility.library.entity;
17
18 import javax.persistence.Column;
19 import javax.persistence.Entity;
20 import javax.persistence.GeneratedValue;
21 import javax.persistence.GenerationType;
22 import javax.persistence.Id;
23 import javax.persistence.NamedQueries;
24 import javax.persistence.NamedQuery;
25 import javax.persistence.Table;
26 import javax.persistence.Version;
27
28 /**
29 * A class representing the contact details for a library.
30 * Each library can have one instance of a <code>LibraryContactDetail</code>.
31 * @author Kuali Mobility Team (mobility.collab@kuali.org)
32 * @since 2.3.0
33 */
34 @NamedQueries({
35 // Gets the contact details for a library
36 @NamedQuery(
37 name="Library.getContactDetail",
38 query="SELECT a FROM LibraryContactDetail a where a.id = :libraryContactDetailId")
39 })
40 @Entity
41 @Table(name="LIBRARY_CONTACT_DETAIL")
42 public class LibraryContactDetail {
43
44 /** Id of the Library */
45 @Id
46 @GeneratedValue(strategy = GenerationType.TABLE)
47 @Column(name="ID")
48 private long id;
49
50 /**
51 * Telephone nr for the library
52 */
53 @Column(name="TELEPHONE", length=25)
54 private String telephone;
55
56 /**
57 * Fax no
58 */
59 @Column(name="FAX" , length=25)
60 private String fax;
61
62 /**
63 * General desk information
64 */
65 @Column(name="GENERAL_INFO_DESK")
66 private String generalInfoDesk = "";
67
68 /**
69 * Email address for the library
70 */
71 @Column(name="EMAIL" , length=300)
72 private String email;
73
74 /**
75 * Postal address for the library
76 */
77 @Column(name="POSTAL_ADDR")
78 private String postalAddress;
79
80 /**
81 * Physical address for the library
82 */
83 @Column(name="PHYSICAL_ADDR")
84 private String physicalAddress;
85
86 /**
87 * Latitude for the library
88 */
89 @Column(name="LATITUDE" , length=25)
90 private String latitude;
91
92 /**
93 * Longitude for the library
94 */
95 @Column(name="LONGITUDE" , length=25)
96 private String longitude;
97
98 /**
99 * Version
100 */
101 @Version
102 @Column(name="VERSION")
103 private long version;
104
105 /**
106 * Gets the id for this <code>LibraryContactDetail</code>.
107 * @return the id
108 */
109 public long getId() {
110 return id;
111 }
112
113 /**
114 * Sets the id for this <code>LibraryContactDetail</code>.
115 * @param id the id to set
116 */
117 public void setId(long id) {
118 this.id = id;
119 }
120
121 /**
122 * Gets the telephone for this <code>LibraryContactDetail</code>.
123 * @return the telephone
124 */
125 public String getTelephone() {
126 return telephone;
127 }
128
129 /**
130 * Sets the telephone for this <code>LibraryContactDetail</code>.
131 * @param telephone the telephone to set
132 */
133 public void setTelephone(String telephone) {
134 this.telephone = telephone;
135 }
136
137 /**
138 * Gets the fax for this <code>LibraryContactDetail</code>.
139 * @return the fax
140 */
141 public String getFax() {
142 return fax;
143 }
144
145 /**
146 * Sets the fax for this <code>LibraryContactDetail</code>.
147 * @param fax the fax to set
148 */
149 public void setFax(String fax) {
150 this.fax = fax;
151 }
152
153 /**
154 * Gets the generalInfoDesk for this <code>LibraryContactDetail</code>.
155 * @return the generalInfoDesk
156 */
157 public String getGeneralInfoDesk() {
158 return generalInfoDesk;
159 }
160
161 /**
162 * Sets the generalInfoDesk for this <code>LibraryContactDetail</code>.
163 * @param generalInfoDesk the generalInfoDesk to set
164 */
165 public void setGeneralInfoDesk(String generalInfoDesk) {
166 this.generalInfoDesk = generalInfoDesk;
167 }
168
169 /**
170 * Gets the email for this <code>LibraryContactDetail</code>.
171 * @return the email
172 */
173 public String getEmail() {
174 return email;
175 }
176
177 /**
178 * Sets the email for this <code>LibraryContactDetail</code>.
179 * @param email the email to set
180 */
181 public void setEmail(String email) {
182 this.email = email;
183 }
184
185 /**
186 * Gets the postalAddress for this <code>LibraryContactDetail</code>.
187 * @return the postalAddress
188 */
189 public String getPostalAddress() {
190 return postalAddress;
191 }
192
193 /**
194 * Sets the postalAddress for this <code>LibraryContactDetail</code>.
195 * @param postalAddress the postalAddress to set
196 */
197 public void setPostalAddress(String postalAddress) {
198 this.postalAddress = postalAddress;
199 }
200
201 /**
202 * Gets the physicalAddress for this <code>LibraryContactDetail</code>.
203 * @return the physicalAddress
204 */
205 public String getPhysicalAddress() {
206 return physicalAddress;
207 }
208
209 /**
210 * Sets the physicalAddress for this <code>LibraryContactDetail</code>.
211 * @param physicalAddress the physicalAddress to set
212 */
213 public void setPhysicalAddress(String physicalAddress) {
214 this.physicalAddress = physicalAddress;
215 }
216
217 /**
218 * Gets the latitude for this <code>LibraryContactDetail</code>.
219 * @return the latitude
220 */
221 public String getLatitude() {
222 return latitude;
223 }
224
225 /**
226 * Sets the latitude for this <code>LibraryContactDetail</code>.
227 * @param latitude the latitude to set
228 */
229 public void setLatitude(String latitude) {
230 this.latitude = latitude;
231 }
232
233 /**
234 * Gets the longitude for this <code>LibraryContactDetail</code>.
235 * @return the longitude
236 */
237 public String getLongitude() {
238 return longitude;
239 }
240
241 /**
242 * Sets the longitude for this <code>LibraryContactDetail</code>.
243 * @param longitude the longitude to set
244 */
245 public void setLongitude(String longitude) {
246 this.longitude = longitude;
247 }
248
249 /**
250 * Gets the version for this <code>LibraryContactDetail</code>.
251 * @return the version
252 */
253 public long getVersion() {
254 return version;
255 }
256
257 /**
258 * Sets the version for this <code>LibraryContactDetail</code>.
259 * @param version the version to set
260 */
261 public void setVersion(long version) {
262 this.version = version;
263 }
264
265
266 }