| java.lang.Object org.geotools.data.jdbc.GeoAPISQLBuilder org.geotools.data.db2.DB2SQLBuilder
DB2SQLBuilder | public class DB2SQLBuilder extends GeoAPISQLBuilder (Code) | | A DB2-specific subclass of DefaultSQLBuilder, which supports DB2 Spatial
Extender geometry datatypes.
author: David Adler - IBM Corporation |
DB2SQLBuilder | public DB2SQLBuilder(FilterToSQL encoder, String tableSchema, FeatureType featureType)(Code) | | Creates a DB2SQLBuilder that will provide a table schema to qualify
table names. The table schema is provided by the DB2DataStore which
means that a given DataStore can only access tables within a single
schema.
It would be better if the table schema was managed by FeatureTypeHandler
or FeatureType.
Parameters: encoder - an SQLEncoder Parameters: tableSchema - table schema to qualify table names Parameters: featureType - the feature type to be used by this SQL builder |
buildSQLBoundsQuery | public String buildSQLBoundsQuery(String typeName, AttributeType geomAttr, org.opengis.filter.Filter filter) throws SQLEncoderException(Code) | | Builds the SQL query to get the bounds (min-max coordinate values) of a
geometry column for a given filter.
Parameters: typeName - the feature type name. Parameters: geomAttr - the geometry attribute. Parameters: filter - the filter expression. the string to perform the SQL query. throws: SQLEncoderException - |
escapeName | String escapeName(String name)(Code) | | "escape" the specified name. This is currently delegated to the encoder
object and for DB2 this means that the specified name will be
surrounded by double-quote characters in order to ensure case
sensitivity.
Parameters: name - escaped name |
getEncoder | SQLEncoderDB2 getEncoder()(Code) | | Gets the SQL encoder associated with this SQL builder.
the associated encoder |
getSchemaTableName | String getSchemaTableName(String tableName)(Code) | | Gets the concatenated schema name and table name needed by DB2.
Parameters: tableName - concatenated schema and table name |
getSchemaTableName | String getSchemaTableName()(Code) | | Gets the concatenated schema name and table name needed by DB2.
concatenated schema and table name |
isTypeNumeric | protected boolean isTypeNumeric(int columnType)(Code) | | Checks if column type is SQL numeric type
Parameters: SQL - columnType true if the column is an SQL numeric type |
makeFIDWhere | protected String makeFIDWhere(Feature feature) throws IOException(Code) | | Build a DB2 WHERE clause based on the FID column values
Parameters: feature - A DB2 WHERE clause based on the FID column values. throws: IOException - |
makeInsertSql | protected String makeInsertSql(AttributeType[] attributes, Feature feature) throws IOException(Code) | | Creates a sql insert statement. Uses each feature's schema, which makes
it possible to insert out of order, as well as inserting less than all
features.
Parameters: attributes - the attribute columns to be inserted Parameters: feature - the feature to add. an insert sql statement. throws: IOException - |
sqlFrom | public void sqlFrom(StringBuffer sql, String typeName)(Code) | | Construct the FROM clause for a feature type. Prefixes the typeName
with the table schema provided when this class was constructed.
This method could be promoted to DefaultSQLBuilder if the table schema
was propagated up.
Overrides sqlFrom in DefaultSQLBuilder
Parameters: sql - StringBuffer to be appended to Parameters: typeName - Name of the type (table) |
sqlGeometryColumn | public void sqlGeometryColumn(StringBuffer sql, AttributeType geomAttribute)(Code) | | Generates the select column specification for a DB2 geometry column.
Overrides sqlGeometryColumn in DefaultSQLBuilder
Parameters: sql - A StringBuffer that the column specification can be appendedto. Parameters: geomAttribute - An AttributeType for a geometry attribute |
sqlGeometryColumnName | String sqlGeometryColumnName(AttributeType geomAttribute)(Code) | | Gets the escaped geometry column name.
Parameters: geomAttribute - the geometry attribute. the String with the escaped name. |
sqlGeometryMinMaxValues | String sqlGeometryMinMaxValues(AttributeType geomAttribute)(Code) | | Generates the SELECT clause values to get the geometry min-max values.
Parameters: geomAttribute - the geometry attribute. the string with the 4 column expressions. |
|
|