Class CommitOrderDependencyNode
- java.lang.Object
-
- org.eclipse.persistence.internal.sessions.CommitOrderDependencyNode
-
public class CommitOrderDependencyNode extends Object
This wraps a descriptor with information required to compute an order for dependencies. The algorithm is a simple topological sort.
-
-
Field Summary
Fields Modifier and Type Field Description protected ClassDescriptor
descriptor
protected int
discoveryTime
protected int
finishingTime
static int
InProgress
static int
NotVisited
protected CommitOrderCalculator
owner
protected CommitOrderDependencyNode
predecessor
protected Vector
relatedNodes
protected AbstractSession
session
protected int
traversalState
static int
Visited
-
Constructor Summary
Constructors Constructor Description CommitOrderDependencyNode(CommitOrderCalculator calculator, ClassDescriptor descriptor, AbstractSession session)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ClassDescriptor
getDescriptor()
int
getFinishingTime()
CommitOrderCalculator
getOwner()
CommitOrderDependencyNode
getPredecessor()
Vector
getRelatedNodes()
boolean
hasBeenVisited()
boolean
hasNotBeenVisited()
void
markInProgress()
void
markNotVisited()
void
markVisited()
void
recordMappingDependencies()
Add all owned classes for each descriptor through checking the mappings.void
recordSpecifiedDependencies()
Add all owned classes for each descriptor through checking the mappings.void
setDiscoveryTime(int time)
void
setFinishingTime(int time)
void
setPredecessor(CommitOrderDependencyNode n)
String
toString()
void
visit()
Vector
withAllSubclasses(CommitOrderDependencyNode node)
-
-
-
Field Detail
-
owner
protected CommitOrderCalculator owner
-
descriptor
protected ClassDescriptor descriptor
-
session
protected AbstractSession session
-
relatedNodes
protected Vector relatedNodes
-
predecessor
protected CommitOrderDependencyNode predecessor
-
traversalState
protected int traversalState
-
NotVisited
public static int NotVisited
-
InProgress
public static int InProgress
-
Visited
public static int Visited
-
discoveryTime
protected int discoveryTime
-
finishingTime
protected int finishingTime
-
-
Constructor Detail
-
CommitOrderDependencyNode
public CommitOrderDependencyNode(CommitOrderCalculator calculator, ClassDescriptor descriptor, AbstractSession session)
-
-
Method Detail
-
getDescriptor
public ClassDescriptor getDescriptor()
-
getFinishingTime
public int getFinishingTime()
-
getOwner
public CommitOrderCalculator getOwner()
-
getPredecessor
public CommitOrderDependencyNode getPredecessor()
-
getRelatedNodes
public Vector getRelatedNodes()
-
hasBeenVisited
public boolean hasBeenVisited()
-
hasNotBeenVisited
public boolean hasNotBeenVisited()
-
markInProgress
public void markInProgress()
-
markNotVisited
public void markNotVisited()
-
markVisited
public void markVisited()
-
recordMappingDependencies
public void recordMappingDependencies()
Add all owned classes for each descriptor through checking the mappings. If I have a foreign mapping with a constraint dependency, then add it If I'm related to a class, I'm related to all its subclasses and superclasses. If my superclass is related to a class, I'm related to it.
-
recordSpecifiedDependencies
public void recordSpecifiedDependencies()
Add all owned classes for each descriptor through checking the mappings. If I have a foreign mapping with a constraint dependency, then add it If I'm related to a class, I'm related to all its subclasses and superclasses. If my superclass is related to a class, I'm related to it.
-
setDiscoveryTime
public void setDiscoveryTime(int time)
-
setFinishingTime
public void setFinishingTime(int time)
-
setPredecessor
public void setPredecessor(CommitOrderDependencyNode n)
-
visit
public void visit()
-
withAllSubclasses
public Vector withAllSubclasses(CommitOrderDependencyNode node)
-
-