org.datanucleus
Class FetchPlanForClass

java.lang.Object
  extended by org.datanucleus.FetchPlanForClass

public class FetchPlanForClass
extends java.lang.Object

Representation of the fetch plan for a particular class, defining the members that are to be fetched.


Field Summary
protected static Localiser LOCALISER
          Localisation utility for output messages
 
Constructor Summary
FetchPlanForClass(AbstractClassMetaData cmd, FetchPlan fetchPlan)
          Constructor.
 
Method Summary
 AbstractClassMetaData getAbstractClassMetaData()
          Accessor for the MetaData for this classes plan.
 FetchPlan getFetchPlan()
          Accessor for the FetchPlan that this classes plan relates to.
 int getMaxRecursionDepthForMember(int memberNum)
          Method to return the effective depth of this member number in the overall fetch plan.
 int[] getMemberNumbers()
          Get the absolute numbers of the members in the fetch plan for this class.
 java.util.BitSet getMemberNumbersByBitSet()
          Get all members (of this class, and superclasses) in the fetch plan.
 boolean hasMember(int memberNumber)
          Return whether the specified field/property is in the fetch plan
 boolean isToCallPostLoadFetchPlan(boolean[] loadedMembers)
          Whether to call the post load or not.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOCALISER

protected static final Localiser LOCALISER
Localisation utility for output messages

Constructor Detail

FetchPlanForClass

public FetchPlanForClass(AbstractClassMetaData cmd,
                         FetchPlan fetchPlan)
Constructor.

Parameters:
cmd - MetaData for the class
fetchPlan - 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

getMaxRecursionDepthForMember

public int getMaxRecursionDepthForMember(int memberNum)
Method to return the effective depth of this member number in the overall fetch plan.

Parameters:
memberNum - Number of member in this class
Returns:
The (max) 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 java.util.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


Copyright © 2010. All Rights Reserved.