|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface SQLBuilder
Provides an interface for SQL statement construction.
Currently just doing query building, but obviously this can be extended.
Method Summary | |
---|---|
java.lang.String |
buildSQLQuery(java.lang.String typeName,
FIDMapper mapper,
org.opengis.feature.type.AttributeDescriptor[] attrTypes,
org.opengis.filter.Filter filter)
Deprecated. use buildSQLQuery(String, FIDMapper, AttributeDescriptor[], Filter, SortBy[], Integer, Integer) |
java.lang.String |
buildSQLQuery(java.lang.String typeName,
FIDMapper mapper,
org.opengis.feature.type.AttributeDescriptor[] attrTypes,
org.opengis.filter.Filter filter,
org.opengis.filter.sort.SortBy[] sortBy,
java.lang.Integer offset,
java.lang.Integer limit)
Deprecated. Makes an SQL Select statement. |
void |
encode(java.lang.StringBuffer sql,
org.opengis.filter.expression.Expression expression)
Deprecated. Lower level method allowing for the encoding of a single expession in sql |
void |
encode(java.lang.StringBuffer sql,
org.opengis.filter.Filter filter)
Deprecated. Lower level method allowing for the encoding of a single filter in sql |
org.opengis.filter.Filter |
getPostQueryFilter(org.opengis.filter.Filter filter)
Deprecated. Returns the Filter required for post processing. |
org.opengis.filter.Filter |
getPreQueryFilter(org.opengis.filter.Filter filter)
Deprecated. |
void |
setHints(Hints hints)
Deprecated. Hints supplied by the user. |
void |
sqlColumns(java.lang.StringBuffer sql,
FIDMapper mapper,
org.opengis.feature.type.AttributeDescriptor[] attributes)
Deprecated. Produces the select information required. |
void |
sqlFrom(java.lang.StringBuffer sql,
java.lang.String typeName)
Deprecated. Consutrcts FROM clause for featureType |
void |
sqlOrderBy(java.lang.StringBuffer sql,
FIDMapper mapper,
org.opengis.filter.sort.SortBy[] sortBy)
Deprecated. Constructs ORDER BY clause. |
void |
sqlOrderBy(java.lang.StringBuffer sql,
org.opengis.filter.sort.SortBy[] sortBy)
Deprecated. use sqlOrderBy(StringBuffer, FIDMapper, SortBy[]) |
void |
sqlWhere(java.lang.StringBuffer sql,
org.opengis.filter.Filter preFilter)
Deprecated. Constructs WHERE clause, if needed, for FILTER. |
Method Detail |
---|
void setHints(Hints hints)
The following hints are of interest when working with Features:
hints
- java.lang.String buildSQLQuery(java.lang.String typeName, FIDMapper mapper, org.opengis.feature.type.AttributeDescriptor[] attrTypes, org.opengis.filter.Filter filter, org.opengis.filter.sort.SortBy[] sortBy, java.lang.Integer offset, java.lang.Integer limit) throws SQLEncoderException
typeName
- a String with the typeName used as the table to querymapper
- an FIDMapperattrTypes
- the array of AttributeType elements for the select statementfilter
- the filter to convert to a where statementsortBy
- offset
- limit
-
SQLEncoderException
- If an error occurs encoding the SQL
FIXME: This should change to a FilterToSQLException after SQLEncoder is droppedjava.lang.String buildSQLQuery(java.lang.String typeName, FIDMapper mapper, org.opengis.feature.type.AttributeDescriptor[] attrTypes, org.opengis.filter.Filter filter) throws SQLEncoderException
buildSQLQuery(String, FIDMapper, AttributeDescriptor[], Filter, SortBy[], Integer, Integer)
SQLEncoderException
org.opengis.filter.Filter getPostQueryFilter(org.opengis.filter.Filter filter)
The result will be null if no post processing is required.
This method is used by DefaultJDBCFeatureSource to see if the a Query can be optimized
filter
-
null
org.opengis.filter.Filter getPreQueryFilter(org.opengis.filter.Filter filter)
void sqlColumns(java.lang.StringBuffer sql, FIDMapper mapper, org.opengis.feature.type.AttributeDescriptor[] attributes)
The featureType, if known, is always requested.
sql: featureID (,attributeColumn)*
We may need to provide AttributeReaders with a hook so they can request a wrapper function.
sql
- mapper
- attributes
- void sqlFrom(java.lang.StringBuffer sql, java.lang.String typeName)
sql: FROM typeName
sql
- typeName
- void sqlWhere(java.lang.StringBuffer sql, org.opengis.filter.Filter preFilter) throws SQLEncoderException
sql: WHERE filter encoding
SQLEncoderException
void sqlOrderBy(java.lang.StringBuffer sql, org.opengis.filter.sort.SortBy[] sortBy) throws SQLEncoderException
sqlOrderBy(StringBuffer, FIDMapper, SortBy[])
sql: ORDER BY <property1> [ASC|DESC], ....
SQLEncoderException
void encode(java.lang.StringBuffer sql, org.opengis.filter.expression.Expression expression) throws SQLEncoderException
SQLEncoderException
void encode(java.lang.StringBuffer sql, org.opengis.filter.Filter filter) throws SQLEncoderException
SQLEncoderException
void sqlOrderBy(java.lang.StringBuffer sql, FIDMapper mapper, org.opengis.filter.sort.SortBy[] sortBy) throws SQLEncoderException
sql: ORDER BY <property1> [ASC|DESC], ....
sql
- buffer where the complete query is being builtmapper
- where to inferr the primary key fields from in case the sortBy list contains
SortBy.NATURAL_ORDER
or SortBy.REVERSE_ORDER
sortBy
- the order by criteria, possibly null
FIXME: This should change to a FilterToSQLException after SQLEncoder is dropped
SQLEncoderException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |