|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.geotools.filter.SQLEncoder org.geotools.data.db2.filter.SQLEncoderDB2
Generate a WHERE clause for DB2 Spatial Extender based on a spatial filter.
The following spatial filter operations are supported:
Field Summary |
Fields inherited from class org.geotools.filter.SQLEncoder |
mapper, out |
Constructor Summary | |
SQLEncoderDB2()
Construct an SQLEncoderDB2 |
|
SQLEncoderDB2(java.io.Writer out,
Filter filter)
Construct an SQLEncoderDB2 that does the encoding (through superclass) directly based on the filter parameter. |
Method Summary | |
protected FilterCapabilities |
createFilterCapabilities()
Sets the DB2 filter capabilities. |
void |
setSelectivityClause(java.lang.String string)
Sets a SELECTIVITY clause that can be included with the spatial predicate to influence the query optimizer to exploit a spatial index if it exists. |
void |
setSRID(int srid)
Set the value of the srid value to be used if a DB2 Spatial Extender geometry needs to be constructed. |
void |
visit(GeometryFilter filter)
Generate a WHERE clause for the input GeometryFilter. |
void |
visit(LikeFilter filter)
Writes the SQL for the Like Filter. |
void |
visitLiteralGeometry(LiteralExpression expression)
Construct an ST_Geometry from the WKT representation of a literal expression |
Methods inherited from class org.geotools.filter.SQLEncoder |
encode, encode, escapeName, getCapabilities, getColnameEscape, setColnameEscape, setFIDMapper, setSqlNameEscape, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.geotools.filter.FilterVisitor |
visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit |
Constructor Detail |
public SQLEncoderDB2()
public SQLEncoderDB2(java.io.Writer out, Filter filter) throws SQLEncoderException
out
- a writer objectfilter
- query filter to be encoded
SQLEncoderException
Method Detail |
public void visit(LikeFilter filter) throws java.lang.RuntimeException
visit
in interface FilterVisitor
visit
in class SQLEncoder
filter
- the Like Filter to be visited.
java.lang.RuntimeException
- if writing the expression fails.public void visit(GeometryFilter filter) throws java.lang.RuntimeException
The following spatial filter operations are supported:
visit
in interface FilterVisitor
visit
in class SQLEncoder
filter
- The geometry filter to be processed.
java.lang.RuntimeException
- for IO exceptionFilterVisitor.visit(org.geotools.filter.GeometryFilter)
public void visitLiteralGeometry(LiteralExpression expression) throws java.io.IOException
visitLiteralGeometry
in class SQLEncoder
expression
- the expression turn into an ST_Geometry.
java.io.IOException
- Passes back exception if generated by
this.out.write()public void setSRID(int srid)
This is specifically the DB2 Spatial Extender spatial reference system identifier and not a coordinate system identifier ala EPSG.
srid
- Spatial reference system identifier to be used.protected FilterCapabilities createFilterCapabilities()
createFilterCapabilities
in class SQLEncoder
public void setSelectivityClause(java.lang.String string)
The parameter should be of the form:
"SELECTIVITY 0.001"
where the numeric value is the fraction of rows that will be returned
by using the index scan. This doesn't have to be true. The value
0.001 is typically used to force the use of the spatial in all cases if
the spatial index exists.
string
- a selectivity clause
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |