Class JDOFetchGroup
java.lang.Object
org.datanucleus.api.jdo.JDOFetchGroup
- All Implemented Interfaces:
Serializable, javax.jdo.FetchGroup
Implementation of a FetchGroup for JDO.
Provides a JDO wrapper around the internal org.datanucleus.FetchGroup.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) org.datanucleus.FetchGroupprivate static final longFields inherited from interface javax.jdo.FetchGroup
ALL, BASIC, DEFAULT, MULTIVALUED, RELATIONSHIP -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionjavax.jdo.FetchGroupaddCategory(String categoryName) Convenience method to add the members in the specified category.javax.jdo.FetchGroupMethod to add a field of the class to the fetch group.javax.jdo.FetchGroupaddMembers(String... members) Method to add members of the class from the fetch group.private voidMethod to throw an exception if the fetch group is currently unmodifiable.booleanorg.datanucleus.FetchGroupAccessor for the internal fetch group.Accessor for the members that are in this fetch group.getName()Accessor for the group name.booleanAccessor for whether to call postLoad when this group is loaded.intgetRecursionDepth(String memberName) Accessor for the recursion depth for the specified field/property.getType()Accessor for the class that this group is for.inthashCode()booleanAccessor for whether the FetchGroup is unmodifiablejavax.jdo.FetchGroupremoveCategory(String categoryName) Convenience method to remove the members in the specified category.javax.jdo.FetchGroupremoveMember(String memberName) Method to remove a field of the class from the fetch group.javax.jdo.FetchGroupremoveMembers(String... members) Method to remove members of the class from the fetch group.javax.jdo.FetchGroupsetPostLoad(boolean postLoad) Mutator for whether the postLoad callback should be called on loading this fetch group.javax.jdo.FetchGroupsetRecursionDepth(String memberName, int recursionDepth) Method to set the recursion depth for the specified field/property.javax.jdo.FetchGroupMethod to make the FetchGroup unmodifiable.toString()
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
fg
org.datanucleus.FetchGroup fg
-
-
Constructor Details
-
JDOFetchGroup
public JDOFetchGroup(org.datanucleus.FetchGroup fg) Constructor.- Parameters:
fg- The internal FetchGroup
-
-
Method Details
-
getInternalFetchGroup
public org.datanucleus.FetchGroup getInternalFetchGroup()Accessor for the internal fetch group.- Returns:
- Fetch group
-
getName
Accessor for the group name.- Specified by:
getNamein interfacejavax.jdo.FetchGroup- Returns:
- Name of the group
-
getType
Accessor for the class that this group is for.- Specified by:
getTypein interfacejavax.jdo.FetchGroup- Returns:
- the class
-
setPostLoad
public javax.jdo.FetchGroup setPostLoad(boolean postLoad) Mutator for whether the postLoad callback should be called on loading this fetch group.- Specified by:
setPostLoadin interfacejavax.jdo.FetchGroup- Parameters:
postLoad- Whether the postLoad callback should be called.- Returns:
- This fetch group
-
getPostLoad
public boolean getPostLoad()Accessor for whether to call postLoad when this group is loaded.- Specified by:
getPostLoadin interfacejavax.jdo.FetchGroup- Returns:
- Whether to call postLoad
-
getRecursionDepth
Accessor for the recursion depth for the specified field/property.- Specified by:
getRecursionDepthin interfacejavax.jdo.FetchGroup- Parameters:
memberName- Name of field/property- Returns:
- The recursion depth
-
setRecursionDepth
Method to set the recursion depth for the specified field/property.- Specified by:
setRecursionDepthin interfacejavax.jdo.FetchGroup- Parameters:
memberName- Name of field/propertyrecursionDepth- Recursion depth- Returns:
- The fetch group
-
setUnmodifiable
public javax.jdo.FetchGroup setUnmodifiable()Method to make the FetchGroup unmodifiable.- Specified by:
setUnmodifiablein interfacejavax.jdo.FetchGroup- Returns:
- The FetchGroup
-
isUnmodifiable
public boolean isUnmodifiable()Accessor for whether the FetchGroup is unmodifiable- Specified by:
isUnmodifiablein interfacejavax.jdo.FetchGroup- Returns:
- Whether unmodifiable
-
addCategory
Convenience method to add the members in the specified category.- Specified by:
addCategoryin interfacejavax.jdo.FetchGroup- Parameters:
categoryName- The category- Returns:
- This FetchGroup
-
removeCategory
Convenience method to remove the members in the specified category.- Specified by:
removeCategoryin interfacejavax.jdo.FetchGroup- Parameters:
categoryName- The category- Returns:
- This FetchGroup
-
getMembers
Accessor for the members that are in this fetch group.- Specified by:
getMembersin interfacejavax.jdo.FetchGroup- Returns:
- Set of member names.
-
addMember
Method to add a field of the class to the fetch group.- Specified by:
addMemberin interfacejavax.jdo.FetchGroup- Parameters:
memberName- Name of the field- Returns:
- This FetchGroup
- Throws:
javax.jdo.JDOUserException- if the field doesn't exist for this class
-
removeMember
Method to remove a field of the class from the fetch group.- Specified by:
removeMemberin interfacejavax.jdo.FetchGroup- Parameters:
memberName- Name of the field/property- Returns:
- This FetchGroup
-
addMembers
Method to add members of the class from the fetch group.- Specified by:
addMembersin interfacejavax.jdo.FetchGroup- Parameters:
members- Names of the fields/properties- Returns:
- This FetchGroup
-
removeMembers
Method to remove members of the class from the fetch group.- Specified by:
removeMembersin interfacejavax.jdo.FetchGroup- Parameters:
members- Names of the fields/properties- Returns:
- This FetchGroup
-
assertUnmodifiable
private void assertUnmodifiable()Method to throw an exception if the fetch group is currently unmodifiable. -
equals
-
hashCode
-
toString
-