org.jpox.state
Class FetchPlanState

java.lang.Object
  extended byorg.jpox.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 types of the objects being fetched. The first item in the List will be the root item. When a new branch of the graph of processed an object type 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 object types.

Version:
$Revision: 1.5 $

Field Summary
protected  java.util.List objectGraphTypes
          List of object types in the graph.
 
Constructor Summary
FetchPlanState()
           
 
Method Summary
 void addObjectType(java.lang.String type)
          Method to add an object type to the list since it is being processed
 int getObjectDepthForType(java.lang.String type)
          Accessor for the current depth for the specified type
 int getObjectGraphDepth()
          Accessor for the object graph depth currently
 void removeLatestObjectType()
          Method to remove the latest object type in 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

objectGraphTypes

protected java.util.List objectGraphTypes
List of object types in the graph. The first is the root of the tree, and objects are added as they are encountered and removed when they are finished with.

Constructor Detail

FetchPlanState

public FetchPlanState()
Method Detail

addObjectType

public void addObjectType(java.lang.String type)
Method to add an object type to the list since it is being processed

Parameters:
type - The type to add

removeLatestObjectType

public void removeLatestObjectType()
Method to remove the latest object type in the list since it is now processed


getObjectGraphDepth

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

Returns:
The graph depth

getObjectDepthForType

public int getObjectDepthForType(java.lang.String type)
Accessor for the current depth for the specified type

Parameters:
type - The type
Returns:
The depth for this type


Copyright © -2007 . All Rights Reserved.