Package org.apache.openjpa.meta
Class FetchGroup
java.lang.Object
org.apache.openjpa.meta.FetchGroup
- All Implemented Interfaces:
Serializable
Captures fetch group meta-data.
Fetch Group is identified and referred by its immutable name.
Fetch Group can nest other groups. The nested group reference is the name of the nested group.
Defines two standard fetch group named default and all.
- See Also:
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
addContainedBy
(FetchGroup parent) Adds this receiver as one of the included fetch groups of the given parent.void
addDeclaredInclude
(String fgName) Includes given fetch group within this receiver.boolean
Affirms equality if the other has the same name and declaring type.Gets the name of the fetch groups in which this receiver has been included.String[]
Return the fetch group names declared included by this group.int
Return the recursion depth declared for the given field, or 0 if none.Return the fields with declared recursion depths in this group.getName()
Fetch group name.int
Recursion depth for the given field.int
hashCode()
boolean
Affirms if given fetch group is included by this receiver.boolean
Whether loading this fetch group causes a post-load callback on the loaded instance.boolean
Whether the post-load value is declared for this group.void
resolve()
Resolve and validate fetch group meta-data.void
setPostLoad
(boolean flag) Whether loading this fetch group causes a post-load callback on the loaded instance.void
setRecursionDepth
(FieldMetaData fm, int depth) Recursion depth for the given field.toString()
-
Field Details
-
NAME_DEFAULT
Name of the default fetch group.- See Also:
-
NAME_ALL
Name of the "all" fetch group.- See Also:
-
RECURSION_DEPTH_DEFAULT
public static final int RECURSION_DEPTH_DEFAULTDefault field recursion depth.- See Also:
-
DEPTH_INFINITE
public static final int DEPTH_INFINITEInfinite depth.- See Also:
-
-
Method Details
-
getName
Fetch group name. -
addDeclaredInclude
Includes given fetch group within this receiver. -
includes
Affirms if given fetch group is included by this receiver. Includes superclass definition of fetch group and optionally other included groups.- Parameters:
recurse
- if true then recursively checks within the included fecth groups
-
addContainedBy
Adds this receiver as one of the included fetch groups of the given parent. The parent fetch group will include this receiver as a side-effect of this call.- Returns:
- true if given parent is a new addition. false othrwise.
- Since:
- 1.1.0
- See Also:
-
getContainedBy
Gets the name of the fetch groups in which this receiver has been included.- Since:
- 1.1.0
- See Also:
-
getDeclaredIncludes
Return the fetch group names declared included by this group. -
setRecursionDepth
Recursion depth for the given field. This is the depth of relations of the same class as this one we can fetch through the given field. -
getRecursionDepth
Recursion depth for the given field. This is the depth of relations of the same class as this one we can fetch through the given field. -
getDeclaredRecursionDepth
Return the recursion depth declared for the given field, or 0 if none. -
getDeclaredRecursionDepthFields
Return the fields with declared recursion depths in this group. -
setPostLoad
public void setPostLoad(boolean flag) Whether loading this fetch group causes a post-load callback on the loaded instance. -
isPostLoad
public boolean isPostLoad()Whether loading this fetch group causes a post-load callback on the loaded instance. -
isPostLoadExplicit
public boolean isPostLoadExplicit()Whether the post-load value is declared for this group. -
resolve
public void resolve()Resolve and validate fetch group meta-data. -
equals
Affirms equality if the other has the same name and declaring type. -
hashCode
public int hashCode() -
toString
-