KickJava   Java API By Example, From Geeks To Geeks.

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


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.naming.api.PName;
27 import org.objectweb.jorm.type.api.PExceptionTyping;
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>PIndexedElem</b> interface defines the representation of an
36  * element of a generic class. It provides a way to access the element value,
37  * as well as its index. It also allows the association of a status for such
38  * elements when the generic class accessor implemented by the MI supports
39  * delta modifications (@see PGenClassAccessor#deltaSupported).
40  * @author R. Basset, P. Dechamboux
41  */

42 public interface PIndexedElem {
43     /**
44      * It specifies that this element is a new one within this generic class
45      * object. This means that is new index has been created.
46      */

47     final static byte ELEM_CREATED = 1;
48
49     /**
50      * It specifies that this element has been deleted from this generic class
51      * object. This means that no more element with this index exists anymore
52      * wiothin this generic class object.
53      */

54     final static byte ELEM_DELETED = 2;
55
56     /**
57      * It specifies that this element as been modified within this generic class
58      * object. This means that only the value of the indexed element has been
59      * modified, and especially not the index.
60      */

61     final static byte ELEM_MODIFIED = 3;
62
63     /**
64      * It specifies that this element existed at load time and that it has not
65      * been modified until then. This means that neither the value of the
66      * indexed element nor its index has been modified.
67      */

68     final static byte ELEM_UNMODIFIED = 4;
69
70     /**
71      * It yields the status of this indexed element. The status value belongs to
72      * the following ones:
73      * <ul>
74      * <li>ELEM_CREATED</li>
75      * <li>ELEM_DELETED</li>
76      * <li>ELEM_MODIFIED</li>
77      * <li>ELEM_UNMODIFIED</li>
78      * </ul>
79      */

80     byte getElemStatus();
81
82     /**
83      * It retrieves the value of a boolean element.
84      * @return The boolean value of the field as stored within the memory
85      * instance.
86      * @exception PExceptionTyping Elements are not of this type.
87      */

88     boolean pieGetBooleanElem() throws PException;
89
90     /**
91      * It retrieves the value of a boolean element.
92      * @return The Boolean value of the field as stored within the memory
93      * instance.
94      * @exception PExceptionTyping Elements are not of this type.
95      */

96     Boolean JavaDoc pieGetObooleanElem() throws PException;
97
98     /**
99      * It retrieves the value of a byte element.
100      * @return The byte value of the field as stored within the memory
101      * instance.
102      * @exception PExceptionTyping Elements are not of this type.
103      */

104     byte pieGetByteElem() throws PException;
105
106     /**
107      * It retrieves the value of a byte element.
108      * @return The Byte value of the field as stored within the memory
109      * instance.
110      * @exception PExceptionTyping Elements are not of this type.
111      */

112     Byte JavaDoc pieGetObyteElem() throws PException;
113
114     /**
115      * It retrieves the value of a byte index field.
116      * @param fn A String containing the name of the index field.
117      * @return The byte value of the field as stored within the memory
118      * instance.
119      * @exception PExceptionTyping There is no field with this name and
120      * this type within this index.
121      */

122     byte pieGetByteIndexField(String JavaDoc fn) throws PException;
123
124     /**
125      * It retrieves the value of a byte index field.
126      * @param fn A String containing the name of the index field.
127      * @return The Byte value of the field as stored within the memory
128      * instance.
129      * @exception PExceptionTyping There is no field with this name and
130      * this type within this index.
131      */

132     Byte JavaDoc pieGetObyteIndexField(String JavaDoc fn) throws PException;
133
134     /**
135      * It retrieves the value of a char element.
136      * @return The char value of the field as stored within the memory
137      * instance.
138      * @exception PExceptionTyping Elements are not of this type.
139      */

140     char pieGetCharElem() throws PException;
141
142     /**
143      * It retrieves the value of a char element.
144      * @return The Character value of the field as stored within the memory
145      * instance.
146      * @exception PExceptionTyping Elements are not of this type.
147      */

148     Character JavaDoc pieGetOcharElem() throws PException;
149
150     /**
151      * It retrieves the value of a char index field.
152      * @param fn A String containing the name of the index field.
153      * @return The char value of the field as stored within the memory
154      * instance.
155      * @exception PExceptionTyping There is no field with this name and
156      * this type within this index.
157      */

158     char pieGetCharIndexField(String JavaDoc fn) throws PException;
159
160     /**
161      * It retrieves the value of a char index field.
162      * @param fn A String containing the name of the index field.
163      * @return The Character value of the field as stored within the memory
164      * instance.
165      * @exception PExceptionTyping There is no field with this name and
166      * this type within this index.
167      */

168     Character JavaDoc pieGetOcharIndexField(String JavaDoc fn) throws PException;
169
170     /**
171      * It retrieves the value of a short element.
172      * @return The short value of the field as stored within the memory
173      * instance.
174      * @exception PExceptionTyping Elements are not of this type.
175      */

176     short pieGetShortElem() throws PException;
177
178     /**
179      * It retrieves the value of a short element.
180      * @return The Short value of the field as stored within the memory
181      * instance.
182      * @exception PExceptionTyping Elements are not of this type.
183      */

184     Short JavaDoc pieGetOshortElem() throws PException;
185
186     /**
187      * It retrieves the value of a short index field.
188      * @param fn A String containing the name of the index field.
189      * @return The short value of the field as stored within the memory
190      * instance.
191      * @exception PExceptionTyping There is no field with this name and
192      * this type within this index.
193      */

194     short pieGetShortIndexField(String JavaDoc fn) throws PException;
195
196     /**
197      * It retrieves the value of a short index field.
198      * @param fn A String containing the name of the index field.
199      * @return The Short value of the field as stored within the memory
200      * instance.
201      * @exception PExceptionTyping There is no field with this name and
202      * this type within this index.
203      */

204     Short JavaDoc pieGetOshortIndexField(String JavaDoc fn) throws PException;
205
206     /**
207      * It retrieves the value of an int element.
208      * @return The int value of the field as stored within the memory
209      * instance.
210      * @exception PExceptionTyping Elements are not of this type.
211      */

212     int pieGetIntElem() throws PException;
213
214     /**
215      * It retrieves the value of an int element.
216      * @return The Integer value of the field as stored within the memory
217      * instance.
218      * @exception PExceptionTyping Elements are not of this type.
219      */

220     Integer JavaDoc pieGetOintElem() throws PException;
221
222     /**
223      * It retrieves the value of an int index field.
224      * @param fn A String containing the name of the index field.
225      * @return The int value of the field as stored within the memory
226      * instance.
227      * @exception PExceptionTyping There is no field with this name and
228      * this type within this index.
229      */

230     int pieGetIntIndexField(String JavaDoc fn) throws PException;
231
232     /**
233      * It retrieves the value of an int index field.
234      * @param fn A String containing the name of the index field.
235      * @return The Integer value of the field as stored within the memory
236      * instance.
237      * @exception PExceptionTyping There is no field with this name and
238      * this type within this index.
239      */

240     Integer JavaDoc pieGetOintIndexField(String JavaDoc fn) throws PException;
241
242     /**
243      * It retrieves the value of a long element.
244      * @return The long value of the field as stored within the memory
245      * instance.
246      * @exception PExceptionTyping Elements are not of this type.
247      */

248     long pieGetLongElem() throws PException;
249
250     /**
251      * It retrieves the value of a long element.
252      * @return The Long value of the field as stored within the memory
253      * instance.
254      * @exception PExceptionTyping Elements are not of this type.
255      */

256     Long JavaDoc pieGetOlongElem() throws PException;
257
258     /**
259      * It retrieves the value of a long index field.
260      * @param fn A String containing the name of the index field.
261      * @return The long value of the field as stored within the memory
262      * instance.
263      * @exception PExceptionTyping There is no field with this name and
264      * this type within this index.
265      */

266     long pieGetLongIndexField(String JavaDoc fn) throws PException;
267
268     /**
269      * It retrieves the value of a long index field.
270      * @param fn A String containing the name of the index field.
271      * @return The Long value of the field as stored within the memory
272      * instance.
273      * @exception PExceptionTyping There is no field with this name and
274      * this type within this index.
275      */

276     Long JavaDoc pieGetOlongIndexField(String JavaDoc fn) throws PException;
277
278     /**
279      * It retrieves the value of a float element.
280      * @return The float value of the field as stored within the memory
281      * instance.
282      * @exception PExceptionTyping Elements are not of this type.
283      */

284     float pieGetFloatElem() throws PException;
285
286     /**
287      * It retrieves the value of a float element.
288      * @return The Float value of the field as stored within the memory
289      * instance.
290      * @exception PExceptionTyping Elements are not of this type.
291      */

292     Float JavaDoc pieGetOfloatElem() throws PException;
293
294     /**
295      * It retrieves the value of a double element.
296      * @return The double value of the field as stored within the memory
297      * instance.
298      * @exception PExceptionTyping Elements are not of this type.
299      */

300     double pieGetDoubleElem() throws PException;
301
302     /**
303      * It retrieves the value of a double element.
304      * @return The Double value of the field as stored within the memory
305      * instance.
306      * @exception PExceptionTyping Elements are not of this type.
307      */

308     Double JavaDoc pieGetOdoubleElem() throws PException;
309
310     /**
311      * It retrieves the value of a string element.
312      * @return The java.lang.String value of the field as stored within the
313      * memory instance.
314      * @exception PExceptionTyping Elements are not of this type.
315      */

316     String JavaDoc pieGetStringElem() throws PException;
317
318     /**
319      * It retrieves the value of a string index field.
320      * @param fn A String containing the name of the index field.
321      * @return The java.lang.String value of the field as stored within the
322      * memory instance.
323      * @exception PExceptionTyping There is no field with this name and
324      * this type within this index.
325      */

326     String JavaDoc pieGetStringIndexField(String JavaDoc fn) throws PException;
327
328     /**
329      * It retrieves the value of a date element.
330      * @return The java.sql.Date value of the field as stored within the
331      * memory instance.
332      * @exception PExceptionTyping Elements are not of this type.
333      */

334     Date JavaDoc pieGetDateElem() throws PException;
335
336     /**
337      * It retrieves the value of a date index field.
338      * @param fn A String containing the name of the index field.
339      * @return The java.util.Date value of the field as stored within the
340      * memory instance.
341      * @exception PExceptionTyping There is no field with this name and
342      * this type within this index.
343      */

344     Date JavaDoc pieGetDateIndexField(String JavaDoc fn) throws PException;
345
346     /**
347      * It retrieves the value of a chararray element.
348      * @return The char[] value of the field as stored within the
349      * memory instance.
350      * @exception PExceptionTyping Elements are not of this type.
351      */

352     char[] pieGetCharArrayElem() throws PException;
353
354     /**
355      * It retrieves the value of a bytearray element.
356      * @return The byte[] value of the field as stored within the
357      * memory instance.
358      * @exception PExceptionTyping Elements are not of this type.
359      */

360     byte[] pieGetByteArrayElem() throws PException;
361
362     /**
363      * It retrieves the value of a serialized element.
364      * @return The java.io.Serializable value of the field as stored within
365      * the memory instance.
366      * @exception PExceptionTyping Elements are not of this type.
367      */

368     Serializable JavaDoc pieGetSerializedElem() throws PException;
369
370     /**
371      * It retrieves the value of a BigInteger element.
372      * @return The java.math.BigInteger value of the field as stored within
373      * the memory instance.
374      * @exception PExceptionTyping Elements are not of this type.
375      */

376     BigInteger JavaDoc pieGetBigIntegerElem() throws PException;
377
378     /**
379      * It retrieves the value of a BigDecimal element.
380      * @return The java.math.BigDecimal value of the field as stored within
381      * the memory instance.
382      * @exception PExceptionTyping Elements are not of this type.
383      */

384     BigDecimal JavaDoc pieGetBigDecimalElem() throws PException;
385
386     /**
387      * It retrieves the value of a reference element.
388      * @return The reference value of the field as stored within the memory
389      * instance.
390      * @exception PExceptionTyping Elements are not of this type.
391      */

392     PName pieGetRefElem() throws PException;
393
394     /**
395      * It assigns the value to a boolean element.
396      * @param value The boolean value to assign.
397      * @exception PExceptionTyping Elements are not of this type.
398      */

399     void pieSetBooleanElem(boolean value) throws PException;
400
401     /**
402      * It assigns the value to a boolean element.
403      * @param value The Boolean value to assign.
404      * @exception PExceptionTyping Elements are not of this type.
405      */

406     void pieSetObooleanElem(Boolean JavaDoc value) throws PException;
407
408     /**
409      * It assigns the value to a byte element.
410      * @param value The byte value to assign.
411      * @exception PExceptionTyping Elements are not of this type.
412      */

413     void pieSetByteElem(byte value) throws PException;
414
415     /**
416      * It assigns the value to a Byte element.
417      * @param value The Byte value to assign.
418      * @exception PExceptionTyping Elements are not of this type.
419      */

420     void pieSetObyteElem(Byte JavaDoc value) throws PException;
421
422     /**
423      * It assigns the value to a byte index field.
424      * @param fn A String containing the name of the field to be set.
425      * @param value The byte value to assign.
426      * @exception PExceptionTyping There is no field with this name and
427      * this type within this index.
428      */

429     void pieSetByteIndexField(String JavaDoc fn, byte value) throws PException;
430
431     /**
432      * It assigns the value to a Byte index field.
433      * @param fn A String containing the name of the field to be set.
434      * @param value The Byte value to assign.
435      * @exception PExceptionTyping There is no field with this name and
436      * this type within this index.
437      */

438     void pieSetObyteIndexField(String JavaDoc fn, Byte JavaDoc value) throws PException;
439
440     /**
441      * It assigns the value to a char element.
442      * @param value The char value to assign.
443      * @exception PExceptionTyping Elements are not of this type.
444      */

445     void pieSetCharElem(char value) throws PException;
446
447     /**
448      * It assigns the value to a Character element.
449      * @param value The Character value to assign.
450      * @exception PExceptionTyping Elements are not of this type.
451      */

452     void pieSetOcharElem(Character JavaDoc value) throws PException;
453
454     /**
455      * It assigns the value to a char index field.
456      * @param fn A String containing the name of the field to be set.
457      * @param value The char value to assign.
458      * @exception PExceptionTyping There is no field with this name and
459      * this type within this index.
460      */

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

470     void pieSetOcharIndexField(String JavaDoc fn, Character JavaDoc value) throws PException;
471
472     /**
473      * It assigns the value to a short element.
474      * @param value The short value to assign.
475      * @exception PExceptionTyping Elements are not of this type.
476      */

477     void pieSetShortElem(short value) throws PException;
478
479     /**
480      * It assigns the value to a Short element.
481      * @param value The Short value to assign.
482      * @exception PExceptionTyping Elements are not of this type.
483      */

484     void pieSetOshortElem(Short JavaDoc value) throws PException;
485
486     /**
487      * It assigns the value to a short index field.
488      * @param fn A String containing the name of the field to be set.
489      * @param value The short value to assign.
490      * @exception PExceptionTyping There is no field with this name and
491      * this type within this index.
492      */

493     void pieSetShortIndexField(String JavaDoc fn, short value) throws PException;
494
495     /**
496      * It assigns the value to a Short index field.
497      * @param fn A String containing the name of the field to be set.
498      * @param value The Short value to assign.
499      * @exception PExceptionTyping There is no field with this name and
500      * this type within this index.
501      */

502     void pieSetOshortIndexField(String JavaDoc fn, Short JavaDoc value) throws PException;
503
504     /**
505      * It assigns the value to an int element.
506      * @param value The int value to assign.
507      * @exception PExceptionTyping Elements are not of this type.
508      */

509     void pieSetIntElem(int value) throws PException;
510
511     /**
512      * It assigns the value to an Integer element.
513      * @param value The Integer value to assign.
514      * @exception PExceptionTyping Elements are not of this type.
515      */

516     void pieSetOintElem(Integer JavaDoc value) throws PException;
517
518     /**
519      * It assigns the value to an int index field.
520      * @param fn A String containing the name of the field to be set.
521      * @param value The int value to assign.
522      * @exception PExceptionTyping There is no field with this name and
523      * this type within this index.
524      */

525     void pieSetIntIndexField(String JavaDoc fn, int value) throws PException;
526
527     /**
528      * It assigns the value to an Integer index field.
529      * @param fn A String containing the name of the field to be set.
530      * @param value The Integer value to assign.
531      * @exception PExceptionTyping There is no field with this name and
532      * this type within this index.
533      */

534     void pieSetOintIndexField(String JavaDoc fn, Integer JavaDoc value) throws PException;
535
536     /**
537      * It assigns the value to a long element.
538      * @param value The long value to assign.
539      * @exception PExceptionTyping Elements are not of this type.
540      */

541     void pieSetLongElem(long value) throws PException;
542
543     /**
544      * It assigns the value to a Long element.
545      * @param value The Long value to assign.
546      * @exception PExceptionTyping Elements are not of this type.
547      */

548     void pieSetOlongElem(Long JavaDoc value) throws PException;
549
550     /**
551      * It assigns the value to a long index field.
552      * @param fn A String containing the name of the field to be set.
553      * @param value The long value to assign.
554      * @exception PExceptionTyping There is no field with this name and
555      * this type within this index.
556      */

557     void pieSetLongIndexField(String JavaDoc fn, long value) throws PException;
558
559     /**
560      * It assigns the value to a Long index field.
561      * @param fn A String containing the name of the field to be set.
562      * @param value The Long value to assign.
563      * @exception PExceptionTyping There is no field with this name and
564      * this type within this index.
565      */

566     void pieSetOlongIndexField(String JavaDoc fn, Long JavaDoc value) throws PException;
567
568     /**
569      * It assigns the value to a float element.
570      * @param value The float value to assign.
571      * @exception PExceptionTyping Elements are not of this type.
572      */

573     void pieSetFloatElem(float value) throws PException;
574
575     /**
576      * It assigns the value to a Float element.
577      * @param value The Float value to assign.
578      * @exception PExceptionTyping Elements are not of this type.
579      */

580     void pieSetOfloatElem(Float JavaDoc value) throws PException;
581
582     /**
583      * It assigns the value to a double element.
584      * @param value The double value to assign.
585      * @exception PExceptionTyping Elements are not of this type.
586      */

587     void pieSetDoubleElem(double value) throws PException;
588
589     /**
590      * It assigns the value to a Double element.
591      * @param value The Double value to assign.
592      * @exception PExceptionTyping Elements are not of this type.
593      */

594     void pieSetOdoubleElem(Double JavaDoc value) throws PException;
595
596     /**
597      * It assigns the value to a string element.
598      * @param value The java.lang.String value to assign.
599      * @exception PExceptionTyping Elements are not of this type.
600      */

601     void pieSetStringElem(String JavaDoc value) throws PException;
602
603     /**
604      * It assigns the value to a string index field.
605      * @param fn A String containing the name of the field to be set.
606      * @param value The java.lang.String value to assign.
607      * @exception PExceptionTyping There is no field with this name and
608      * this type within this index.
609      */

610     void pieSetStringIndexField(String JavaDoc fn, String JavaDoc value) throws PException;
611
612     /**
613      * It assigns the value to a date element.
614      * @param value The java.sql.Date value to assign.
615      * @exception PExceptionTyping Elements are not of this type.
616      */

617     void pieSetDateElem(Date JavaDoc value) throws PException;
618
619     /**
620      * It assigns the value to a date index field.
621      * @param fn A String containing the name of the field to be set.
622      * @param value The java.util.Date value to assign.
623      * @exception PExceptionTyping There is no field with this name and
624      * this type within this index.
625      */

626     void pieSetDateIndexField(String JavaDoc fn, Date JavaDoc value) throws PException;
627
628     /**
629      * It assigns the value to a chararray element.
630      * @param value The char[] value to assign.
631      * @exception PExceptionTyping Elements are not of this type.
632      */

633     void pieSetCharArrayElem(char[] value) throws PException;
634
635     /**
636      * It assigns the value to a bytearray element.
637      * @param value The byte[] value to assign.
638      * @exception PExceptionTyping Elements are not of this type.
639      */

640     void pieSetByteArrayElem(byte[] value) throws PException;
641
642     /**
643      * It assigns the value to a serialized element.
644      * @param value The java.io.Serializable value to assign.
645      * @exception PExceptionTyping Elements are not of this type.
646      */

647     void pieSetSerializedElem(Serializable JavaDoc value) throws PException;
648
649     /**
650      * It assigns the value to a BigInteger element.
651      * @param value The java.math.BigInteger value to assign.
652      * @exception PExceptionTyping Elements are not of this type.
653      */

654     void pieSetBigIntegerElem(BigInteger JavaDoc value) throws PException;
655
656     /**
657      * It assigns the value to a BigDecimal element.
658      * @param value The java.math.BigDecimal value to assign.
659      * @exception PExceptionTyping Elements are not of this type.
660      */

661     void pieSetBigDecimalElem(BigDecimal JavaDoc value) throws PException;
662
663     /**
664      * It assigns the value to a reference element.
665      * @param value The reference value to assign.
666      * @exception PExceptionTyping Elements are not of this type.
667      */

668     void pieSetRefElem(PName value) throws PException;
669 }
670
Popular Tags