Package org.datanucleus
Class FetchPlanState
- java.lang.Object
-
- org.datanucleus.FetchPlanState
-
- Direct Known Subclasses:
DetachState
public class FetchPlanState extends Object
Holder for the state control for FetchPlan processing. Maintains a list of the member names being fetched. The first item in the List will be the root. When a new branch of the graph is processed the member name is added, and it is removed once it has been processed. This provides a means of always knowing the depth in the current graph, and also of allowing detection of recursion of member names.
-
-
Field Summary
Fields Modifier and Type Field Description protected List<String>
memberNames
List of member names in the graph.
-
Constructor Summary
Constructors Constructor Description FetchPlanState()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addMemberName(String memberName)
Method to add a member name to the list since it is being processedprotected static int
calculateObjectDepthForMember(List<String> memberNames, String memberName)
int
getCurrentFetchDepth()
Accessor for the object graph depth currentlyint
getObjectDepthForType(String memberName)
Accessor for the current depth for the specified member name.void
removeLatestMemberName()
Method to remove the latest member name from the list since it is now processed
-
-
-
Method Detail
-
addMemberName
public void addMemberName(String memberName)
Method to add a member name to the list since it is being processed- Parameters:
memberName
- The member to add
-
removeLatestMemberName
public void removeLatestMemberName()
Method to remove the latest member 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(String memberName)
Accessor for the current depth for the specified member name.- Parameters:
memberName
- The name of the field/property- Returns:
- The depth for this member
-
-