| 
 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.geotools.filter.SQLEncoder
org.geotools.filter.SQLEncoderMySQL
Encodes a filter into a SQL WHERE statement for MySQL. This class adds the ability to turn geometry filters into sql statements if they are bboxes.
| Field Summary | 
| Fields inherited from class org.geotools.filter.SQLEncoder | 
| mapper, out | 
| Constructor Summary | |
| SQLEncoderMySQL()Empty constructor TODO: rethink empty constructor, as BBOXes _need_ an SRID, must make client set it somehow. | |
| SQLEncoderMySQL(int srid) | |
| Method Summary | |
| protected  FilterCapabilities | createFilterCapabilities()Sets the capabilities of this filter. | 
|  void | setDefaultGeometry(java.lang.String name)Sets the default geometry, so that filters with null for one of their expressions can assume that the default geometry is intended. | 
|  void | setSRID(int srid)Sets a spatial reference system ESPG number, so that the geometry can be properly encoded for postgis. | 
|  void | visit(GeometryFilter filter)Turns a geometry filter into the postgis sql bbox statement. | 
|  void | visit(LikeFilter filter)Called when accept is called on a Like Filter. | 
|  void | visitLiteralGeometry(LiteralExpression expression)Checks to see if the literal is a geometry, and encodes it if it is, if not just sends to the parent class. | 
| 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 SQLEncoderMySQL()
public SQLEncoderMySQL(int srid)
| Method Detail | 
protected FilterCapabilities createFilterCapabilities()
SQLEncoder
createFilterCapabilities in class SQLEncoderSQLEncoder.createFilterCapabilities()public void setSRID(int srid)
srid - the integer code for the EPSG spatial reference system.public void setDefaultGeometry(java.lang.String name)
name - the name of the default geometry Attribute.
public void visit(GeometryFilter filter)
           throws java.lang.RuntimeException
visit in interface FilterVisitorvisit in class SQLEncoderfilter - the geometry filter to be encoded.
java.lang.RuntimeException - for IO exception (need a better error)FilterVisitor.visit(org.geotools.filter.GeometryFilter)
public void visitLiteralGeometry(LiteralExpression expression)
                          throws java.io.IOException
visitLiteralGeometry in class SQLEncoderexpression - the expression to visit and encode.
java.io.IOException - for IO exception (need a better error)public void visit(LikeFilter filter)
FilterVisitor
visit in interface FilterVisitorvisit in class SQLEncoderfilter - the Like Filter to be visited.| 
 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||