| |
|
| java.lang.Object com.versant.core.jdbc.metadata.JdbcClassReferenceGraph
JdbcClassReferenceGraph | final public class JdbcClassReferenceGraph implements Comparator(Code) | | This does a topological sort of jdbc tables via its ClassMetaData. This
ordering is necassary to prevent tripping relation constraints.
This process also checks it the table is involved in circular references.
References that lead to a cyclic depenency is ignored when the dependency
ordering is done.
A class hierarchy if viewed as a node. Firstly all the references from the
node is collected. This is done by starting at the top most class and collecting all the
references. Once this is done a indirect ref graph is build up from the direct reference graph.
This indirect reference is build up by recursivly adding the references of
the direct references until we reach the end or the original node is reached again.
The nodes are now sorted by comparing there indirect reference graph.
NodeA has NodeB as indirect reference:
If NodeB has NodeA as indirect reference then they are equil.
Else NodeA is dependent on NodeB.
Create a graph of non-cyclic refs and then start adding weight at the leaf
nodes working back.
See Also: com.versant.core.metadata.ClassMetaData.referenceGraphIndex |
JdbcClassReferenceGraph | public JdbcClassReferenceGraph(ClassMetaData[] a)(Code) | | Extract out only the topmost classes from a.
|
releaseMem | public void releaseMem()(Code) | | |
|
|
|