public class PostgisFilterToSQL extends FilterToSQL
FilterToSQL.FieldEncoder| Modifier and Type | Field and Description |
|---|---|
protected PostGISDialect |
pgDialect |
capabilities, currentDimension, currentGeometry, currentSRID, databaseSchema, encodingFunction, featureType, fieldEncoder, filterFactory, inEncodingEnabled, inline, IO_ERROR, LOGGER, out, primaryKey, sqlNameEscape| Constructor and Description |
|---|
PostgisFilterToSQL(PostGISDialect dialect) |
| Modifier and Type | Method and Description |
|---|---|
protected String |
cast(String encodedProperty,
Class target)
Gives the opportunity to subclasses to force the property to the desired type.
|
protected FilterCapabilities |
createFilterCapabilities()
Sets the capabilities of this filter.
|
double |
getDistanceInMeters(DistanceBufferOperator operator)
Converts the distance of the operator in meters, or returns the current value if there is no
units distance
|
double |
getDistanceInNativeUnits(DistanceBufferOperator operator)
Rough evaluation of distance in the units of the current SRID, assuming that the SRID maps to
a known EPSG code.
|
protected String |
getFunctionName(Function function)
Maps the function to the native database function name
|
boolean |
isEncodeBBOXFilterAsEnvelope(boolean encodeBBOXFilterAsEnvelope) |
boolean |
isLooseBBOXEnabled() |
void |
setEncodeBBOXFilterAsEnvelope(boolean encodeBBOXFilterAsEnvelope) |
void |
setFunctionEncodingEnabled(boolean functionEncodingEnabled) |
void |
setLooseBBOXEnabled(boolean looseBBOXEnabled) |
Object |
visit(Function function,
Object extraData)
Writes sql for a function expression.
|
Object |
visit(Literal literal,
Object extraData)
Export the contents of a Literal Expresion
|
Object |
visit(PropertyIsBetween filter,
Object extraData)
Writes the SQL for the PropertyIsBetween Filter.
|
Object |
visit(PropertyIsEqualTo filter,
Object extraData)
Write the SQL for this kind of filter
|
protected void |
visitBinaryComparisonOperator(BinaryComparisonOperator filter,
Object extraData)
Overrides base behavior to handler arrays
|
protected Object |
visitBinarySpatialOperator(BinarySpatialOperator filter,
Expression e1,
Expression e2,
Object extraData)
Handles the more general case of two generic expressions.
|
protected Object |
visitBinarySpatialOperator(BinarySpatialOperator filter,
PropertyName property,
Literal geometry,
boolean swapped,
Object extraData)
Handles the common case of a PropertyName,Literal geometry binary spatial operator.
|
protected void |
visitLiteralGeometry(Literal expression)
Subclasses must implement this method in order to encode geometry filters according to the
specific database implementation
|
encode, encode, encodeBinaryComparisonOperator, encodeToString, encodeToString, escapeName, evaluateLiteral, getCapabilities, getDatabaseSchema, getExpressionType, getFeatureType, getFunctionReturnType, getParameter, getPrimaryKey, getReferenceGeometryCentroid, getSqlNameEscape, isBinaryExpression, isInEncodingEnabled, setCapabilities, setDatabaseSchema, setFeatureType, setFieldEncoder, setInEncodingEnabled, setInline, setPrimaryKey, setSqlNameEscape, setWriter, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visitBinarySpatialOperator, visitBinaryTemporalOperator, visitBinaryTemporalOperator, visitBinaryTemporalOperator, visitInFunction, visitLiteralTimePeriod, visitNullFilter, writeBinaryExpression, writeBinaryExpressionMember, writeLiteralprotected PostGISDialect pgDialect
public PostgisFilterToSQL(PostGISDialect dialect)
public boolean isLooseBBOXEnabled()
public void setLooseBBOXEnabled(boolean looseBBOXEnabled)
public boolean isEncodeBBOXFilterAsEnvelope(boolean encodeBBOXFilterAsEnvelope)
public void setEncodeBBOXFilterAsEnvelope(boolean encodeBBOXFilterAsEnvelope)
protected void visitLiteralGeometry(Literal expression) throws IOException
FilterToSQLvisitLiteralGeometry in class FilterToSQLIOExceptionprotected FilterCapabilities createFilterCapabilities()
FilterToSQLcreateFilterCapabilities in class FilterToSQLprotected Object visitBinarySpatialOperator(BinarySpatialOperator filter, PropertyName property, Literal geometry, boolean swapped, Object extraData)
FilterToSQLvisitBinarySpatialOperator in class FilterToSQLprotected Object visitBinarySpatialOperator(BinarySpatialOperator filter, Expression e1, Expression e2, Object extraData)
FilterToSQLThe most common case is two PropertyName expressions, which happens during a spatial join.
visitBinarySpatialOperator in class FilterToSQLpublic Object visit(Function function, Object extraData) throws RuntimeException
FilterToSQLvisit in interface ExpressionVisitorvisit in class FilterToSQLfunction - a function expressionRuntimeException - If an IO error occurs.FilterToSQL.getFunctionName(Function)public Object visit(Literal literal, Object extraData)
FilterToSQLvisit in interface ExpressionVisitorvisit in class FilterToSQLliteral - the Literal to exportprotected String getFunctionName(Function function)
FilterToSQLgetFunctionName in class FilterToSQLprotected String cast(String encodedProperty, Class target) throws IOException
FilterToSQLcast in class FilterToSQLIOExceptionpublic void setFunctionEncodingEnabled(boolean functionEncodingEnabled)
public double getDistanceInMeters(DistanceBufferOperator operator)
FilterToSQLgetDistanceInMeters in class FilterToSQLpublic double getDistanceInNativeUnits(DistanceBufferOperator operator)
FilterToSQLgetDistanceInNativeUnits in class FilterToSQLprotected void visitBinaryComparisonOperator(BinaryComparisonOperator filter, Object extraData) throws RuntimeException
visitBinaryComparisonOperator in class FilterToSQLfilter - the comparison to be turned into SQL.RuntimeException - for io exception with writerpublic Object visit(PropertyIsBetween filter, Object extraData) throws RuntimeException
visit in interface FilterVisitorvisit in class FilterToSQLfilter - the Filter to be visited.RuntimeException - for io exception with writerpublic Object visit(PropertyIsEqualTo filter, Object extraData)
FilterToSQLvisit in interface FilterVisitorvisit in class FilterToSQLfilter - the filter to visitextraData - extra data (unused by this method)Copyright © 1996–2021 Geotools. All rights reserved.