|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
ObjectFilterToSQL
PreparedFilterToSQL
public class PreparedFilterToSQL
Extension of FilterToSQL intended for use with prepared statements.
Each time a Literal is visited, a '?' is encoded, and the
value and type of the literal are stored, available after the fact
via getLiteralValues() and getLiteralTypes().
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class FilterToSQL |
|---|
FilterToSQL.FieldEncoder |
| Field Summary | |
|---|---|
protected PreparedStatementSQLDialect |
dialect
|
protected List<Class> |
literalTypes
|
protected List<Object> |
literalValues
ordered list of literal values encountered and their types |
protected List<Integer> |
SRIDs
|
| Fields inherited from class FilterToSQL |
|---|
capabilities, currentGeometry, currentSRID, databaseSchema, encodingFunction, featureType, fieldEncoder, filterFactory, inline, IO_ERROR, mapper, out, primaryKey |
| Constructor Summary | |
|---|---|
PreparedFilterToSQL()
Deprecated. Use PreparedFilterToSQL(PreparedStatementSQLDialect) instead |
|
PreparedFilterToSQL(PreparedStatementSQLDialect dialect)
Contructor taking a reference to the SQL dialect, will use it to encode geometry placeholders |
|
PreparedFilterToSQL(Writer out)
|
|
| Method Summary | |
|---|---|
List<Class> |
getLiteralTypes()
|
List<Object> |
getLiteralValues()
|
List<Integer> |
getSRIDs()
Returns the list of native SRID for each literal that happens to be a geometry, or null otherwise |
boolean |
isPrepareEnabled()
If true (default) a sql statement with literal placemarks is created, otherwise a normal statement is created |
void |
setPrepareEnabled(boolean prepareEnabled)
|
Object |
visit(Id filter,
Object extraData)
Encodes an Id filter |
Object |
visit(Literal expression,
Object context)
Export the contents of a Literal Expresion |
| Methods inherited from class Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected List<Object> literalValues
protected List<Class> literalTypes
protected List<Integer> SRIDs
protected PreparedStatementSQLDialect dialect
| Constructor Detail |
|---|
public PreparedFilterToSQL()
PreparedFilterToSQL(PreparedStatementSQLDialect) instead
public PreparedFilterToSQL(PreparedStatementSQLDialect dialect)
dialect - public PreparedFilterToSQL(Writer out)
| Method Detail |
|---|
public boolean isPrepareEnabled()
public void setPrepareEnabled(boolean prepareEnabled)
public Object visit(Literal expression,
Object context)
throws RuntimeException
FilterToSQL
visit in interface ExpressionVisitorvisit in class FilterToSQLexpression - the Literal to export
RuntimeException - for io exception with writer
public Object visit(Id filter,
Object extraData)
visit in interface FilterVisitorvisit in class FilterToSQLfilter - the
RuntimeException - If there's a problem writing outputpublic List<Object> getLiteralValues()
public List<Class> getLiteralTypes()
public List<Integer> getSRIDs()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||