org.deegree.sqldialect.postgis
Class PostGISWhereBuilder
java.lang.Object
org.deegree.sqldialect.filter.AbstractWhereBuilder
org.deegree.sqldialect.postgis.PostGISWhereBuilder
public class PostGISWhereBuilder
- extends AbstractWhereBuilder
AbstractWhereBuilder
implementation for PostGIS databases.
- Version:
- $Revision: 31186 $, $Date: 2011-07-01 18:01:58 +0200 (Fr, 01. Jul 2011) $
- Author:
- Markus Schneider, last edited by: $Author: mschneider $
Methods inherited from class org.deegree.sqldialect.filter.AbstractWhereBuilder |
assertNotMultiValued, build, getAliasManager, getMappedPropertyNames, getOrderBy, getPostFilter, getPostSortCriteria, getWhere, toProtoSQL, toProtoSQL, toProtoSQL, toProtoSQL, toProtoSQL, toProtoSQL, toProtoSQL, toProtoSQL, toProtoSQL |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PostGISWhereBuilder
public PostGISWhereBuilder(PostGISDialect dialect,
PropertyNameMapper mapper,
OperatorFilter filter,
SortProperty[] sortCrit,
boolean allowPartialMappings,
boolean useLegacyPredicates)
throws FilterEvaluationException,
UnmappableException
- Creates a new
PostGISWhereBuilder
instance.
- Parameters:
dialect
- SQL dialect, can be null
(TODO refactor code, so not null is always used)mapper
- provides the mapping from ValueReference
s to DB columns, must not be null
filter
- Filter to use for generating the WHERE clause, can be null
sortCrit
- criteria to use for generating the ORDER BY clause, can be null
allowPartialMappings
- if false, any unmappable expression will cause an UnmappableException
to be thrownuseLegacyPredicates
- if true, legacy-style PostGIS spatial predicates are used (e.g. Intersects
instead of
ST_Intersects
)
- Throws:
FilterEvaluationException
- if the expression contains invalid ValueReference
s
UnmappableException
- if allowPartialMappings is false and an expression could not be mapped to the db
toProtoSQL
protected SQLOperation toProtoSQL(PropertyIsLike op)
throws UnmappableException,
FilterEvaluationException
- Translates the given
PropertyIsLike
into an SQLOperation
.
NOTE: This method appends the generated argument inline, i.e. not using a ?
. This is because of a
problem that has been observed with PostgreSQL 8.0; the execution of the inline version is *much* faster.
- Overrides:
toProtoSQL
in class AbstractWhereBuilder
- Parameters:
op
- comparison operator to be translated, must not be null
- Returns:
- corresponding SQL expression, never
null
- Throws:
UnmappableException
- if translation is not possible (usually due to unmappable property names)
FilterEvaluationException
- if the expression contains invalid ValueReference
s
toProtoSQL
protected SQLOperation toProtoSQL(SpatialOperator op)
throws UnmappableException,
FilterEvaluationException
- Description copied from class:
AbstractWhereBuilder
- Translates the given
SpatialOperator
into an SQLOperation
.
- Specified by:
toProtoSQL
in class AbstractWhereBuilder
- Parameters:
op
- spatial operator to be translated, must not be null
- Returns:
- corresponding SQL expression, never
null
- Throws:
UnmappableException
- if translation is not possible (usually due to unmappable property names)
FilterEvaluationException
- if the filter contains invalid ValueReference
s
Copyright © 2011. All Rights Reserved.