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

org.deegree.io.datastore.sql.postgis
Class PostGISWhereBuilder

java.lang.Object
  extended by org.deegree.io.datastore.sql.wherebuilder.WhereBuilder
      extended by org.deegree.io.datastore.sql.postgis.PostGISWhereBuilder

 class PostGISWhereBuilder
extends WhereBuilder

WhereBuilder implementation for PostGIS databases.

Version:
$Revision: 18864 $, $Date: 2009-08-03 17:11:49 +0200 (Mo, 03. Aug 2009) $
Author:
Markus Schneider , last edited by: $Author: mschneider $

Field Summary
 
Fields inherited from class org.deegree.io.datastore.sql.wherebuilder.WhereBuilder
filter, filterPropertyPaths, queryTableTree, rootFts, sortProperties, sortPropertyPaths, SRS_UNDEFINED, vcProvider
 
Constructor Summary
PostGISWhereBuilder(MappedFeatureType[] rootFts, String[] aliases, Filter filter, SortProperty[] sortProperties, TableAliasGenerator aliasGenerator, VirtualContentProvider vcProvider)
          Creates a new instance of PostGISWhereBuilder from the given parameters.
 
Method Summary
protected  void appendPropertyIsLikeOperationAsSQL(StatementBuffer query, PropertyIsLikeOperation operation)
          Appends an SQL fragment for the given object to the given sql statement.
protected  void appendSpatialOperationAsSQL(StatementBuffer query, SpatialOperation operation)
          Generates an SQL-fragment for the given object.
 
Methods inherited from class org.deegree.io.datastore.sql.wherebuilder.WhereBuilder
appendArithmeticExpressionAsSQL, appendComparisonOperationAsSQL, appendComplexFilterAsSQL, appendExpressionAsSQL, appendFeatureFilterAsSQL, appendFunctionAsSQL, appendJoinTableList, appendLiteralAsSQL, appendLogicalOperationAsSQL, appendOperationAsSQL, appendOrderByCondition, appendPropertyIsBetweenOperationAsSQL, appendPropertyIsCOMPOperationAsSQL, appendPropertyIsNullOperationAsSQL, appendPropertyNameAsSQL, appendPropertyPathAsSQL, appendWhereCondition, buildFilterPropertyNameMap, fillFunctionNameMap, getFilter, getFunctionName, getGeometryProperty, getPropertyNameSQLType, getRootTableAlias
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PostGISWhereBuilder

public PostGISWhereBuilder(MappedFeatureType[] rootFts,
                           String[] aliases,
                           Filter filter,
                           SortProperty[] sortProperties,
                           TableAliasGenerator aliasGenerator,
                           VirtualContentProvider vcProvider)
                    throws DatastoreException
Creates a new instance of PostGISWhereBuilder from the given parameters.

Parameters:
rootFts - selected feature types, more than one type means that the types are joined
aliases - aliases for the feature types, may be null (must have same length as rootFts otherwise)
filter - filter that restricts the matched features
sortProperties - sort criteria for the result, may be null or empty
aliasGenerator - used to generate unique table aliases
vcProvider -
Throws:
DatastoreException
Method Detail

appendPropertyIsLikeOperationAsSQL

protected void appendPropertyIsLikeOperationAsSQL(StatementBuffer query,
                                                  PropertyIsLikeOperation operation)
                                           throws FilterEvaluationException
Appends an SQL fragment for the given object to the given sql statement. NOTE: Currently, the method uses a quirk and appends the generated argument inline, i.e. not using query.addArgument(). This is because of a problem that occurred in PostgreSQL; the execution of the inline version is *much* faster (at least with version 8.0).

Overrides:
appendPropertyIsLikeOperationAsSQL in class WhereBuilder
Parameters:
query -
operation -
Throws:
FilterEvaluationException

appendSpatialOperationAsSQL

protected void appendSpatialOperationAsSQL(StatementBuffer query,
                                           SpatialOperation operation)
                                    throws DatastoreException
Generates an SQL-fragment for the given object. TODO: Implement BBOX faster using explicit B0X-constructor

Overrides:
appendSpatialOperationAsSQL in class WhereBuilder
Throws:
DatastoreException

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