Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| deegree 2.4 (2010/11/11 10:47 build-27-official)
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.deegree.io.datastore.sde
Class SDETransaction

    java.lang.Object
      org.deegree.io.datastore.sde.AbstractSDERequestHandler
          org.deegree.io.datastore.sde.SDETransaction

All Implemented Interfaces:
  DatastoreTransaction

    public class SDETransaction

extends AbstractSDERequestHandler
implements DatastoreTransaction

Handles `Transaction` requests to SQL based datastores.

Version:
  $Revision: 18523 $
Author:
  Christoph Pollmann, last edited by: $Author: mschneider $

Field Summary

Fields inherited from class org.deegree.io.datastore.sde.AbstractSDERequestHandler
`aliasGenerator, conn, datastore, FT_COLUMN, FT_PREFIX`

Constructor Summary
`SDETransaction(SDEDatastore datastore, TableAliasGenerator aliasGenerator, SDEConnection conn)` Creates a new instance of `SQLTransaction` from the given parameters.

Method Summary
`void` | `begin()` Starts a new transaction.
`void` | `commit()` Makes the changes persistent that have been performed in this transaction.
`int` | `performDelete(MappedFeatureType mappedFeatureType, Filter filter, String lockId)` Deletes the features from the datastore that are matched by the given filter and type.
`List<FeatureId>` | `performInsert(List<Feature> features)` Inserts the given feature instances into the datastore.
`int` | `performNative(Native operation)` Performs a 'native' operation against the datastore.
`int` | `performReplace(MappedFeatureType mappedFeatureType, Feature replacementFeature, Filter filter, String lockId)` Performs a replace operation against the datastore.
`int` | `performUpdate(MappedFeatureType mappedFeatureType, Feature replacementFeature, Filter filter, String lockId)` Performs an update operation against the datastore.
`int` | `performUpdate(MappedFeatureType mappedFeatureType, Map<PropertyPath,FeatureProperty> replacementProps, Filter filter, String lockId)` Performs an update operation against the datastore.
`void` | `release()` Returns the transaction instance so other clients may acquire a transaction (and underlying resources, such as JDBCConnections can be freed).
`void` | `rollback()` Aborts the changes that have been performed in this transaction.

Methods inherited from class org.deegree.io.datastore.sde.AbstractSDERequestHandler
`buildColumnsMap, buildInitialFIDSelect, buildMappingFieldMap, determineAffectedFIDs, extractFeatureIds, getAliasGenerator, getConnection, getDatastore, getFeatureIdColumns`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface org.deegree.io.datastore.DatastoreTransaction
`getDatastore`

Constructor Detail

### SDETransaction

    public SDETransaction(SDEDatastore datastore,
                          TableAliasGenerator aliasGenerator,
                          SDEConnection conn)

  Creates a new instance of `SQLTransaction` from the given parameters.

  Parameters:
    `datastore` -
    `aliasGenerator` -
    `conn` -

Method Detail

### begin

    public void begin()
               throws DatastoreException

  Starts a new transaction.

  Throws:
    `DatastoreException`

### commit

    public void commit()
                throws DatastoreException

  Makes the changes persistent that have been performed in this transaction.

  Specified by:
    `commit` in interface `DatastoreTransaction`
  Throws:
    `DatastoreException`

### rollback

    public void rollback()
                  throws DatastoreException

  Aborts the changes that have been performed in this transaction.

  Specified by:
    `rollback` in interface `DatastoreTransaction`
  Throws:
    `DatastoreException`

### release

    public void release()
                 throws DatastoreException

  Returns the transaction instance so other clients may acquire a transaction (and underlying resources, such as JDBCConnections can be freed).

  Specified by:
    `release` in interface `DatastoreTransaction`
  Throws:
    `DatastoreException`

### performInsert

    public List<FeatureId> performInsert(List<Feature> features)
                                  throws DatastoreException

  Inserts the given feature instances into the datastore.

  Specified by:
    `performInsert` in interface `DatastoreTransaction`
  Parameters:
    `features` -
  Returns:
    feature ids of the inserted (root) features
  Throws:
    `DatastoreException`
  See Also:
    `FeatureIdAssigner`

### performUpdate

    public int performUpdate(MappedFeatureType mappedFeatureType,
                             Map<PropertyPath,FeatureProperty> replacementProps,
                             Filter filter,
                             String lockId)
                      throws DatastoreException

  Performs an update operation against the datastore.

  Specified by:
    `performUpdate` in interface `DatastoreTransaction`
  Parameters:
    `mappedFeatureType` - feature type that is to be updated
    `replacementProps` - properties and their replacement values
    `filter` - selects the feature instances that are to be updated
    `lockId` - optional id of associated lock (may be null)
  Returns:
    number of updated feature instances
  Throws:
    `DatastoreException`

### performUpdate

    public int performUpdate(MappedFeatureType mappedFeatureType,
                             Feature replacementFeature,
                             Filter filter,
                             String lockId)
                      throws DatastoreException

  Performs an update operation against the datastore.

  The filter is expected to match exactly one feature which will be replaced by the specified replacement feature.

  Specified by:
    `performUpdate` in interface `DatastoreTransaction`
  Parameters:
    `mappedFeatureType` - feature type that is to be updated
    `replacementFeature` - feature instance that will replace the selected feature
    `filter` - selects the single feature instances that is to be replaced
    `lockId` - optional id of associated lock (may be null)
  Returns:
    number of updated feature instances (must be 0 or 1)
  Throws:
    `DatastoreException`

### performReplace

    public int performReplace(MappedFeatureType mappedFeatureType,
                              Feature replacementFeature,
                              Filter filter,
                              String lockId)
                       throws DatastoreException

  Performs a replace operation against the datastore.

  Parameters:
    `mappedFeatureType` - feature type that is to be replaced
    `replacementFeature` - feature instance that will be used to replace the properties of the selected features
    `filter` - selects the feature instances that are to be replaced
    `lockId` - optional id of associated lock (may be null)
  Returns:
    number of replaced feature instances
  Throws:
    `DatastoreException`

### performDelete

    public int performDelete(MappedFeatureType mappedFeatureType,
                             Filter filter,
                             String lockId)
                      throws DatastoreException

  Deletes the features from the datastore that are matched by the given filter and type.

  Specified by:
    `performDelete` in interface `DatastoreTransaction`
  Parameters:
    `mappedFeatureType` -
    `filter` -
    `lockId` - optional id of associated lock (may be null)
  Returns:
    number of deleted feature instances
  Throws:
    `DatastoreException`

### performNative

    public int performNative(Native operation)
                      throws DatastoreException

  Performs a 'native' operation against the datastore.

  Specified by:
    `performNative` in interface `DatastoreTransaction`
  Parameters:
    `operation` -
  Returns:
    number of processed feature instances.
  Throws:
    `DatastoreException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| deegree 2.4 (2010/11/11 10:47 build-27-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