KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > ivata > groupware > business > addressbook > address > country > CountryDO


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: CountryDO.java,v $
31  * Revision 1.3 2005/04/10 20:09:34 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:07 colinmacleod
38  * Changed copyright text to GPL v2 explicitly.
39  *
40  * Revision 1.1.1.1 2005/03/10 17:50:22 colinmacleod
41  * Restructured ivata op around Hibernate/PicoContainer.
42  * Renamed ivata groupware.
43  *
44  * Revision 1.5 2004/11/12 15:57:05 colinmacleod
45  * Removed dependencies on SSLEXT.
46  * Moved Persistence classes to ivata masks.
47  *
48  * Revision 1.4 2004/07/13 19:41:13 colinmacleod
49  * Moved project to POJOs from EJBs.
50  * Applied PicoContainer to services layer (replacing session EJBs).
51  * Applied Hibernate to persistence layer (replacing entity EJBs).
52  *
53  * Revision 1.3 2004/03/21 21:16:06 colinmacleod
54  * Shortened name to ivata op.
55  *
56  * Revision 1.2 2004/02/01 22:00:32 colinmacleod
57  * Added full names to author tags
58  *
59  * Revision 1.1.1.1 2004/01/27 20:57:49 colinmacleod
60  * Moved ivata openportal to SourceForge..
61  *
62  * Revision 1.3 2003/10/17 12:36:12 jano
63  * fixing problems with building
64  * converting intranet -> portal
65  * Eclipse building
66  *
67  * Revision 1.2 2003/10/15 13:18:02 colin
68  * fixing for XDoclet
69  *
70  * Revision 1.1 2003/02/24 19:09:20 colin
71  * moved to business
72  *
73  * Revision 1.2 2003/02/04 17:43:44 colin
74  * copyright notice
75  *
76  * Revision 1.1 2002/09/02 08:51:47 colin
77  * first version of CountryDO for use in selects
78  * -----------------------------------------------------------------------------
79  */

80 package com.ivata.groupware.business.addressbook.address.country;
81
82
83 import com.ivata.groupware.container.persistence.BaseDO;
84
85
86 /**
87  * <p>Stores all valid countries in the system. These countries are used in
88  * public holidays, employee records as well as addresses.</p>
89  *
90  * @since 2002-09-01
91  * @author Colin MacLeod
92  * <a HREF='mailto:colin.macleod@ivata.com'>colin.macleod@ivata.com</a>
93  * @version $Revision: 1.3 $
94  *
95  * @hibernate.class
96  * table="address_country"
97  * @hibernate.cache
98  * usage="read-write"
99  */

100 public class CountryDO extends BaseDO {
101
102     /**
103      * <p>Store the two-letter country code here.</p>
104      */

105     private String JavaDoc code;
106
107     /**
108      * <p>Store the name of the country.</p>
109      */

110     private String JavaDoc name;
111
112     /**
113      * <p>Priority of this country in the system. Lower = better.</p>
114      */

115     private int priority;
116
117     /**
118      * <p>Get the country code for this country.</p>
119      *
120      * @return two letter country abbreviation following the standards of
121      * internet TLDs.
122      *
123      * @hibernate.property
124      */

125     public final String JavaDoc getCode() {
126         return code;
127     }
128
129     /**
130      * Just returns the country name.
131      * Refer to {@link #getName}.
132      * @return Refer to {@link #getName}.
133      */

134     public String JavaDoc getDisplayValue() {
135         return getName();
136     }
137
138     /**
139      * <p>Get the name of the country.</p>
140      *
141      * @return US English clear-text country name.
142      *
143      * @hibernate.property
144      */

145     public final String JavaDoc getName() {
146         return name;
147     }
148
149     /**
150      * <p>Priority of this country in the system for lists. Lower = better.</p>
151      *
152      * @return priority of this country in the system. Lower = better.
153      * @hibernate.property
154      */

155     public final int getPriority() {
156         return priority;
157     }
158     /**
159      * <p>Set the country code for this country.</p>
160      *
161      * @param code two letter country abbreviation following the standards of
162      * internet TLDs.
163      */

164     public final void setCode(final String JavaDoc code) {
165         this.code = code;
166     }
167
168     /**
169      * <p>Set the name of the country.</p>
170      *
171      * @param name US English clear-text country name.
172      */

173     public final void setName(final String JavaDoc name) {
174         this.name = name;
175     }
176
177     /**
178      * <p>Priority of this country in the system for lists. Lower = better.</p>
179      * @param i priority of this country in the system. Lower = better.
180      */

181     public final void setPriority(final int i) {
182         priority = i;
183     }
184 }
185
Popular Tags