|
deegree 2.5 (2011/06/29 09:44 build-8-official) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.deegree.io.datastore.sql.AbstractRequestHandler org.deegree.io.datastore.sql.transaction.delete.DeleteHandler
public class DeleteHandler
Handler for Delete
operations (which usually occur as parts of Transaction
requests).
When a Delete
operation is performed, the following actions are taken:
FeatureId
s of all (root) feature instances that match the associated Filter
are determinedFeatureGraph
is built in order to determine which features may be deleted without removing
subfeatures of independent featuresTableGraph
is built that contains explicit information on all table rows that have to be deleted (and
their dependencies)TableNode
s of the TableGraph
are sorted in topological order, i.e. they may be deleted in
that order without violating any foreign key constraints
FeatureGraph
,
TableGraph
Field Summary |
---|
Fields inherited from class org.deegree.io.datastore.sql.AbstractRequestHandler |
---|
aliasGenerator, conn, datastore, FT_COLUMN, FT_PREFIX |
Constructor Summary | |
---|---|
DeleteHandler(SQLTransaction dsTa,
TableAliasGenerator aliasGenerator,
java.sql.Connection conn,
java.lang.String lockId)
Creates a new DeleteHandler from the given parameters. |
Method Summary | |
---|---|
void |
deleteOrphanedPropertyRows(TableRelation relation,
java.lang.Object[] keyValues)
Delete orphaned rows in the specified property table (target table of the given TableRelation ). |
(package private) TableNode |
determineJTNode(FeatureId fid,
FeatureId subFid,
TableRelation relation1,
TableRelation relation2)
Determines the row in the join table that connects a certain feature with a subfeature. |
(package private) java.util.List<TableNode> |
determinePropNodes(FeatureId fid,
TableRelation relation)
Determines the TableNode that represent the simple/geometry properties in the property table attached by
the given TableRelation . |
int |
performDelete(MappedFeatureType ft,
Filter filter)
Deletes the features from the Datastore that have a certain type and are matched by the given filter. |
Methods inherited from class org.deegree.io.datastore.sql.AbstractRequestHandler |
---|
appendColumnsList, appendFeatureIdColumns, appendFeatureIdConstraint, appendFeatureIdConstraint, appendJoinCondition, appendJoins, appendQualifiedColumn, appendQualifiedColumnsList, determineAffectedAndModifiableFIDs, determineAffectedFIDs, determineSubFeatures, determineSuperFeatures, extractFeatureId, extractFeatureIds, extractFeatureIdsForceUnique |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DeleteHandler(SQLTransaction dsTa, TableAliasGenerator aliasGenerator, java.sql.Connection conn, java.lang.String lockId)
DeleteHandler
from the given parameters.
dsTa
- aliasGenerator
- conn
- lockId
- optional id of associated lock (may be null)Method Detail |
---|
public int performDelete(MappedFeatureType ft, Filter filter) throws DatastoreException
Datastore
that have a certain type and are matched by the given filter.
ft
- non-abstract feature type of the features to be deletedfilter
- constraints the feature instances to be deleted
DatastoreException
java.util.List<TableNode> determinePropNodes(FeatureId fid, TableRelation relation) throws DatastoreException
TableNode
that represent the simple/geometry properties in the property table attached by
the given TableRelation
.
fid
- id of the feature that owns the propertiesrelation
- describes how the property table is joined to the feature table
DatastoreException
TableNode determineJTNode(FeatureId fid, FeatureId subFid, TableRelation relation1, TableRelation relation2) throws DatastoreException
fid
- id of the (super-) featuresubFid
- id of the subfeaturerelation1
- describes how the join table is attachedrelation2
- describes how the subfeature table is joined
TableNode
)
DatastoreException
public void deleteOrphanedPropertyRows(TableRelation relation, java.lang.Object[] keyValues) throws DatastoreException
TableRelation
).
Only used by the UpdateHandler
.
relation
- keyValues
-
DatastoreException
|
deegree 2.5 (2011/06/29 09:44 build-8-official) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org