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 AbstractSDERequestHandler

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

Direct Known Subclasses:
  SDEDeleteHandler, SDEInsertHandler, SDEQueryHandler, SDETransaction, SDEUpdateHandler

    public class AbstractSDERequestHandler

extends Object

Handles `Transaction` requests to SQL based datastores.

Version:
  $Revision: 12183 $, $Date: 2008-06-05 11:17:23 +0200 (Do, 05. Jun 2008) $
Author:
  Christoph Pollmann, last edited by: $Author: rbezema $

Field Summary
`protected TableAliasGenerator` | `aliasGenerator` reference to the alias generator
`protected SDEConnection` | `conn` a connection
`protected SDEDatastore` | `datastore` datastore to operate upon
`protected static String` | `FT_COLUMN` feature type column
`protected static String` | `FT_PREFIX` The prefix of feature types 'ft_'

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

Method Summary
`protected Map<String,List<MappingField>>` | `buildColumnsMap(MappedFeatureType featureType, PropertyType[] requestedProperties, boolean withIdFields)` Builds a helper map that contains the column names of the feature type's table as keys.
`protected com.esri.sde.sdk.client.SeQuery` | `buildInitialFIDSelect(MappedFeatureType rootFeatureType, SDEWhereBuilder whereBuilder)` Builds the initial SELECT statement that retrieves the feature ids that are matched by the given `WhereBuilder`.
`protected Map<MappingField,Integer>` | `buildMappingFieldMap(String[] columns, Map<String,List<MappingField>> columnsMap)` Builds a lookup map that contains `MappingField` instances as keys.
`FeatureId[]` | `determineAffectedFIDs(MappedFeatureType ft, Filter filter)` Determines the feature ids that are matched by the given filter.
`FeatureId[]` | `extractFeatureIds(com.esri.sde.sdk.client.SeQuery stmt, MappedFeatureType ft)`
`TableAliasGenerator` | `getAliasGenerator()` Returns the underlying `AbstractSQLDatastore`.
`SDEConnection` | `getConnection()` Returns the underlying `AbstractSQLDatastore`.
`SDEDatastore` | `getDatastore()` Returns the underlying `AbstractSQLDatastore`.
`protected String[]` | `getFeatureIdColumns(MappedFeatureType featureType)` Appends the alias qualified columns that make up the feature id to the given query.

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

Field Detail

### FT_COLUMN

    protected static final String FT_COLUMN

  feature type column

  See Also:
    Constant Field Values

### FT_PREFIX

    protected static final String FT_PREFIX

  The prefix of feature types 'ft_'

  See Also:
    Constant Field Values

### datastore

    protected SDEDatastore datastore

  datastore to operate upon

### aliasGenerator

    protected TableAliasGenerator aliasGenerator

  reference to the alias generator

### conn

    protected SDEConnection conn

  a connection

Constructor Detail

### AbstractSDERequestHandler

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

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

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

Method Detail

### getDatastore

    public SDEDatastore getDatastore()

  Returns the underlying `AbstractSQLDatastore`.

  Returns:
    the underlying `AbstractSQLDatastore`.

### getConnection

    public SDEConnection getConnection()

  Returns the underlying `AbstractSQLDatastore`.

  Returns:
    the underlying `AbstractSQLDatastore`.

### getAliasGenerator

    public TableAliasGenerator getAliasGenerator()

  Returns the underlying `AbstractSQLDatastore`.

  Returns:
    the underlying `AbstractSQLDatastore`.

### determineAffectedFIDs

    public FeatureId[] determineAffectedFIDs(MappedFeatureType ft,
                                             Filter filter)
                                      throws DatastoreException

  Determines the feature ids that are matched by the given filter.

  Parameters:
    `ft` -
    `filter` -
  Returns:
    the feature ids that are matched by the given filter.
  Throws:
    `DatastoreException`

### buildInitialFIDSelect

    protected com.esri.sde.sdk.client.SeQuery buildInitialFIDSelect(MappedFeatureType rootFeatureType,
                                                                    SDEWhereBuilder whereBuilder)

  Builds the initial SELECT statement that retrieves the feature ids that are matched by the given `WhereBuilder`.

  The statement is structured like this:

  - `SELECT`
  - comma-separated list of qualified fid fields
  - `FROM`
  - comma-separated list of tables and their aliases (this is needed to constrain the paths to selected XPath-PropertyNames)
  - `WHERE`
  - SQL representation of the Filter expression

  Parameters:
    `rootFeatureType` -
    `whereBuilder` -
  Returns:
    the query

### getFeatureIdColumns

    protected String[] getFeatureIdColumns(MappedFeatureType featureType)

  Appends the alias qualified columns that make up the feature id to the given query.

  Parameters:
    `featureType` -
  Returns:
    the feature id columns

### extractFeatureIds

    public FeatureId[] extractFeatureIds(com.esri.sde.sdk.client.SeQuery stmt,
                                         MappedFeatureType ft)
                                  throws Exception

  Parameters:
    `stmt` -
    `ft` -
  Returns:
    the ids
  Throws:
    `Exception`

### buildColumnsMap

    protected Map<String,List<MappingField>> buildColumnsMap(MappedFeatureType featureType,
                                                             PropertyType[] requestedProperties,
                                                             boolean withIdFields)

  Builds a helper map that contains the column names of the feature type's table as keys. Each column name is mapped to a `List` containing the `MappingField` instances that refer to this column.

  The following MappingField instances of the feature type's annotation are used to build the map:

  - MappingFields from the wfs:gmlId - annotation element of the feature type definition
  - MappingFields in the annotations of the property element definitions; if the property's content is stored in a related table, the MappingFields used in the first wfs:Relation element's wfs:From element are considered

  Parameters:
    `featureType` - feature type for which the map is built
    `requestedProperties` - requested properties
    `withIdFields` -
  Returns:
    key class: String (column names), value class: List (containing MappingField instances)

### buildMappingFieldMap

    protected Map<MappingField,Integer> buildMappingFieldMap(String[] columns,
                                                             Map<String,List<MappingField>> columnsMap)

  Builds a lookup map that contains `MappingField` instances as keys. Each `MappingField` is mapped to the index position (an `Integer`) of the MappingField's field name in the given column array.

  Parameters:
    `columns` -
    `columnsMap` -
  Returns:
    key class: MappingField, value class: Integer (index of field name in columns)

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