deegree 2.2 (2008/12/22 11:33 build-3038-official)

org.deegree.io.datastore.sql.transaction.delete
Class TableGraph

java.lang.Object
  extended by org.deegree.io.datastore.sql.transaction.delete.TableGraph

 class TableGraph
extends Object

Represents a operation on the relational (table) level. Contains explicit information on all table rows to be removed from the database and their foreign key references.

Version:
$Revision: 9342 $, $Date: 2007-12-27 13:32:57 +0100 (Do, 27 Dez 2007) $
Author:
Markus Schneider, last edited by: $Author: apoth $
See Also:
FeatureGraph

Constructor Summary
TableGraph(FeatureGraph featureGraph, DeleteHandler handler)
          Creates a new DeleteGraph instance from the given FeatureGraph.
 
Method Summary
(package private)  TableNode addNode(FeatureId fid)
           
(package private)  TableNode addNode(String table, Collection<KeyColumn> keyColumns)
           
(package private)  TableNode findNode(FeatureId fid)
          Returns the TableNode that represents the specified feature instance.
(package private)  TableNode findNode(String table, Collection<KeyColumn> keyColumns)
           
(package private)  TableNode findNode(TableNode newNode)
           
(package private)  int getDeletableRootFeatureCount()
           
(package private)  List<TableNode> getNodesInTopologicalOrder()
          Returns the nodes of the graph in topological order, i.e. they may be deleted in that order without violating any foreign key constraints.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TableGraph

TableGraph(FeatureGraph featureGraph,
           DeleteHandler handler)
     throws DatastoreException
Creates a new DeleteGraph instance from the given FeatureGraph.

Parameters:
featureGraph -
handler -
Throws:
DatastoreException
Method Detail

getDeletableRootFeatureCount

int getDeletableRootFeatureCount()

findNode

TableNode findNode(FeatureId fid)
Returns the TableNode that represents the specified feature instance.

Parameters:
fid - FeatureId of the feature instance
Returns:
DeleteNode for the feature instance if it exists in the graph, null otherwise

findNode

TableNode findNode(TableNode newNode)

findNode

TableNode findNode(String table,
                   Collection<KeyColumn> keyColumns)

addNode

TableNode addNode(FeatureId fid)

addNode

TableNode addNode(String table,
                  Collection<KeyColumn> keyColumns)

getNodesInTopologicalOrder

List<TableNode> getNodesInTopologicalOrder()
Returns the nodes of the graph in topological order, i.e. they may be deleted in that order without violating any foreign key constraints.

NOTE: If the foreign key constraints constitute a cycle, no topological order is possible and a RuntimeException is thrown.

Returns:
the nodes of the graph in topological order
Throws:
RuntimeException - if no topological order is possible, i.e. if there is a cycle

toString

public String toString()
Overrides:
toString in class Object

deegree 2.2 (2008/12/22 11:33 build-3038-official)

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://deegree.sourceforge.net