|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.geotools.jdbc.SQLDialect
org.geotools.jdbc.PreparedStatementSQLDialect
public abstract class PreparedStatementSQLDialect
SQL dialect which uses prepared statements for database interaction.
Field Summary |
---|
Fields inherited from class org.geotools.jdbc.SQLDialect |
---|
BASE_DBMS_CAPABILITIES, dataStore, LOGGER |
Constructor Summary | |
---|---|
protected |
PreparedStatementSQLDialect(JDBCDataStore dataStore)
|
Method Summary | |
---|---|
PreparedFilterToSQL |
createPreparedFilterToSQL()
|
void |
prepareFunctionArgument(java.lang.Class clazz,
java.lang.StringBuffer sql)
Prepares a function argument for a prepared statement. |
void |
prepareGeometryValue(com.vividsolutions.jts.geom.Geometry g,
int srid,
java.lang.Class binding,
java.lang.StringBuffer sql)
Prepares the geometry value for a prepared statement. |
abstract void |
setGeometryValue(com.vividsolutions.jts.geom.Geometry g,
int srid,
java.lang.Class binding,
java.sql.PreparedStatement ps,
int column)
Sets the geometry value into the prepared statement. |
void |
setValue(java.lang.Object value,
java.lang.Class binding,
java.sql.PreparedStatement ps,
int column,
java.sql.Connection cx)
Sets a value in a prepared statement, for "basic types" (non-geometry). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected PreparedStatementSQLDialect(JDBCDataStore dataStore)
Method Detail |
---|
public void prepareGeometryValue(com.vividsolutions.jts.geom.Geometry g, int srid, java.lang.Class binding, java.lang.StringBuffer sql)
This method should be overridden if the implementation needs to wrap the geometry placeholder in the function. The default implementation just appends the default placeholder: '?'.
g
- The geometry value.srid
- The spatial reference system of the geometry.binding
- The class of the geometry.sql
- The prepared sql statement buffer.public void prepareFunctionArgument(java.lang.Class clazz, java.lang.StringBuffer sql)
clazz
- The mapped class of the argument.sql
- The prepared sql statement bufferpublic abstract void setGeometryValue(com.vividsolutions.jts.geom.Geometry g, int srid, java.lang.Class binding, java.sql.PreparedStatement ps, int column) throws java.sql.SQLException
g
- The geometrysrid
- the geometry native srid (should be forced into the encoded geometry)binding
- the geometry typeps
- the prepared statementcolumn
- the column index where the geometry is to be set
java.sql.SQLException
public void setValue(java.lang.Object value, java.lang.Class binding, java.sql.PreparedStatement ps, int column, java.sql.Connection cx) throws java.sql.SQLException
Subclasses should override this method if they need to do something custom or they wish to support non-standard types.
value
- the value.binding
- The class of the value.ps
- The prepared statement.column
- The column the value maps to.cx
- The database connection.
java.sql.SQLException
public PreparedFilterToSQL createPreparedFilterToSQL()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |