deegree 2.3 (2010/04/09 10:10 build-4-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 delete 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: 18195 $, $Date: 2009-06-18 17:55:39 +0200 (Do, 18. Jun 2009) $
Author:
Markus Schneider, last edited by: $Author: mschneider $
See Also:
FeatureGraph

Constructor Summary
TableGraph(FeatureGraph featureGraph, DeleteHandler handler)
          Creates a new DeleteGraph instance from the given FeatureGraph.
 
Method Summary
(package private)  TableNode findNode(FeatureId fid)
          Returns the TableNode that represents the specified feature instance.
(package private)  TableNode findNode(TableNode newNode)
          Returns the TableNode that represents the specified feature instance (given as a TableNode).
(package private)  int getDeletableRootFeatureCount()
          Returns the number of deletable root features.
(package private)  List<TableNode> getDeletionOrder()
          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()
Returns the number of deletable root features.

Returns:
number of deletable root features.

findNode

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

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

findNode

TableNode findNode(TableNode newNode)
Returns the TableNode that represents the specified feature instance (given as a TableNode).

Parameters:
newNode - feature to look up
Returns:
TableNode for the feature instance if it exists in the graph, null otherwise

getDeletionOrder

List<TableNode> getDeletionOrder()
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 the initial order (arbitrary) is returned.

Returns:
the nodes of the graph in topological order if no cycle is present, else in arbitrary order

toString

public String toString()
Overrides:
toString in class Object

deegree 2.3 (2010/04/09 10:10 build-4-official)

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