01: /**********************************************************************
02: Copyright (c) 2007 Andy Jefferson and others. All rights reserved.
03: Licensed under the Apache License, Version 2.0 (the "License");
04: you may not use this file except in compliance with the License.
05: You may obtain a copy of the License at
06:
07: http://www.apache.org/licenses/LICENSE-2.0
08:
09: Unless required by applicable law or agreed to in writing, software
10: distributed under the License is distributed on an "AS IS" BASIS,
11: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12: See the License for the specific language governing permissions and
13: limitations under the License.
14:
15: Contributors:
16: ...
17: **********************************************************************/package org.jpox.store.fieldmanager;
18:
19: /**
20: * Interface providing methods for consuming field values from a persistable object.
21: * Based on the JDO interface PersistenceCapable.ObjectIdFieldConsumer.
22: *
23: * @version $Revision: 1.1 $
24: */
25: public interface FieldConsumer {
26: /**
27: * Method to store a boolean field value in the object at the specified field position.
28: * @param fieldNumber Number of the field
29: * @param value value to store
30: */
31: void storeBooleanField(int fieldNumber, boolean value);
32:
33: /**
34: * Method to store a byte field value in the object at the specified field position.
35: * @param fieldNumber Number of the field
36: * @param value value to store
37: */
38: void storeByteField(int fieldNumber, byte value);
39:
40: /**
41: * Method to store a char field value in the object at the specified field position.
42: * @param fieldNumber Number of the field
43: * @param value value to store
44: */
45: void storeCharField(int fieldNumber, char value);
46:
47: /**
48: * Method to store a double field value in the object at the specified field position.
49: * @param fieldNumber Number of the field
50: * @param value value to store
51: */
52: void storeDoubleField(int fieldNumber, double value);
53:
54: /**
55: * Method to store a float field value in the object at the specified field position.
56: * @param fieldNumber Number of the field
57: * @param value value to store
58: */
59: void storeFloatField(int fieldNumber, float value);
60:
61: /**
62: * Method to store an int field value in the object at the specified field position.
63: * @param fieldNumber Number of the field
64: * @param value value to store
65: */
66: void storeIntField(int fieldNumber, int value);
67:
68: /**
69: * Method to store a long field value in the object at the specified field position.
70: * @param fieldNumber Number of the field
71: * @param value value to store
72: */
73: void storeLongField(int fieldNumber, long value);
74:
75: /**
76: * Method to store a short field value in the object at the specified field position.
77: * @param fieldNumber Number of the field
78: * @param value value to store
79: */
80: void storeShortField(int fieldNumber, short value);
81:
82: /**
83: * Method to store a string field value in the object at the specified field position.
84: * @param fieldNumber Number of the field
85: * @param value value to store
86: */
87: void storeStringField(int fieldNumber, String value);
88:
89: /**
90: * Method to store an object field value in the object at the specified field position.
91: * @param fieldNumber Number of the field
92: * @param value value to store
93: */
94: void storeObjectField(int fieldNumber, Object value);
95: }
|