org.datanucleus.state
Class FetchPlanState

java.lang.Object
  extended by org.datanucleus.state.FetchPlanState
Direct Known Subclasses:
DetachState

public class FetchPlanState
extends java.lang.Object

Holder for the state control for FetchPlan processing. Maintains a list of the field names being fetched. The first item in the List will be the root. When a new branch of the graph of processed the field name is added, and is removed when it is processed. This provides a means of always knowing the depth in the current graph, and also of allowing detection of recursion of field names.


Field Summary
protected  java.util.List fetchFieldNames
          List of field names in the graph.
 
Constructor Summary
FetchPlanState()
           
 
Method Summary
 void addFieldName(java.lang.String field)
          Method to add an field name to the list since it is being processed
 int getCurrentFetchDepth()
          Accessor for the object graph depth currently
 int getObjectDepthForType(java.lang.String fieldName)
          Accessor for the current depth for the specified field name
 void removeLatestFieldName()
          Method to remove the latest field name from the list since it is now processed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fetchFieldNames

protected java.util.List fetchFieldNames
List of field names in the graph. The first is the root of the tree, and fields are added as they are encountered and removed when they are finished with.

Constructor Detail

FetchPlanState

public FetchPlanState()
Method Detail

addFieldName

public void addFieldName(java.lang.String field)
Method to add an field name to the list since it is being processed

Parameters:
field - The field to add

removeLatestFieldName

public void removeLatestFieldName()
Method to remove the latest field name from the list since it is now processed


getCurrentFetchDepth

public int getCurrentFetchDepth()
Accessor for the object graph depth currently

Returns:
The graph depth

getObjectDepthForType

public int getObjectDepthForType(java.lang.String fieldName)
Accessor for the current depth for the specified field name

Parameters:
fieldName - The name of the field
Returns:
The depth for this field name


Copyright © 2010. All Rights Reserved.