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 supplying field values to a persistable object.
21: * Based on the JDO interface PersistenceCapable.ObjectIdFieldSupplier.
22: *
23: * @version $Revision: 1.1 $
24: */
25: public interface FieldSupplier {
26: /**
27: * Fetch a boolean field at the specified field number, returning it.
28: * @param fieldNumber Number of the field
29: * @return The value
30: */
31: boolean fetchBooleanField(int fieldNumber);
32:
33: /**
34: * Fetch a byte field at the specified field number, returning it.
35: * @param fieldNumber Number of the field
36: * @return The value
37: */
38: byte fetchByteField(int fieldNumber);
39:
40: /**
41: * Fetch a char field at the specified field number, returning it.
42: * @param fieldNumber Number of the field
43: * @return The value
44: */
45: char fetchCharField(int fieldNumber);
46:
47: /**
48: * Fetch a double field at the specified field number, returning it.
49: * @param fieldNumber Number of the field
50: * @return The value
51: */
52: double fetchDoubleField(int fieldNumber);
53:
54: /**
55: * Fetch a float field at the specified field number, returning it.
56: * @param fieldNumber Number of the field
57: * @return The value
58: */
59: float fetchFloatField(int fieldNumber);
60:
61: /**
62: * Fetch an int field at the specified field number, returning it.
63: * @param fieldNumber Number of the field
64: * @return The value
65: */
66: int fetchIntField(int fieldNumber);
67:
68: /**
69: * Fetch a long field at the specified field number, returning it.
70: * @param fieldNumber Number of the field
71: * @return The value
72: */
73: long fetchLongField(int fieldNumber);
74:
75: /**
76: * Fetch a short field at the specified field number, returning it.
77: * @param fieldNumber Number of the field
78: * @return The value
79: */
80: short fetchShortField(int fieldNumber);
81:
82: /**
83: * Fetch a string field at the specified field number, returning it.
84: * @param fieldNumber Number of the field
85: * @return The value
86: */
87: String fetchStringField(int fieldNumber);
88:
89: /**
90: * Fetch an object field at the specified field number, returning it.
91: * @param fieldNumber Number of the field
92: * @return The value
93: */
94: Object fetchObjectField(int fieldNumber);
95: }
|