KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > jorm > api > PAccessorGen


1 /**
2  * JORM: an implementation of a generic mapping system for persistent Java
3  * objects. Two mapping are supported: to RDBMS and to binary files.
4  * Copyright (C) 2001-2003 France Telecom R&D - INRIA
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19  *
20  * Contact: jorm-team@objectweb.org
21  *
22  */

23
24 package org.objectweb.jorm.api;
25
26 import org.objectweb.jorm.type.api.PExceptionTyping;
27 import org.objectweb.jorm.naming.api.PName;
28
29 import java.io.Serializable JavaDoc;
30 import java.util.Date JavaDoc;
31 import java.math.BigDecimal JavaDoc;
32 import java.math.BigInteger JavaDoc;
33
34 /**
35  * The <b>PAccessorGen</b> interface defines a generic accessor to be used by
36  * persistent bindings to access persistent variable within memory instances.
37  * This interface is implemented for each JORM class in order to define
38  * specific accessors associated to such a memory instance.
39  * @author R. Basset, P. Dechamboux
40  */

41 public interface PAccessorGen extends PAccessor {
42     /**
43      * It retrieves the value of a boolean field.
44      * @param fn A String containing the name of the field.
45      * @return The boolean value of the field as stored within the memory
46      * instance.
47      * @exception PExceptionTyping There is no field with this name and
48      * this type within this JORM class.
49      */

50     boolean paGetBooleanField(String JavaDoc fn) throws PException;
51
52     /**
53      * It retrieves the value of a Boolean field.
54      * @param fn A String containing the name of the field.
55      * @return The Boolean value of the field as stored within the memory
56      * instance.
57      * @exception PExceptionTyping There is no field with this name and
58      * this type within this JORM class.
59      */

60     Boolean JavaDoc paGetObooleanField(String JavaDoc fn) throws PException;
61
62     /**
63      * It retrieves the value of a byte field.
64      * @param fn A String containing the name of the field.
65      * @return The byte value of the field as stored within the memory
66      * instance.
67      * @exception PExceptionTyping There is no field with this name and
68      * this type within this JORM class.
69      */

70     byte paGetByteField(String JavaDoc fn) throws PException;
71
72     /**
73      * It retrieves the value of a Byte field.
74      * @param fn A String containing the name of the field.
75      * @return The Byte value of the field as stored within the memory
76      * instance.
77      * @exception PExceptionTyping There is no field with this name and
78      * this type within this JORM class.
79      */

80     Byte JavaDoc paGetObyteField(String JavaDoc fn) throws PException;
81
82     /**
83      * It retrieves the value of a char field.
84      * @param fn A String containing the name of the field.
85      * @return The char value of the field as stored within the memory
86      * instance.
87      * @exception PExceptionTyping There is no field with this name and
88      * this type within this JORM class.
89      */

90     char paGetCharField(String JavaDoc fn) throws PException;
91
92     /**
93      * It retrieves the value of a Character field.
94      * @param fn A String containing the name of the field.
95      * @return The Character value of the field as stored within the memory
96      * instance.
97      * @exception PExceptionTyping There is no field with this name and
98      * this type within this JORM class.
99      */

100     Character JavaDoc paGetOcharField(String JavaDoc fn) throws PException;
101
102     /**
103      * It retrieves the value of a short field.
104      * @param fn A String containing the name of the field.
105      * @return The short value of the field as stored within the memory
106      * instance.
107      * @exception PExceptionTyping There is no field with this name and
108      * this type within this JORM class.
109      */

110     short paGetShortField(String JavaDoc fn) throws PException;
111
112     /**
113      * It retrieves the value of a Short field.
114      * @param fn A String containing the name of the field.
115      * @return The Short value of the field as stored within the memory
116      * instance.
117      * @exception PExceptionTyping There is no field with this name and
118      * this type within this JORM class.
119      */

120     Short JavaDoc paGetOshortField(String JavaDoc fn) throws PException;
121
122     /**
123      * It retrieves the value of an int field.
124      * @param fn A String containing the name of the field.
125      * @return The int value of the field as stored within the memory
126      * instance.
127      * @exception PExceptionTyping There is no field with this name and
128      * this type within this JORM class.
129      */

130     int paGetIntField(String JavaDoc fn) throws PException;
131
132     /**
133      * It retrieves the value of an Integer field.
134      * @param fn A String containing the name of the field.
135      * @return The Integer value of the field as stored within the memory
136      * instance.
137      * @exception PExceptionTyping There is no field with this name and
138      * this type within this JORM class.
139      */

140     Integer JavaDoc paGetOintField(String JavaDoc fn) throws PException;
141
142     /**
143      * It retrieves the value of a long field.
144      * @param fn A String containing the name of the field.
145      * @return The long value of the field as stored within the memory
146      * instance.
147      * @exception PExceptionTyping There is no field with this name and
148      * this type within this JORM class.
149      */

150     long paGetLongField(String JavaDoc fn) throws PException;
151
152     /**
153      * It retrieves the value of a Long field.
154      * @param fn A String containing the name of the field.
155      * @return The Long value of the field as stored within the memory
156      * instance.
157      * @exception PExceptionTyping There is no field with this name and
158      * this type within this JORM class.
159      */

160     Long JavaDoc paGetOlongField(String JavaDoc fn) throws PException;
161
162     /**
163      * It retrieves the value of a float field.
164      * @param fn A String containing the name of the field.
165      * @return The float value of the field as stored within the memory
166      * instance.
167      * @exception PExceptionTyping There is no field with this name and
168      * this type within this JORM class.
169      */

170     float paGetFloatField(String JavaDoc fn) throws PException;
171
172     /**
173      * It retrieves the value of a Float field.
174      * @param fn A String containing the name of the field.
175      * @return The Float value of the field as stored within the memory
176      * instance.
177      * @exception PExceptionTyping There is no field with this name and
178      * this type within this JORM class.
179      */

180     Float JavaDoc paGetOfloatField(String JavaDoc fn) throws PException;
181
182     /**
183      * It retrieves the value of a double field.
184      * @param fn A String containing the name of the field.
185      * @return The double value of the field as stored within the memory
186      * instance.
187      * @exception PExceptionTyping There is no field with this name and
188      * this type within this JORM class.
189      */

190     double paGetDoubleField(String JavaDoc fn) throws PException;
191
192     /**
193      * It retrieves the value of a Double field.
194      * @param fn A String containing the name of the field.
195      * @return The Double value of the field as stored within the memory
196      * instance.
197      * @exception PExceptionTyping There is no field with this name and
198      * this type within this JORM class.
199      */

200     Double JavaDoc paGetOdoubleField(String JavaDoc fn) throws PException;
201
202     /**
203      * It retrieves the value of a string field.
204      * @param fn A String containing the name of the field.
205      * @return The java.lang.String value of the field as stored within the
206      * memory instance.
207      * @exception PExceptionTyping There is no field with this name and
208      * this type within this JORM class.
209      */

210     String JavaDoc paGetStringField(String JavaDoc fn) throws PException;
211
212     /**
213      * It retrieves the value of a date field.
214      * @param fn A String containing the name of the field.
215      * @return The java.sql.Date value of the field as stored within the
216      * memory instance.
217      * @exception PExceptionTyping There is no field with this name and
218      * this type within this JORM class.
219      */

220     Date JavaDoc paGetDateField(String JavaDoc fn) throws PException;
221
222     /**
223      * It retrieves the value of a serialized field.
224      * @param fn A String containing the name of the field.
225      * @return The java.io.Serializable value of the field as stored within
226      * the memory instance.
227      * @exception PExceptionTyping There is no field with this name and
228      * this type within this JORM class.
229      */

230     Serializable JavaDoc paGetSerializedField(String JavaDoc fn) throws PException;
231
232     /**
233      * It retrieves the value of a byte[] field.
234      * @param fn A String containing the name of the field.
235      * @return The byte[] value of the field as stored within
236      * the memory instance.
237      * @exception PExceptionTyping There is no field with this name and
238      * this type within this JORM class.
239      */

240     byte[] paGetByteArrayField(String JavaDoc fn) throws PException;
241
242     /**
243      * It retrieves the value of a char[] field.
244      * @param fn A String containing the name of the field.
245      * @return The char[] value of the field as stored within
246      * the memory instance.
247      * @exception PExceptionTyping There is no field with this name and
248      * this type within this JORM class.
249      */

250     char[] paGetCharArrayField(String JavaDoc fn) throws PException;
251
252     /**
253      * It retrieves the value of a BigInteger field.
254      * @param fn A String containing the name of the field.
255      * @return The java.math.BigDInteger value of the field as stored within
256      * the memory instance.
257      * @exception PExceptionTyping There is no field with this name and
258      * this type within this JORM class.
259      */

260     BigInteger JavaDoc paGetBigIntegerField(String JavaDoc fn) throws PException;
261
262     /**
263      * It retrieves the value of a BigDecimal field.
264      * @param fn A String containing the name of the field.
265      * @return The java.math.BigDecimal value of the field as stored within
266      * the memory instance.
267      * @exception PExceptionTyping There is no field with this name and
268      * this type within this JORM class.
269      */

270     BigDecimal JavaDoc paGetBigDecimalField(String JavaDoc fn) throws PException;
271
272     /**
273      * It retrieves the value of a reference field.
274      * @param fn A String containing the name of the field.
275      * @param connection The connection to access to support. This connection
276      * can be used to resolve a pname for example.
277      * @return The name associated with the reference value of the field.
278      * @exception PExceptionTyping There is no field with this name and
279      * this type within this JORM class.
280      */

281     PName paGetRefField(String JavaDoc fn, Object JavaDoc connection) throws PException;
282
283     /**
284      * It assigns the value to a boolean field.
285      * @param fn A String containing the name of the field to be set.
286      * @param value The boolean value to assign.
287      * @exception PExceptionTyping There is no field with this name and
288      * this type within this JORM class.
289      */

290     void paSetBooleanField(String JavaDoc fn, boolean value) throws PException;
291
292     /**
293      * It assigns the value to a Boolean field.
294      * @param fn A String containing the name of the field to be set.
295      * @param value The Boolean value to assign.
296      * @exception PExceptionTyping There is no field with this name and
297      * this type within this JORM class.
298      */

299     void paSetObooleanField(String JavaDoc fn, Boolean JavaDoc value) throws PException;
300
301     /**
302      * It assigns the value to a byte field.
303      * @param fn A String containing the name of the field to be set.
304      * @param value The byte value to assign.
305      * @exception PExceptionTyping There is no field with this name and
306      * this type within this JORM class.
307      */

308     void paSetByteField(String JavaDoc fn, byte value) throws PException;
309
310     /**
311      * It assigns the value to a Byte field.
312      * @param fn A String containing the name of the field to be set.
313      * @param value The Byte value to assign.
314      * @exception PExceptionTyping There is no field with this name and
315      * this type within this JORM class.
316      */

317     void paSetObyteField(String JavaDoc fn, Byte JavaDoc value) throws PException;
318
319     /**
320      * It assigns the value to a char field.
321      * @param fn A String containing the name of the field to be set.
322      * @param value The char value to assign.
323      * @exception PExceptionTyping There is no field with this name and
324      * this type within this JORM class.
325      */

326     void paSetCharField(String JavaDoc fn, char value) throws PException;
327
328     /**
329      * It assigns the value to a Character field.
330      * @param fn A String containing the name of the field to be set.
331      * @param value The Character value to assign.
332      * @exception PExceptionTyping There is no field with this name and
333      * this type within this JORM class.
334      */

335     void paSetOcharField(String JavaDoc fn, Character JavaDoc value) throws PException;
336
337     /**
338      * It assigns the value to a short field.
339      * @param fn A String containing the name of the field to be set.
340      * @param value The short value to assign.
341      * @exception PExceptionTyping There is no field with this name and
342      * this type within this JORM class.
343      */

344     void paSetShortField(String JavaDoc fn, short value) throws PException;
345
346     /**
347      * It assigns the value to a Short field.
348      * @param fn A String containing the name of the field to be set.
349      * @param value The Short value to assign.
350      * @exception PExceptionTyping There is no field with this name and
351      * this type within this JORM class.
352      */

353     void paSetOshortField(String JavaDoc fn, Short JavaDoc value) throws PException;
354
355     /**
356      * It assigns the value to an int field.
357      * @param fn A String containing the name of the field to be set.
358      * @param value The int value to assign.
359      * @exception PExceptionTyping There is no field with this name and
360      * this type within this JORM class.
361      */

362     void paSetIntField(String JavaDoc fn, int value) throws PException;
363
364     /**
365      * It assigns the value to an Integer field.
366      * @param fn A String containing the name of the field to be set.
367      * @param value The Integer value to assign.
368      * @exception PExceptionTyping There is no field with this name and
369      * this type within this JORM class.
370      */

371     void paSetOintField(String JavaDoc fn, Integer JavaDoc value) throws PException;
372
373     /**
374      * It assigns the value to a long field.
375      * @param fn A String containing the name of the field to be set.
376      * @param value The long value to assign.
377      * @exception PExceptionTyping There is no field with this name and
378      * this type within this JORM class.
379      */

380     void paSetLongField(String JavaDoc fn, long value) throws PException;
381
382     /**
383      * It assigns the value to a Long field.
384      * @param fn A String containing the name of the field to be set.
385      * @param value The Long value to assign.
386      * @exception PExceptionTyping There is no field with this name and
387      * this type within this JORM class.
388      */

389     void paSetOlongField(String JavaDoc fn, Long JavaDoc value) throws PException;
390
391     /**
392      * It assigns the value to a float field.
393      * @param fn A String containing the name of the field to be set.
394      * @param value The float value to assign.
395      * @exception PExceptionTyping There is no field with this name and
396      * this type within this JORM class.
397      */

398     void paSetFloatField(String JavaDoc fn, float value) throws PException;
399
400     /**
401      * It assigns the value to a Float field.
402      * @param fn A String containing the name of the field to be set.
403      * @param value The Float value to assign.
404      * @exception PExceptionTyping There is no field with this name and
405      * this type within this JORM class.
406      */

407     void paSetOfloatField(String JavaDoc fn, Float JavaDoc value) throws PException;
408
409     /**
410      * It assigns the value to a double field.
411      * @param fn A String containing the name of the field to be set.
412      * @param value The double value to assign.
413      * @exception PExceptionTyping There is no field with this name and
414      * this type within this JORM class.
415      */

416     void paSetDoubleField(String JavaDoc fn, double value) throws PException;
417
418     /**
419      * It assigns the value to a Double field.
420      * @param fn A String containing the name of the field to be set.
421      * @param value The Double value to assign.
422      * @exception PExceptionTyping There is no field with this name and
423      * this type within this JORM class.
424      */

425     void paSetOdoubleField(String JavaDoc fn, Double JavaDoc value) throws PException;
426
427     /**
428      * It assigns the value to a string field.
429      * @param fn A String containing the name of the field to be set.
430      * @param value The java.lang.String value to assign.
431      * @exception PExceptionTyping There is no field with this name and
432      * this type within this JORM class.
433      */

434     void paSetStringField(String JavaDoc fn, String JavaDoc value) throws PException;
435
436     /**
437      * It assigns the value to a date field.
438      * @param fn A String containing the name of the field to be set.
439      * @param value The java.sql.Date value to assign.
440      * @exception PExceptionTyping There is no field with this name and
441      * this type within this JORM class.
442      */

443     void paSetDateField(String JavaDoc fn, Date JavaDoc value) throws PException;
444
445     /**
446      * It assigns the value to a serialized field.
447      * @param fn A String containing the name of the field to be set.
448      * @param value The java.io.Serializable value to assign.
449      * @exception PExceptionTyping There is no field with this name and
450      * this type within this JORM class.
451      */

452     void paSetSerializedField(String JavaDoc fn, Serializable JavaDoc value)
453             throws PException;
454
455     /**
456      * It assigns the value to a byte[] field.
457      * @param fn A String containing the name of the field to be set.
458      * @param value The byte[] value to assign.
459      * @exception PExceptionTyping There is no field with this name and
460      * this type within this JORM class.
461      */

462     void paSetByteArrayField(String JavaDoc fn, byte[] value) throws PException;
463
464     /**
465      * It assigns the value to a char[] field.
466      * @param fn A String containing the name of the field to be set.
467      * @param value The char[] value to assign.
468      * @exception PExceptionTyping There is no field with this name and
469      * this type within this JORM class.
470      */

471     void paSetCharArrayField(String JavaDoc fn, char[] value) throws PException;
472
473     /**
474      * It assigns the value to a BigInteger field.
475      * @param fn A String containing the name of the field to be set.
476      * @param value The java.math.BigInteger value to assign.
477      * @exception PExceptionTyping There is no field with this name and
478      * this type within this JORM class.
479      */

480     void paSetBigIntegerField(String JavaDoc fn, BigInteger JavaDoc value)
481             throws PException;
482
483     /**
484      * It assigns the value to a BigDecimal field.
485      * @param fn A String containing the name of the field to be set.
486      * @param value The java.math.BigDecimal value to assign.
487      * @exception PExceptionTyping There is no field with this name and
488      * this type within this JORM class.
489      */

490     void paSetBigDecimalField(String JavaDoc fn, BigDecimal JavaDoc value)
491             throws PException;
492
493     /**
494      * It assigns the value to a reference field.
495      * @param fn A String containing the name of the field to be set.
496      * @param value The name associated with the reference value to assign.
497      * @param connection The connection to access to support. This connection
498      * can be used to resolve a pname for example.
499      * @exception PExceptionTyping There is no field with this name and
500      * this type within this JORM class.
501      */

502     void paSetRefField(String JavaDoc fn, PName value, Object JavaDoc connection)
503             throws PException;
504 }
505
Popular Tags