org.jpox
Class FetchPlan.FetchPlanForClass

java.lang.Object
  extended by org.jpox.FetchPlan.FetchPlanForClass
Enclosing class:
FetchPlan

public class FetchPlan.FetchPlanForClass
extends java.lang.Object

Class managing the fetch plan for a particular class. This should not use the fields of the enclosing FetchPlan directly, always referring to them using the "plan" field.


Constructor Summary
FetchPlan.FetchPlanForClass(AbstractClassMetaData cmd, FetchPlan fetchPlan)
          Constructor
 
Method Summary
 AbstractClassMetaData getAbstractClassMetaData()
          Accessor for the ClassMetaData for this classes plan.
 FetchPlan getFetchPlan()
          Accessor for the FetchPlan that this classes plan relates to.
 int[] getFieldsInActualFetchPlan()
          Get all fields in the actual fetch plan
 java.util.BitSet getFieldsInActualFetchPlanByBitSet()
          Get all fields in the actual fetch plan.
 int getMaxRecursionDepthForFieldInCurrentFetchPlan(int fieldNumber)
          Method to return the effective depth of this field number in the overall fetch plan.
 boolean isFieldInActualFetchPlan(int fieldNumber)
          Return whether the specified field is in the fetch plan
 boolean isToCallPostLoadFetchPlan(boolean[] loadedFields)
          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
 

Constructor Detail

FetchPlan.FetchPlanForClass

public FetchPlan.FetchPlanForClass(AbstractClassMetaData cmd,
                                   FetchPlan fetchPlan)
Constructor

Parameters:
cmd - the ClassMetaData
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 ClassMetaData for this classes plan.

Returns:
ClassMetaData for the class represented here

isFieldInActualFetchPlan

public boolean isFieldInActualFetchPlan(int fieldNumber)
Return whether the specified field is in the fetch plan

Parameters:
fieldNumber - The field number
Returns:
Whether it is in the FetchPlan

getFieldsInActualFetchPlan

public int[] getFieldsInActualFetchPlan()
Get all fields in the actual fetch plan

Returns:
an array with the absolute position of the fields

getMaxRecursionDepthForFieldInCurrentFetchPlan

public int getMaxRecursionDepthForFieldInCurrentFetchPlan(int fieldNumber)
Method to return the effective depth of this field number in the overall fetch plan.

Parameters:
fieldNumber - Number of field in this class
Returns:
The (max) recursion depth

getFieldsInActualFetchPlanByBitSet

public java.util.BitSet getFieldsInActualFetchPlanByBitSet()
Get all fields in the actual fetch plan. This is public for unit testing purposes only

Returns:
an BitSet with the bits set in the absolute position of the fields

isToCallPostLoadFetchPlan

public boolean isToCallPostLoadFetchPlan(boolean[] loadedFields)
Whether to call the post load or not. Checks if fields in actual FetchPlan where not previouly loaded and the post-load is enabled in the metadata

Parameters:
loadedFields - alredy loaded fields
Returns:
if is to call the postLoad


Copyright © -2008 . All Rights Reserved.