org.datanucleus.jdo
Class JDOFetchGroup

java.lang.Object
  extended by org.datanucleus.jdo.JDOFetchGroup
All Implemented Interfaces:
java.io.Serializable, javax.jdo.FetchGroup

public class JDOFetchGroup
extends java.lang.Object
implements javax.jdo.FetchGroup, java.io.Serializable

Implementation of a FetchGroup for JDO. Provides a JDO wrapper around the internal org.datanucleus.FetchGroup.

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface javax.jdo.FetchGroup
ALL, BASIC, DEFAULT, MULTIVALUED, RELATIONSHIP
 
Constructor Summary
JDOFetchGroup(FetchGroup fg)
          Constructor.
 
Method Summary
 javax.jdo.FetchGroup addCategory(java.lang.String categoryName)
          Convenience method to add the members in the specified category.
 javax.jdo.FetchGroup addMember(java.lang.String memberName)
          Method to add a field of the class to the fetch group.
 javax.jdo.FetchGroup addMembers(java.lang.String... members)
          Method to add members of the class from the fetch group.
 boolean equals(java.lang.Object obj)
           
 FetchGroup getInternalFetchGroup()
          Accessor for the internal fetch group.
 java.util.Set getMembers()
          Accessor for the members that are in this fetch group.
 java.lang.String getName()
          Accessor for the group name.
 boolean getPostLoad()
          Accessor for whether to call postLoad when this group is loaded.
 int getRecursionDepth(java.lang.String memberName)
          Accessor for the recursion depth for the specified field/property.
 java.lang.Class getType()
          Accessor for the class that this group is for.
 int hashCode()
           
 boolean isUnmodifiable()
          Accessor for whether the FetchGroup is unmodifiable
 javax.jdo.FetchGroup removeCategory(java.lang.String categoryName)
          Convenience method to remove the members in the specified category.
 javax.jdo.FetchGroup removeMember(java.lang.String memberName)
          Method to remove a field of the class from the fetch group.
 javax.jdo.FetchGroup removeMembers(java.lang.String... members)
          Method to remove members of the class from the fetch group.
 javax.jdo.FetchGroup setPostLoad(boolean postLoad)
          Mutator for whether the postLoad callback should be called on loading this fetch group.
 javax.jdo.FetchGroup setRecursionDepth(java.lang.String memberName, int recursionDepth)
          Method to set the recursion depth for the specified field/property.
 javax.jdo.FetchGroup setUnmodifiable()
          Method to make the FetchGroup unmodifiable.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JDOFetchGroup

public JDOFetchGroup(FetchGroup fg)
Constructor.

Parameters:
fg - The internal FetchGroup
Method Detail

getInternalFetchGroup

public FetchGroup getInternalFetchGroup()
Accessor for the internal fetch group.

Returns:
Fetch group

getName

public java.lang.String getName()
Accessor for the group name.

Specified by:
getName in interface javax.jdo.FetchGroup
Returns:
Name of the group

getType

public java.lang.Class getType()
Accessor for the class that this group is for.

Specified by:
getType in interface javax.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:
setPostLoad in interface javax.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:
getPostLoad in interface javax.jdo.FetchGroup
Returns:
Whether to call postLoad

getRecursionDepth

public int getRecursionDepth(java.lang.String memberName)
Accessor for the recursion depth for the specified field/property.

Specified by:
getRecursionDepth in interface javax.jdo.FetchGroup
Parameters:
memberName - Name of field/property
Returns:
The recursion depth

setRecursionDepth

public javax.jdo.FetchGroup setRecursionDepth(java.lang.String memberName,
                                              int recursionDepth)
Method to set the recursion depth for the specified field/property.

Specified by:
setRecursionDepth in interface javax.jdo.FetchGroup
Parameters:
memberName - Name of field/property
recursionDepth - Recursion depth
Returns:
The fetch group

setUnmodifiable

public javax.jdo.FetchGroup setUnmodifiable()
Method to make the FetchGroup unmodifiable.

Specified by:
setUnmodifiable in interface javax.jdo.FetchGroup
Returns:
The FetchGroup

isUnmodifiable

public boolean isUnmodifiable()
Accessor for whether the FetchGroup is unmodifiable

Specified by:
isUnmodifiable in interface javax.jdo.FetchGroup
Returns:
Whether unmodifiable

addCategory

public javax.jdo.FetchGroup addCategory(java.lang.String categoryName)
Convenience method to add the members in the specified category.

Specified by:
addCategory in interface javax.jdo.FetchGroup
Parameters:
categoryName - The category
Returns:
This FetchGroup

removeCategory

public javax.jdo.FetchGroup removeCategory(java.lang.String categoryName)
Convenience method to remove the members in the specified category.

Specified by:
removeCategory in interface javax.jdo.FetchGroup
Parameters:
categoryName - The category
Returns:
This FetchGroup

getMembers

public java.util.Set getMembers()
Accessor for the members that are in this fetch group.

Specified by:
getMembers in interface javax.jdo.FetchGroup
Returns:
Set of member names.

addMember

public javax.jdo.FetchGroup addMember(java.lang.String memberName)
Method to add a field of the class to the fetch group.

Specified by:
addMember in interface javax.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

public javax.jdo.FetchGroup removeMember(java.lang.String memberName)
Method to remove a field of the class from the fetch group.

Specified by:
removeMember in interface javax.jdo.FetchGroup
Parameters:
memberName - Name of the field/property
Returns:
This FetchGroup

addMembers

public javax.jdo.FetchGroup addMembers(java.lang.String... members)
Method to add members of the class from the fetch group.

Specified by:
addMembers in interface javax.jdo.FetchGroup
Parameters:
members - Names of the fields/properties
Returns:
This FetchGroup

removeMembers

public javax.jdo.FetchGroup removeMembers(java.lang.String... members)
Method to remove members of the class from the fetch group.

Specified by:
removeMembers in interface javax.jdo.FetchGroup
Parameters:
members - Names of the fields/properties
Returns:
This FetchGroup

equals

public boolean equals(java.lang.Object obj)
Specified by:
equals in interface javax.jdo.FetchGroup
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Specified by:
hashCode in interface javax.jdo.FetchGroup
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2011. All Rights Reserved.