Java Doc for H2SQLBuilder.java in  » GIS » GeoTools-2.4.1 » org » geotools » data » h2 » 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.h2 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.geotools.data.h2.H2SQLBuilder

H2SQLBuilder
public class H2SQLBuilder implements FilterVisitor,ExpressionVisitor(Code)
Encodes an sql statement.

This class is not thread safe.


author:
   Justin Deoliveira, The Open Planning Project


Field Summary
 FilterFactoryfilterFactory
    
 FilterpostFilter
    
 StringBuffersql
    
 JDBCStatestate
    

Constructor Summary
public  H2SQLBuilder(JDBCState state, FilterFactory filterFactory)
     Creates the sql builder.

Method Summary
public  Stringcount(Filter filter)
     Encodes an entire sql SELECT statement of the form "SELECT count(*) FROM ...".
public  Stringcreate()
     Encodes an entire "CREATE TABLE" statement.
public  StatementcreateTable()
    
public  Stringdelete(Filter filter)
     Encodes an entire sql DELETE statement.
 Stringencode(CoordinateReferenceSystem crs)
     Helper method to encode a crs.
 FeatureTypefeatureType()
    
public  voidfrom()
     Encodes the FROM clause of a query.
protected  voidgeometry(Geometry geometry, String srid, StringBuffer sql)
     Encodes a geometry with a known srid to be used in an sql statement.
public  StringBuffergetSQL()
    
protected  voidinit()
     Initializes the state of the encoder.
public  Stringinsert(String[] names, Object[] values)
     Encodes an entire sql INSERT statement.
protected  voidname(String raw)
     Encodes a name to be used in an sql statement.
protected  voidnil(StringBuffer sql)
     Encodes nulL to be used in an sql statement.
public  Stringselect(Query query)
     Encodes an entire sql SELECT statement.
public  voidselect(String[] propertyNames)
     Encodes the select clause of a query.
public  voidsortBy(SortBy[] sortBy)
     Encodes the SORT BY clause of a query.
protected  voidsrid(String raw, StringBuffer sql)
    
protected  voidstring(String raw, StringBuffer sql)
     Encodes a string to be used in an sql statement.
public  voidtable()
     Encodes the table name of a query.
public  Stringupdate(Query query, Object[] values)
     Encodes an entire sql UPDATE statement.
public  Objectvisit(ExcludeFilter exclude, Object data)
    
public  Objectvisit(IncludeFilter include, Object data)
    
public  Objectvisit(Not not, Object data)
    
public  Objectvisit(And and, Object data)
    
public  Objectvisit(Or or, Object data)
    
protected  Objectvisit(BinaryLogicOperator logic, Object data, String operator)
    
public  Objectvisit(Id id, Object data)
    
public  Objectvisit(PropertyIsBetween between, Object data)
    
public  Objectvisit(PropertyIsEqualTo equalTo, Object data)
    
public  Objectvisit(PropertyIsNotEqualTo notEqualTo, Object data)
    
public  Objectvisit(PropertyIsGreaterThan greaterThan, Object data)
    
public  Objectvisit(PropertyIsGreaterThanOrEqualTo greaterThanOrEqualTo, Object data)
    
public  Objectvisit(PropertyIsLessThan lessThan, Object data)
    
public  Objectvisit(PropertyIsLessThanOrEqualTo lessThanOrEqualTo, Object data)
    
protected  Objectvisit(BinaryComparisonOperator comparison, Object data, String operator)
    
public  Objectvisit(PropertyIsLike like, Object data)
    
public  Objectvisit(PropertyIsNull isNull, Object data)
    
public  Objectvisit(BBOX bbox, Object data)
    
protected  Objectvisit(PropertyName name, Geometry geometry, Object data)
    
public  Objectvisit(Beyond beyond, Object data)
    
public  Objectvisit(DWithin dwithin, Object data)
    
protected  Objectvisit(DistanceBufferOperator distance, Object data, String operator, boolean index)
    
public  Objectvisit(Disjoint disjoint, Object data)
    
public  Objectvisit(Contains contains, Object data)
    
public  Objectvisit(Crosses crosses, Object data)
    
public  Objectvisit(Equals equals, Object data)
    
public  Objectvisit(Intersects intersects, Object data)
    
public  Objectvisit(Overlaps overlaps, Object data)
    
public  Objectvisit(Touches touches, Object data)
    
public  Objectvisit(Within within, Object data)
    
protected  Objectvisit(BinarySpatialOperator comparison, Object data, String operator, boolean index)
    
public  Objectvisit(NilExpression nil, Object data)
    
public  Objectvisit(Add add, Object data)
    
public  Objectvisit(Subtract subtract, Object data)
    
public  Objectvisit(Multiply multiply, Object data)
    
public  Objectvisit(Divide divide, Object data)
    
protected  Objectvisit(BinaryExpression expression, Object data, String operator)
    
public  Objectvisit(Function function, Object data)
    
public  Objectvisit(Literal literal, Object data)
     Encodes a literal.
public  Objectvisit(PropertyName propertyName, Object data)
     Encodes a PropertyName in an sql statement.
public  ObjectvisitNullFilter(Object data)
    
public  voidwhere(Filter filter)
     Encodes the WHERE clause of a query.

Field Detail
filterFactory
FilterFactory filterFactory(Code)
Filter factory used to create filters



postFilter
Filter postFilter(Code)
Post-processing filter



sql
StringBuffer sql(Code)
SQl Statement buffer



state
JDBCState state(Code)
The state of the entry to create statements for




Constructor Detail
H2SQLBuilder
public H2SQLBuilder(JDBCState state, FilterFactory filterFactory)(Code)
Creates the sql builder.
Parameters:
  state - The state of the entry the builder will create statements for.
Parameters:
  filterFactory - A factory used to create filter objects.




Method Detail
count
public String count(Filter filter)(Code)
Encodes an entire sql SELECT statement of the form "SELECT count(*) FROM ...".
Parameters:
  filter - The filter describing the where class of the select statement.



create
public String create()(Code)
Encodes an entire "CREATE TABLE" statement.



createTable
public Statement createTable() throws SQLException(Code)



delete
public String delete(Filter filter)(Code)
Encodes an entire sql DELETE statement.

In the event that the filter cannot be entirely encoded, no sql is encoded at all.


Parameters:
  filter - The filter dtermining what is to be deleted.



encode
String encode(CoordinateReferenceSystem crs)(Code)
Helper method to encode a crs. Can we have this on CRS?



featureType
FeatureType featureType()(Code)



from
public void from()(Code)
Encodes the FROM clause of a query.

The encoded sql is of the form 'FROM ', table is generated from H2SQLBuilder.table() .




geometry
protected void geometry(Geometry geometry, String srid, StringBuffer sql)(Code)
Encodes a geometry with a known srid to be used in an sql statement.
Parameters:
  geometry - The geometry to encode.
Parameters:
  srid - The spatial reference id of the geometry
Parameters:
  sql - HTe sql statement buffer



getSQL
public StringBuffer getSQL()(Code)
The String buffer being used to encode the sql statement.



init
protected void init()(Code)
Initializes the state of the encoder.



insert
public String insert(String[] names, Object[] values)(Code)
Encodes an entire sql INSERT statement.
Parameters:
  names - The names of attributes ( columns )
Parameters:
  values - The values to insert



name
protected void name(String raw)(Code)
Encodes a name to be used in an sql statement.

This implementation wraps the name in double quotes.


Parameters:
  raw - The raw name.




nil
protected void nil(StringBuffer sql)(Code)
Encodes nulL to be used in an sql statement.
Parameters:
  sql - The sql statement buffer



select
public String select(Query query)(Code)
Encodes an entire sql SELECT statement.
Parameters:
  query - The query defining the select.



select
public void select(String[] propertyNames)(Code)
Encodes the select clause of a query.

If propertyNames is null or empty then "*" is used.


Parameters:
  propertyNames - The array of properties / columns in the select.



sortBy
public void sortBy(SortBy[] sortBy)(Code)
Encodes the SORT BY clause of a query.
Parameters:
  sortBy - The elements definining the columns to sort by.



srid
protected void srid(String raw, StringBuffer sql)(Code)
Encodes a srid to be used in an sql statement
Parameters:
  srid - The raw spatial reference id of the geometry
Parameters:
  sql - HTe sql statement buffer



string
protected void string(String raw, StringBuffer sql)(Code)
Encodes a string to be used in an sql statement.
Parameters:
  raw - The raw string.
Parameters:
  sql - The sql statement buffer



table
public void table()(Code)
Encodes the table name of a query.

The table name is obtained from H2SQLBuilder.featureType .




update
public String update(Query query, Object[] values)(Code)
Encodes an entire sql UPDATE statement.

In the event that the query filter cannot be entirly encoded no sql is encoded at all.


Parameters:
  query - The query defining the properties to change and filter.
Parameters:
  values - The new values.



visit
public Object visit(ExcludeFilter exclude, Object data)(Code)



visit
public Object visit(IncludeFilter include, Object data)(Code)



visit
public Object visit(Not not, Object data)(Code)



visit
public Object visit(And and, Object data)(Code)



visit
public Object visit(Or or, Object data)(Code)



visit
protected Object visit(BinaryLogicOperator logic, Object data, String operator)(Code)



visit
public Object visit(Id id, Object data)(Code)



visit
public Object visit(PropertyIsBetween between, Object data)(Code)



visit
public Object visit(PropertyIsEqualTo equalTo, Object data)(Code)



visit
public Object visit(PropertyIsNotEqualTo notEqualTo, Object data)(Code)



visit
public Object visit(PropertyIsGreaterThan greaterThan, Object data)(Code)



visit
public Object visit(PropertyIsGreaterThanOrEqualTo greaterThanOrEqualTo, Object data)(Code)



visit
public Object visit(PropertyIsLessThan lessThan, Object data)(Code)



visit
public Object visit(PropertyIsLessThanOrEqualTo lessThanOrEqualTo, Object data)(Code)



visit
protected Object visit(BinaryComparisonOperator comparison, Object data, String operator)(Code)



visit
public Object visit(PropertyIsLike like, Object data)(Code)



visit
public Object visit(PropertyIsNull isNull, Object data)(Code)



visit
public Object visit(BBOX bbox, Object data)(Code)



visit
protected Object visit(PropertyName name, Geometry geometry, Object data)(Code)



visit
public Object visit(Beyond beyond, Object data)(Code)



visit
public Object visit(DWithin dwithin, Object data)(Code)



visit
protected Object visit(DistanceBufferOperator distance, Object data, String operator, boolean index)(Code)



visit
public Object visit(Disjoint disjoint, Object data)(Code)



visit
public Object visit(Contains contains, Object data)(Code)



visit
public Object visit(Crosses crosses, Object data)(Code)



visit
public Object visit(Equals equals, Object data)(Code)



visit
public Object visit(Intersects intersects, Object data)(Code)



visit
public Object visit(Overlaps overlaps, Object data)(Code)



visit
public Object visit(Touches touches, Object data)(Code)



visit
public Object visit(Within within, Object data)(Code)



visit
protected Object visit(BinarySpatialOperator comparison, Object data, String operator, boolean index)(Code)



visit
public Object visit(NilExpression nil, Object data)(Code)



visit
public Object visit(Add add, Object data)(Code)



visit
public Object visit(Subtract subtract, Object data)(Code)



visit
public Object visit(Multiply multiply, Object data)(Code)



visit
public Object visit(Divide divide, Object data)(Code)



visit
protected Object visit(BinaryExpression expression, Object data, String operator)(Code)



visit
public Object visit(Function function, Object data)(Code)



visit
public Object visit(Literal literal, Object data)(Code)
Encodes a literal.




visit
public Object visit(PropertyName propertyName, Object data)(Code)
Encodes a PropertyName in an sql statement.

If the AttributeType can be infered from H2SQLBuilder.featureType then its name is used directly.

The class binding of the attribute type, or null if unknown.



visitNullFilter
public Object visitNullFilter(Object data)(Code)



where
public void where(Filter filter)(Code)
Encodes the WHERE clause of a query.
Parameters:
  filter - The filter defining the where clause, non-null.



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.