Package org.datanucleus
Class FetchPlanForClass
- java.lang.Object
-
- org.datanucleus.FetchPlanForClass
-
public class FetchPlanForClass extends Object
Representation of the fetch plan for a particular class, defining the members that are to be fetched.
-
-
Constructor Summary
Constructors Constructor Description FetchPlanForClass(AbstractClassMetaData cmd, FetchPlan fetchPlan)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AbstractClassMetaData
getAbstractClassMetaData()
Accessor for the MetaData for this classes plan.FetchPlan
getFetchPlan()
Accessor for the FetchPlan that this classes plan relates to.int[]
getMemberNumbers()
Get the absolute numbers of the members in the fetch plan for this class.BitSet
getMemberNumbersByBitSet()
Get all members (of this class, and superclasses) in the fetch plan.int
getRecursionDepthForMember(int memberNum)
Method to return the recursion depth of this member number in the overall fetch plan.boolean
hasMember(int memberNumber)
Return whether the specified field/property is in the fetch planboolean
isToCallPostLoadFetchPlan(boolean[] loadedMembers)
Whether to call the post load or not.String
toString()
-
-
-
Constructor Detail
-
FetchPlanForClass
public FetchPlanForClass(AbstractClassMetaData cmd, FetchPlan fetchPlan)
Constructor.- Parameters:
cmd
- MetaData for the classfetchPlan
- the FetchPlan
-
-
Method Detail
-
getFetchPlan
public final FetchPlan getFetchPlan()
Accessor for the FetchPlan that this classes plan relates to.- Returns:
- The FetchPlan
-
getAbstractClassMetaData
public final AbstractClassMetaData getAbstractClassMetaData()
Accessor for the MetaData for this classes plan.- Returns:
- MetaData for the class represented here
-
getRecursionDepthForMember
public int getRecursionDepthForMember(int memberNum)
Method to return the recursion depth of this member number in the overall fetch plan.- Parameters:
memberNum
- Number of member in this class- Returns:
- The recursion depth
-
hasMember
public boolean hasMember(int memberNumber)
Return whether the specified field/property is in the fetch plan- Parameters:
memberNumber
- The member number- Returns:
- Whether it is in the FetchPlan
-
getMemberNumbers
public int[] getMemberNumbers()
Get the absolute numbers of the members in the fetch plan for this class.- Returns:
- an array with the absolute position of the members
-
getMemberNumbersByBitSet
public BitSet getMemberNumbersByBitSet()
Get all members (of this class, and superclasses) in the fetch plan.- Returns:
- an BitSet with the bits set in the absolute position of the fields
-
isToCallPostLoadFetchPlan
public boolean isToCallPostLoadFetchPlan(boolean[] loadedMembers)
Whether to call the post load or not. Checks if members in actual FetchPlan where not previouly loaded and the post-load is enabled in the metadata.- Parameters:
loadedMembers
- already loaded members- Returns:
- if is to call the postLoad
-
-