KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > ivata > groupware > business > addressbook > telecomaddress > TelecomAddressDO


1 /*
2  * Copyright (c) 2001 - 2005 ivata limited.
3  * All rights reserved.
4  * -----------------------------------------------------------------------------
5  * ivata groupware may be redistributed under the GNU General Public
6  * License as published by the Free Software Foundation;
7  * version 2 of the License.
8  *
9  * These programs are free software; you can redistribute them and/or
10  * modify them under the terms of the GNU General Public License
11  * as published by the Free Software Foundation; version 2 of the License.
12  *
13  * These programs are distributed in the hope that they will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16  *
17  * See the GNU General Public License in the file LICENSE.txt for more
18  * details.
19  *
20  * If you would like a copy of the GNU General Public License write to
21  *
22  * Free Software Foundation, Inc.
23  * 59 Temple Place - Suite 330
24  * Boston, MA 02111-1307, USA.
25  *
26  *
27  * To arrange commercial support and licensing, contact ivata at
28  * http://www.ivata.com/contact.jsp
29  * -----------------------------------------------------------------------------
30  * $Log: TelecomAddressDO.java,v $
31  * Revision 1.3 2005/04/10 20:09:38 colinmacleod
32  * Added new themes.
33  * Changed id type to String.
34  * Changed i tag to em and b tag to strong.
35  * Improved PicoContainerFactory with NanoContainer scripts.
36  *
37  * Revision 1.2 2005/04/09 17:19:09 colinmacleod
38  * Changed copyright text to GPL v2 explicitly.
39  *
40  * Revision 1.1.1.1 2005/03/10 17:50:21 colinmacleod
41  * Restructured ivata op around Hibernate/PicoContainer.
42  * Renamed ivata groupware.
43  *
44  * Revision 1.1 2004/07/13 19:41:14 colinmacleod
45  * Moved project to POJOs from EJBs.
46  * Applied PicoContainer to services layer (replacing session EJBs).
47  * Applied Hibernate to persistence layer (replacing entity EJBs).
48  *
49  * Revision 1.3 2004/03/21 21:16:08 colinmacleod
50  * Shortened name to ivata op.
51  *
52  * Revision 1.2 2004/02/01 22:00:33 colinmacleod
53  * Added full names to author tags
54  *
55  * Revision 1.1.1.1 2004/01/27 20:57:54 colinmacleod
56  * Moved ivata openportal to SourceForge..
57  *
58  * Revision 1.5 2003/11/03 11:28:24 jano
59  * commiting addressbook,
60  * tryinjg to fix deploying problem
61  *
62  * Revision 1.4 2003/10/17 12:36:12 jano
63  * fixing problems with building
64  * converting intranet -> portal
65  * Eclipse building
66  *
67  * Revision 1.3 2003/10/15 13:48:01 jano
68  * converting to XDoclet
69  *
70  * Revision 1.2 2003/10/15 13:18:02 colin
71  * fixing for XDoclet
72  *
73  * Revision 1.2 2003/02/25 14:38:13 colin
74  * implemented setModified methods on entity beans thro IvataEntityBean superclass
75  *
76  * Revision 1.1 2003/02/24 19:09:21 colin
77  * moved to business
78  *
79  * Revision 1.4 2003/02/04 17:43:45 colin
80  * copyright notice
81  *
82  * Revision 1.3 2002/07/04 12:29:28 jano
83  * i put readonly script to CVS and i will commit all SRC directory
84  *
85  * Revision 1.2 2002/06/17 07:28:55 colin
86  * improved and extended javadoc documentation
87  * -----------------------------------------------------------------------------
88  */

89 package com.ivata.groupware.business.addressbook.telecomaddress;
90
91
92 import com.ivata.groupware.container.persistence.NamedDO;
93
94
95 /**
96  * <p>Represents an email, web site URL, telephone number or fax number. The
97  * actual type of the number depends on the setting of the type fields,
98  * which should be set to one of the constants in {@link TelecomAddressConstants
99  * TelecomAddressConstants}.</p>
100  *
101  * @since 2002-05-14
102  * @author Colin MacLeod
103  * <a HREF='mailto:colin.macleod@ivata.com'>colin.macleod@ivata.com</a>
104  * @version $Revision: 1.3 $
105  *
106  * @hibernate.class
107  * table="telecom_address"
108  * @hibernate.cache
109  * usage="read-write"
110  */

111 public class TelecomAddressDO extends NamedDO {
112     /**
113      * <p>The actual address value. Depending on the value of the type
114      * field, this will be a telephone/fax number, URL or email address.</p>
115      */

116     private String JavaDoc address;
117
118     /**
119      * <p>Get the order in which this address should appear on the screen. Lower
120      * numbers mean that the address will appear higher in any listing.</p>
121      */

122     private int number;
123
124     /**
125      * <p>The type of the address to a numeric value representing on of the
126      * possible telecommunication types.</p>
127      */

128     private int type;
129
130     /**
131     /**
132      * <p>Get the actual address value. Depending on the value of the type
133      * field, this will be a telephone/fax number, URL or email address.</p>
134      *
135      * @return the telephone number, email address or URL string this
136      * telecommunications address represents.
137      *
138      * @hibernate.property
139      */

140     public final String JavaDoc getAddress() {
141         return address;
142     }
143     /**
144      * <p>
145      * Get the 'name' of this telecom address - just returns the address value.
146      * </p>
147      *
148      * @return see {@link #getAdddress}.
149      * @see com.ivata.groupware.container.persistence.NamedDO#getName()
150      */

151     public final String JavaDoc getName() {
152         return getAddress();
153     }
154
155     /**
156      * <p>Get the order in which this address should appear on the screen. Lower
157      * numbers mean that the address will appear higher in any listing.</p>
158      *
159      * @return number used for sorting the address to display. Lower numbers
160      * mean higher significance.
161      *
162      * @hibernate.property
163      */

164     public final int getNumber() {
165         return number;
166     }
167     /**
168      * <p>Get the type of the address to a numeric value representing on of the
169      * possible telecommunication types.</p>
170      *
171      * @return the type of the address, defined in {@link
172      * TelecomAddressConstants TelecomAddressConstants}.
173      *
174      * @hibernate.property
175      * column="address_type"
176      */

177     public final int getType() {
178         return type;
179     }
180
181     /**
182      * <p>Set the actual address value. Depending on the value of the type
183      * field, this will be a telephone/fax number, URL or email address.</p>
184      *
185      * @param address the telephone number, email address or URL string this
186      * telecommunications address represents.
187      */

188     public final void setAddress(final String JavaDoc address) {
189         this.address = address;
190     }
191
192     /**
193      * <p>Set the order in which this address should appear on the screen. Lower
194      * numbers mean that the address will appear higher in any listing.</p>
195      *
196      * @param number number used for sorting the address to display. Lower
197      * numbers mean higher significance.
198      */

199     public final void setNumber(final int number) {
200         this.number = number;
201     }
202
203     /**
204      * <p>Set the type of the address to a numeric value representing on of the
205      * possible telecommunication types.</p>
206      *
207      * @param type the type of the address, defined in {@link
208      * TelecomAddressConstants TelecomAddressConstants}.
209      * @see TelecomAddressConstants
210      */

211     public final void setType(final int type) {
212         this.type = type;
213     }
214 }
215
Popular Tags