KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > genimen > djeneric > repository > DjValueObject


1 /*
2  Copyright (c) 2001-2005 by Genimen BV (www.genimen.com) All rights reserved.
3  Redistribution and use in source and binary forms, with or without modification, is permitted
4  provided that the following conditions are met:
5  - Redistributions of source code must retain the above copyright notice, this list of conditions
6  and the following disclaimer.
7  - Redistributions in binary form must reproduce the above copyright notice, this list of
8  conditions and the following disclaimer in the documentation and/or other materials
9  provided with the distribution.
10  - All advertising materials mentioning features or use of this software must display the
11  following acknowledgment: "This product includes Djeneric."
12  - Products derived from this software may not be called "Djeneric" nor may
13  "Djeneric" appear in their names without prior written permission of Genimen BV.
14  - Redistributions of any form whatsoever must retain the following acknowledgment: "This
15  product includes Djeneric."
16  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS IS"
17  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19  ARE DISCLAIMED. IN NO EVENT SHALL GENIMEN BV, DJENERIC.ORG,
20  OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
21  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
22  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
24  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
26  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27  */

28 package com.genimen.djeneric.repository;
29
30 import java.math.BigDecimal JavaDoc;
31
32 import com.genimen.djeneric.repository.exceptions.CanNotDeleteException;
33 import com.genimen.djeneric.repository.exceptions.DjenericException;
34 import com.genimen.djeneric.repository.exceptions.ObjectNotDefinedException;
35 import com.genimen.djeneric.repository.exceptions.PropertyFormatException;
36 import com.genimen.djeneric.repository.exceptions.PropertyRequiredException;
37
38 /**
39  * @author Wido
40  *
41  * To change the template for this generated type comment go to
42  * Window>Preferences>Java>Code Generation>Code and Comments
43  */

44 public interface DjValueObject
45 {
46   /**
47    * Performs the actual reload (requery) from the persistent store
48    *
49    *@exception DjenericException Description of the Exception
50    */

51   public abstract void reload() throws DjenericException;
52
53   /**
54    * Returns the markedForDelete of the DjObject object
55    *
56    *@return The markedForDelete value
57    */

58   public abstract boolean isMarkedForDelete() throws DjenericException;;
59
60   /**
61    * Gets the objectId attribute of the DjObject object
62    *
63    *@return The objectId value
64    *@exception DjenericException Description of the Exception
65    */

66   public abstract long getObjectId() throws DjenericException;
67
68   /**
69    * Gets the detailAssociations attribute of the DjObject object
70    *
71    *@return The detailAssociations value
72    */

73   public abstract DjAssociation[] getDetailAssociations() throws DjenericException;
74
75   /**
76    * Gets the detailAssociationByName attribute of the DjObject object
77    *
78    *@param assocName Description of the Parameter
79    *@return The detailAssociationByName value
80    *@exception ObjectNotDefinedException Description of the Exception
81    */

82   public abstract DjAssociation getDetailAssociationByName(String JavaDoc assocName) throws ObjectNotDefinedException,
83       DjenericException;
84
85   /**
86    * Description of the Method
87    *
88    *@exception PropertyRequiredException Description of the Exception
89    *@exception ObjectNotDefinedException Description of the Exception
90    */

91   public abstract void checkRequiredProperties() throws PropertyRequiredException, ObjectNotDefinedException,
92       DjenericException;
93
94   /**
95    * Description of the Method
96    *
97    *@exception DjenericException Description of the Exception
98    */

99   public abstract void validate() throws DjenericException;
100
101   ///////////////////////////////////////////////////////////////////////////////////////////
102
public abstract void setNull(String JavaDoc propertyName) throws ObjectNotDefinedException, DjenericException;
103
104   /**
105    * Gets the null attribute of the DjObject object
106    *
107    *@param propertyName Description of the Parameter
108    *@return The null value
109    *@exception ObjectNotDefinedException Description of the Exception
110    */

111   public abstract boolean isNull(String JavaDoc propertyName) throws ObjectNotDefinedException, DjenericException;
112
113   /**
114    * Description of the Method
115    *
116    *@param propertyName Description of the Parameter
117    *@return Description of the Return Value
118    *@exception ObjectNotDefinedException Description of the Exception
119    *@exception DjenericException Description of the Exception
120    */

121   public abstract Object JavaDoc get(String JavaDoc propertyName) throws ObjectNotDefinedException, DjenericException;
122
123   /**
124    * Description of the Method
125    *
126    *@param propertyName Description of the Parameter
127    *@param value Description of the Parameter
128    *@exception ObjectNotDefinedException Description of the Exception
129    *@exception PropertyFormatException Description of the Exception
130    *@exception DjenericException Description of the Exception
131    */

132   public abstract void set(String JavaDoc propertyName, Object JavaDoc value) throws ObjectNotDefinedException,
133       PropertyFormatException, DjenericException;
134
135   /**
136    * Sets the string attribute of the DjObject object
137    *
138    *@param propertyName The new string value
139    *@param value The new string value
140    *@exception ObjectNotDefinedException Description of the Exception
141    *@exception PropertyFormatException Description of the Exception
142    */

143   public abstract void setString(String JavaDoc propertyName, String JavaDoc value) throws ObjectNotDefinedException,
144       PropertyFormatException, DjenericException;
145
146   /**
147    * Gets the string attribute of the DjObject object
148    *
149    *@param propertyName Description of the Parameter
150    *@return The string value
151    *@exception ObjectNotDefinedException Description of the Exception
152    */

153   public abstract String JavaDoc getString(String JavaDoc propertyName) throws ObjectNotDefinedException, DjenericException;
154
155   /**
156    * Sets the bytes of the DjObject object
157    *
158    *@param propertyName The new bytes value
159    *@param value The new bytes value
160    *@exception ObjectNotDefinedException Description of the Exception
161    *@exception PropertyFormatException Description of the Exception
162    */

163   public abstract void setBytes(String JavaDoc propertyName, byte[] value) throws ObjectNotDefinedException,
164       PropertyFormatException, DjenericException;
165
166   /**
167    * Sets the bigDecimal attribute of the DjObject object
168    *
169    *@param propertyName The new bigDecimal value
170    *@param value The new bigDecimal value
171    *@exception ObjectNotDefinedException Description of the Exception
172    *@exception PropertyFormatException Description of the Exception
173    */

174   public abstract void setBigDecimal(String JavaDoc propertyName, BigDecimal JavaDoc value) throws ObjectNotDefinedException,
175       PropertyFormatException, DjenericException;
176
177   /**
178    * Gets the bigDecimal attribute of the DjObject object
179    *
180    *@param propertyName Description of the Parameter
181    *@return The bigDecimal value
182    *@exception ObjectNotDefinedException Description of the Exception
183    */

184   public abstract BigDecimal JavaDoc getBigDecimal(String JavaDoc propertyName) throws ObjectNotDefinedException, DjenericException;
185
186   /**
187    * Returns the bytes of the DjObject object
188    *
189    *@param propertyName Description of the Parameter
190    *@return The bytes value
191    *@exception ObjectNotDefinedException Description of the Exception
192    */

193   public abstract byte[] getBytes(String JavaDoc propertyName) throws ObjectNotDefinedException, DjenericException;
194
195   /**
196    * Sets the int attribute of the DjObject object
197    *
198    *@param propertyName The new int value
199    *@param value The new int value
200    *@exception ObjectNotDefinedException Description of the Exception
201    *@exception PropertyFormatException Description of the Exception
202    */

203   public abstract void setInt(String JavaDoc propertyName, int value) throws ObjectNotDefinedException,
204       PropertyFormatException, DjenericException;
205
206   /**
207    * Sets the int attribute of the DjObject object
208    *
209    *@param propertyName The new int value
210    *@param value The new int value
211    *@exception ObjectNotDefinedException Description of the Exception
212    *@exception PropertyFormatException Description of the Exception
213    */

214   public abstract void setInt(String JavaDoc propertyName, Integer JavaDoc value) throws PropertyFormatException,
215       ObjectNotDefinedException, DjenericException;
216
217   /**
218    * Gets the int attribute of the DjObject object
219    *
220    *@param propertyName Description of the Parameter
221    *@return The int value
222    *@exception ObjectNotDefinedException Description of the Exception
223    */

224   public abstract int getInt(String JavaDoc propertyName) throws ObjectNotDefinedException, DjenericException;
225
226   /**
227    * Sets the long attribute of the DjObject object
228    *
229    *@param propertyName The new long value
230    *@param value The new long value
231    *@exception ObjectNotDefinedException Description of the Exception
232    *@exception PropertyFormatException Description of the Exception
233    */

234   public abstract void setLong(String JavaDoc propertyName, long value) throws ObjectNotDefinedException,
235       PropertyFormatException, DjenericException;
236
237   /**
238    * Sets the long attribute of the DjObject object
239    *
240    *@param propertyName The new long value
241    *@param value The new long value
242    *@exception ObjectNotDefinedException Description of the Exception
243    *@exception PropertyFormatException Description of the Exception
244    */

245   public abstract void setLong(String JavaDoc propertyName, Long JavaDoc value) throws PropertyFormatException,
246       ObjectNotDefinedException, DjenericException;
247
248   /**
249    * Gets the long attribute of the DjObject object
250    *
251    *@param propertyName Description of the Parameter
252    *@return The long value
253    *@exception ObjectNotDefinedException Description of the Exception
254    */

255   public abstract long getLong(String JavaDoc propertyName) throws ObjectNotDefinedException, DjenericException;
256
257   /**
258    * Sets the date attribute of the DjObject object
259    *
260    *@param propertyName The new date value
261    *@param dt The new date value
262    *@exception ObjectNotDefinedException Description of the Exception
263    *@exception PropertyFormatException Description of the Exception
264    */

265   public abstract void setDate(String JavaDoc propertyName, java.util.Date JavaDoc dt) throws ObjectNotDefinedException,
266       PropertyFormatException, DjenericException;
267
268   /**
269    * Gets the date attribute of the DjObject object
270    *
271    *@param propertyName Description of the Parameter
272    *@return The date value
273    *@exception ObjectNotDefinedException Description of the Exception
274    */

275   public abstract java.util.Date JavaDoc getDate(String JavaDoc propertyName) throws ObjectNotDefinedException, DjenericException;
276
277   ///////////////////////////////////////////////////////////////////////////////////////////
278

279   public abstract boolean exists();
280
281   public abstract boolean isModified() throws DjenericException;
282
283   /**
284    * Gets the new attribute of the DjObject object
285    *
286    *@return The new value
287    */

288   public abstract boolean isNew() throws DjenericException;
289
290   /**
291    * Returns the persisted of the DjObject object
292    *
293    *@return The persisted value
294    */

295   public abstract boolean isPersisted() throws DjenericException;
296
297   /**
298    * Returns the empty of the DjObject object
299    *
300    *@return The empty value
301    */

302   public abstract boolean isEmpty() throws DjenericException;
303
304   /**
305    * Description of the Method
306    *
307    *@exception CanNotDeleteException Description of the Exception
308    *@exception DjenericException Description of the Exception
309    */

310   public abstract void markForDelete() throws DjenericException, CanNotDeleteException;
311 }
Popular Tags