View Javadoc

1   /*
2    * Copyright 2004 Carlos Sanchez.
3    * 
4    * Licensed under the Apache 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.apache.org/licenses/LICENSE-2.0
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 net.sf.oness.party.model.contact.bo;
17  
18  
19  /***
20   * Phone number
21   * 
22   * @hibernate.subclass discriminator-value="PHONE"
23   * 
24   * @author Carlos Sanchez
25   * @version $Revision: 1.1 $
26   */
27  public class PhoneNumber extends ContactInfo {
28  
29      private String areaCode;
30  
31      private String contactNumber;
32  
33      private String extension;
34  
35      private Country country;
36  
37      /***
38       * @hibernate.many-to-one
39       * 
40       * @return
41       */
42      public Country getCountry() {
43          return country;
44      }
45  
46      public void setCountry(Country country) {
47          this.country = country;
48      }
49  
50      public void setAreaCode(String areaCode) {
51          this.areaCode = areaCode;
52      }
53  
54      /***
55       * @hibernate.property
56       * 
57       * @return
58       */
59      public String getAreaCode() {
60          return areaCode;
61      }
62  
63      public void setContactNumber(String contactNumber) {
64          this.contactNumber = contactNumber;
65      }
66  
67      /***
68       * @hibernate.property
69       * 
70       * @return
71       */
72      public String getContactNumber() {
73          return contactNumber;
74      }
75  
76      public void setExtension(String extension) {
77          this.extension = extension;
78      }
79  
80      /***
81       * @hibernate.property
82       * 
83       * @return
84       */
85      public String getExtension() {
86          return extension;
87      }
88  
89      /***
90       * @see java.lang.Object#clone()
91       */
92      public Object clone() {
93          PhoneNumber o = (PhoneNumber) super.clone();
94          o.setCountry((Country) o.getCountry().clone());
95          return o;
96      }
97  }