Java Doc for DB2SQLBuilder.java in  » GIS » GeoTools-2.4.1 » org » geotools » data » db2 » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » GIS » GeoTools 2.4.1 » org.geotools.data.db2 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


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



Constructor Summary
public  DB2SQLBuilder(FilterToSQL encoder, String tableSchema, FeatureType featureType)
     Creates a DB2SQLBuilder that will provide a table schema to qualify table names.

Method Summary
public  StringbuildSQLBoundsQuery(String typeName, AttributeType geomAttr, org.opengis.filter.Filter filter)
     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.
 StringescapeName(String name)
     "escape" the specified name.
 SQLEncoderDB2getEncoder()
     Gets the SQL encoder associated with this SQL builder.
 StringgetSchemaTableName(String tableName)
     Gets the concatenated schema name and table name needed by DB2.
 StringgetSchemaTableName()
     Gets the concatenated schema name and table name needed by DB2.
protected  booleanisTypeNumeric(int columnType)
    
public  StringmakeDeleteSql(Feature feature)
    
protected  StringmakeFIDWhere(Feature feature)
    
protected  StringmakeInsertSql(AttributeType[] attributes, Feature feature)
     Creates a sql insert statement.
protected  StringmakeUpdateSql(AttributeType[] attributes, Feature live, Feature current)
    
public  voidsqlFrom(StringBuffer sql, String typeName)
     Construct the FROM clause for a feature type.
public  voidsqlGeometryColumn(StringBuffer sql, AttributeType geomAttribute)
     Generates the select column specification for a DB2 geometry column.
 StringsqlGeometryColumnName(AttributeType geomAttribute)
     Gets the escaped geometry column name.
Parameters:
  geomAttribute - the geometry attribute.
 StringsqlGeometryMinMaxValues(AttributeType geomAttribute)
     Generates the SELECT clause values to get the geometry min-max values.
Parameters:
  geomAttribute - the geometry attribute.


Constructor Detail
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




Method Detail
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



makeDeleteSql
public String makeDeleteSql(Feature feature) throws IOException(Code)
Generates the SQL delete statement
Parameters:
  feature - DB2 DELETE statement
throws:
  IOException -
throws:
  IOException -
throws:
  UnsupportedOperationException -



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 -



makeUpdateSql
protected String makeUpdateSql(AttributeType[] attributes, Feature live, Feature current) throws IOException(Code)
Generates the SQL UPDATE statement
Parameters:
  attributes - the attribute columns to be inserted
Parameters:
  feature - DB2 UPDATE statement
throws:
  IOException -
throws:
  UnsupportedOperationException -



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.



Fields inherited from org.geotools.data.jdbc.GeoAPISQLBuilder
protected ClientTransactionAccessor accessor(Code)(Java Doc)
protected FilterToSQL encoder(Code)(Java Doc)
protected FeatureType ft(Code)(Java Doc)

Methods inherited from org.geotools.data.jdbc.GeoAPISQLBuilder
public String buildSQLQuery(String typeName, FIDMapper mapper, AttributeType[] attrTypes, org.opengis.filter.Filter filter) throws SQLEncoderException(Code)(Java Doc)
public Filter getPostQueryFilter(Filter filter)(Code)(Java Doc)
public Filter getPreQueryFilter(Filter filter)(Code)(Java Doc)
public boolean isForce2D()(Code)(Java Doc)
public void setHints(Hints hints)(Code)(Java Doc)
protected void splitFilter(Filter filter)(Code)(Java Doc)
public void sqlColumns(StringBuffer sql, FIDMapper mapper, AttributeType[] attributes)(Code)(Java Doc)
public void sqlFrom(StringBuffer sql, String typeName)(Code)(Java Doc)
public void sqlGeometryColumn(StringBuffer sql, AttributeType geomAttribute)(Code)(Java Doc)
public void sqlOrderBy(StringBuffer sql, SortBy[] sortBy) throws SQLEncoderException(Code)(Java Doc)
public void sqlWhere(StringBuffer sql, Filter preFilter) throws SQLEncoderException(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.