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;
18:
19: /**
20: * Representation of a FetchGroup for a class.
21: * Has a symbolic name for the group, and the class and the fields of the class that are part of the group.
22: *
23: * @version $Revision: 1.4 $
24: */
25: public interface FetchGroup {
26: /**
27: * Accessor for the group name.
28: * @return Name of the group
29: */
30: String getName();
31:
32: /**
33: * Accessor for the class for this fetch group.
34: * @return Name of the class for this group
35: */
36: String getClassName();
37:
38: /**
39: * Mutator for whether the postLoad callback should be called on loading this fetch group.
40: * @param postLoad Whether the postLoad callback should be called.
41: */
42: void setPostLoad(boolean postLoad);
43:
44: /**
45: * Accessor for whether to call postLoad when this group is loaded.
46: * @return Whether to call postLoad
47: */
48: boolean getPostLoad();
49:
50: /**
51: * Method to add a field of the class to the fetch group.
52: * @param fieldName Name of the field
53: * @return This FetchGroup
54: */
55: FetchGroup add(String fieldName);
56:
57: /**
58: * Method to remove a field of the class from the fetch group.
59: * @param fieldName Name of the field
60: * @return This FetchGroup
61: */
62: FetchGroup remove(String fieldName);
63:
64: /**
65: * Accessor for whether a particular field is in this group.
66: * @param fieldName Name of the field
67: * @return Whether it is present
68: */
69: boolean hasField(String fieldName);
70:
71: /**
72: * Accessor for the names of the fields in this fetch group.
73: * @return Names of the fields in the group
74: */
75: String[] getFieldNames();
76: }
|