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


java.lang.Object
   org.geotools.data.jdbc.JDBC1DataStore
      org.geotools.data.hsql.HsqlDataStore

HsqlDataStore
public class HsqlDataStore extends JDBC1DataStore implements DataStore(Code)
An implementation of the GeoTools Data Store API for the HSQL database platform.
Please see org.geotools.data.jdbc.JDBC1DataStore class JDBC1DataStore and org.geotools.data.DataStore interface DataStore for DataStore usage details.
author:
   Amr Alam, Refractions Research, aalam@refractions.net



Constructor Summary
public  HsqlDataStore(HsqlConnectionFactory connectionFactory)
     Basic constructor for HsqlDataStore.
public  HsqlDataStore(HsqlConnectionFactory connectionFactory, String databaseSchemaName)
     Constructor for HSQLDataStore where the database schema name is provided.
Parameters:
  connectionFactory - an HSQL org.geotools.data.hsql.HsqlConnectionFactory HsqlConnectionFactory
Parameters:
  databaseSchemaName - the database schema.
public  HsqlDataStore(HsqlConnectionFactory connectionFactory, String databaseSchemaName, String namespace)
     Constructor for HSQLDataStore where the database schema name is provided.
Parameters:
  connectionFactory - an HSQL org.geotools.data.hsql.HsqlConnectionFactory HsqlConnectionFactory
Parameters:
  databaseSchemaName - the database schema.

Method Summary
protected  booleanallowTable(String tablename)
    
protected  AttributeTypebuildAttributeType(ResultSet rs)
     Constructs an AttributeType from a row in a ResultSet.
protected  FIDMapperFactorybuildFIDMapperFactory(JDBCDataStoreConfig config)
    
protected  ConnectioncreateConnection()
    
protected  JDBCFeatureWritercreateFeatureWriter(FeatureReader reader, QueryData queryData)
    
public  voidcreateSchema(FeatureType featureType)
     Adds support for a new featureType to HsqlDataStore.
protected  ConnectiongetConnection(Transaction transaction)
     Gets a connection for the provided transaction.
public  FeatureReadergetFeatureReader(String typeName)
     Provides FeatureReader over the entire contents of typeName.
public  FeatureReadergetFeatureReader(Query query, Transaction transaction)
    
public  FeatureWritergetFeatureWriter(String typeName)
     Utility method for getting a FeatureWriter for modifying existing features, using no feature filtering and auto-committing.
public  FeatureWritergetFeatureWriter(String typeName, Filter filter, Transaction transaction)
     Acquire FeatureWriter for modification of contents specifed by filter.
public  FeatureWritergetFeatureWriterAppend(String typeName)
     Utility method for getting a FeatureWriter for adding new features, using auto-committing.
protected  AttributeIOgetGeometryAttributeIO(AttributeType type, QueryData queryData)
    
public  SQLBuildergetSqlBuilder(String typeName)
    
public  voidremoveSchema(FeatureType featureType)
     Removes support for the featureType schema to HsqlDataStore.
protected  booleanrequireAutoCommit()
    
protected  voidsetAutoCommit(boolean arg0, Connection arg1)
    
 HsqlTransactionStateDiffstate(Transaction transaction)
    


Constructor Detail
HsqlDataStore
public HsqlDataStore(HsqlConnectionFactory connectionFactory) throws IOException(Code)
Basic constructor for HsqlDataStore. Requires creation of a org.geotools.data.hsql.HsqlConnectionFactory HsqlConnectionFactory , which could be done similar to the following:

HsqlConnectionFactory connectionFactory = new HsqlConnectionFactory("dbFileName", "username", "password");
DataStore dataStore = new HsqlDataStore(connectionFactory);

Parameters:
  connectionFactory - an HSQL org.geotools.data.hsql.HsqlConnectionFactory HsqlConnectionFactory
throws:
  IOException - if the database cannot be properly accessed
See Also:   org.geotools.data.hsql.HsqlConnectionFactory



HsqlDataStore
public HsqlDataStore(HsqlConnectionFactory connectionFactory, String databaseSchemaName) throws IOException(Code)
Constructor for HSQLDataStore where the database schema name is provided.
Parameters:
  connectionFactory - an HSQL org.geotools.data.hsql.HsqlConnectionFactory HsqlConnectionFactory
Parameters:
  databaseSchemaName - the database schema. Can be null. See the comments for the parameter schemaPattern in java.sql.DatabaseMetaData.getTables(StringStringStringString[]) DatabaseMetaData.getTables, because databaseSchemaName behaves in the same way.
throws:
  IOException - if the database cannot be properly accessed



HsqlDataStore
public HsqlDataStore(HsqlConnectionFactory connectionFactory, String databaseSchemaName, String namespace) throws IOException(Code)
Constructor for HSQLDataStore where the database schema name is provided.
Parameters:
  connectionFactory - an HSQL org.geotools.data.hsql.HsqlConnectionFactory HsqlConnectionFactory
Parameters:
  databaseSchemaName - the database schema. Can be null. See the comments for the parameter schemaPattern in java.sql.DatabaseMetaData.getTables(StringStringStringString[]) DatabaseMetaData.getTables, because databaseSchemaName behaves in the same way.
Parameters:
  namespace - the namespace for this data store. Can be null, in which case the namespace will simply be the schema name.
throws:
  IOException - if the database cannot be properly accessed




Method Detail
allowTable
protected boolean allowTable(String tablename)(Code)



buildAttributeType
protected AttributeType buildAttributeType(ResultSet rs) throws IOException(Code)
Constructs an AttributeType from a row in a ResultSet. The ResultSet contains the information retrieved by a call to getColumns() on the DatabaseMetaData object. This information can be used to construct an Attribute Type.

In addition to standard SQL types, this method identifies MySQL 4.1's geometric datatypes and creates attribute types accordingly. This happens when the datatype, identified by column 5 of the ResultSet parameter, is equal to java.sql.Types.OTHER. If a Types.OTHER ends up not being geometric, this method simply calls the parent class's buildAttributeType method to do something with it.

Note: Overriding methods must never move the current row pointer in the result set.


Parameters:
  rs - The ResultSet containing the result of aDatabaseMetaData.getColumns call. The AttributeType built from the ResultSet.
throws:
  SQLException - If an error occurs processing the ResultSet.
throws:
  DataSourceException - Provided for overriding classes to wrapexceptions caused by other operations they may perform todetermine additional types. This will only be thrown by thedefault implementation if a type is present that is not presentin the TYPE_MAPPINGS.



buildFIDMapperFactory
protected FIDMapperFactory buildFIDMapperFactory(JDBCDataStoreConfig config)(Code)
Override the default FIDMapperFactory since it doesn't work well with HSQL
See Also:   org.geotools.data.jdbc.JDBCDataStore.buildFIDMapperFactory(org.geotools.data.jdbc.JDBCDataStoreConfig)



createConnection
protected Connection createConnection() throws SQLException(Code)

See Also:   org.geotools.data.jdbc.JDBC1DataStore.createConnection



createFeatureWriter
protected JDBCFeatureWriter createFeatureWriter(FeatureReader reader, QueryData queryData) throws IOException(Code)

See Also:   org.geotools.data.jdbc.JDBC1DataStore.createFeatureWriter(org.geotools.data.FeatureReaderorg.geotools.data.jdbc.QueryData)



createSchema
public void createSchema(FeatureType featureType) throws IOException(Code)
Adds support for a new featureType to HsqlDataStore.

FeatureTypes are stored by typeName (in this case, table name = typeName), an IOException will be thrown if the requested typeName is already in use.


Parameters:
  featureType - FeatureType to be added
throws:
  IOException - If featureType already exists
See Also:   org.geotools.data.DataStore.createSchema(org.geotools.feature.FeatureType)



getConnection
protected Connection getConnection(Transaction transaction) throws IOException(Code)
Gets a connection for the provided transaction.
Parameters:
  transaction - A single use connection.
throws:
  IOException -
throws:
  DataSourceException - If the connection can not be obtained.



getFeatureReader
public FeatureReader getFeatureReader(String typeName) throws IOException(Code)
Provides FeatureReader over the entire contents of typeName.

Implements getFeatureReader contract for AbstractDataStore.


Parameters:
  typeName - a featureReader
throws:
  IOException - If typeName could not be found



getFeatureReader
public FeatureReader getFeatureReader(Query query, Transaction transaction) throws IOException(Code)
Provides a featureReader over the query results using the given transaction
Parameters:
  query - the Query object we want to narrow the results down by
Parameters:
  transaction - the transaction object to be operated on a featureReader based on the given query and transaction
See Also:   org.geotools.data.jdbc.JDBC1DataStore.getFeatureReader(org.geotools.data.Queryorg.geotools.data.Transaction)



getFeatureWriter
public FeatureWriter getFeatureWriter(String typeName) throws IOException(Code)
Utility method for getting a FeatureWriter for modifying existing features, using no feature filtering and auto-committing. Not used for adding new features.
Parameters:
  typeName - the feature type name (the table name) a FeatureWriter for modifying existing features
throws:
  IOException - if the database cannot be properly accessed



getFeatureWriter
public FeatureWriter getFeatureWriter(String typeName, Filter filter, Transaction transaction) throws IOException(Code)
Acquire FeatureWriter for modification of contents specifed by filter.
Parameters:
  typeName -
Parameters:
  filter -
Parameters:
  transaction -
throws:
  IOException - If typeName could not be located
throws:
  NullPointerException - If the provided filter is null
See Also:    org.geotools.data.DataStore#getFeatureWriter(java.lang.String, * org.geotools.filter.Filter, org.geotools.data.Transaction, * org.geotools.data.jdbc.JDBC1DataStore#getFeatureWriter)



getFeatureWriterAppend
public FeatureWriter getFeatureWriterAppend(String typeName) throws IOException(Code)
Utility method for getting a FeatureWriter for adding new features, using auto-committing. Not used for modifying existing features.
Parameters:
  typeName - the feature type name (the table name) a FeatureWriter for adding new features
throws:
  IOException - if the database cannot be properly accessed



getGeometryAttributeIO
protected AttributeIO getGeometryAttributeIO(AttributeType type, QueryData queryData)(Code)

See Also:   org.geotools.data.jdbc.JDBC1DataStore.getGeometryAttributeIO(org.geotools.feature.AttributeType)



getSqlBuilder
public SQLBuilder getSqlBuilder(String typeName) throws IOException(Code)

See Also:   org.geotools.data.jdbc.JDBC1DataStore.getSqlBuilder(java.lang.String)



removeSchema
public void removeSchema(FeatureType featureType)(Code)
Removes support for the featureType schema to HsqlDataStore. (Drops the table)

FeatureTypes are stored by typeName (in this case, table name = typeName).


Parameters:
  featureType - FeatureType to be removed



requireAutoCommit
protected boolean requireAutoCommit()(Code)



setAutoCommit
protected void setAutoCommit(boolean arg0, Connection arg1) throws SQLException(Code)



state
HsqlTransactionStateDiff state(Transaction transaction)(Code)



Fields inherited from org.geotools.data.jdbc.JDBC1DataStore
final protected static Logger LOGGER(Code)(Java Doc)
final public static Map TYPE_MAPPINGS(Code)(Java Doc)
protected boolean allowWriteOnVolatileFIDs(Code)(Java Doc)
final protected JDBCDataStoreConfig config(Code)(Java Doc)
public FeatureListenerManager listenerManager(Code)(Java Doc)
protected String sqlNameEscape(Code)(Java Doc)
protected int transactionIsolation(Code)(Java Doc)
protected FeatureTypeHandler typeHandler(Code)(Java Doc)

Methods inherited from org.geotools.data.jdbc.JDBC1DataStore
public boolean allSameOrder(String[] requestedNames, FeatureType ft)(Code)(Java Doc)
protected boolean allowTable(String tablename)(Code)(Java Doc)
protected String[] attributeNames(FeatureType featureType, Filter filter) throws IOException(Code)(Java Doc)
protected AttributeType buildAttributeType(ResultSet rs) throws IOException(Code)(Java Doc)
protected FIDMapper buildFIDMapper(String typeName, FIDMapperFactory factory) throws IOException(Code)(Java Doc)
protected FIDMapperFactory buildFIDMapperFactory(JDBCDataStoreConfig config)(Code)(Java Doc)
protected FeatureType buildSchema(String typeName, FIDMapper mapper) throws IOException(Code)(Java Doc)
abstract protected Connection createConnection() throws SQLException(Code)(Java Doc)
protected FeatureReader createFeatureReader(FeatureType schema, org.opengis.filter.Filter postFilter, QueryData queryData) throws IOException(Code)(Java Doc)
protected JDBCFeatureWriter createFeatureWriter(FeatureReader reader, QueryData queryData) throws IOException(Code)(Java Doc)
protected LockingManager createLockingManager()(Code)(Java Doc)
public void createSchema(FeatureType featureType) throws IOException(Code)(Java Doc)
protected String determineFidColumnName(String typeName) throws IOException(Code)(Java Doc)
protected int determineSRID(String tableName, String geometryColumnName) throws IOException(Code)(Java Doc)
protected QueryData executeQuery(FeatureTypeInfo featureTypeInfo, String tableName, String sqlQuery, Transaction transaction, boolean forWrite) throws IOException(Code)(Java Doc)
protected QueryData executeQuery(FeatureTypeInfo featureTypeInfo, String tableName, String sqlQuery, Transaction transaction, boolean forWrite, Hints hints) throws IOException(Code)(Java Doc)
protected AttributeIO getAttributeIO(AttributeType type)(Code)(Java Doc)
final protected AttributeType[] getAttributeTypes(String typeName, String[] propertyNames) throws IOException, SchemaException(Code)(Java Doc)
protected int getConcurrency(boolean forWrite)(Code)(Java Doc)
public Connection getConnection(Transaction transaction) throws IOException(Code)(Java Doc)
public Envelope getEnvelope(String typeName)(Code)(Java Doc)
public FIDMapper getFIDMapper(String tableName) throws IOException(Code)(Java Doc)
public FIDMapperFactory getFIDMapperFactory()(Code)(Java Doc)
public FeatureReader getFeatureReader(FeatureType requestType, Filter filter, Transaction transaction) throws IOException(Code)(Java Doc)
public FeatureReader getFeatureReader(Query query, Transaction trans) throws IOException(Code)(Java Doc)
public FeatureSource getFeatureSource(String typeName) throws IOException(Code)(Java Doc)
protected FeatureTypeHandler getFeatureTypeHandler(JDBCDataStoreConfig config) throws IOException(Code)(Java Doc)
public FeatureWriter getFeatureWriter(String typeName, Transaction transaction) throws IOException(Code)(Java Doc)
public FeatureWriter getFeatureWriter(String typeName, org.opengis.filter.Filter filter, Transaction transaction) throws IOException(Code)(Java Doc)
public FeatureWriter getFeatureWriterAppend(String typeName, Transaction transaction) throws IOException(Code)(Java Doc)
abstract protected AttributeIO getGeometryAttributeIO(AttributeType type, QueryData queryData) throws IOException(Code)(Java Doc)
protected JDBCFeatureReader getJDBCFeatureReader(QueryData queryData) throws IOException(Code)(Java Doc)
public LockingManager getLockingManager()(Code)(Java Doc)
public URI getNameSpace()(Code)(Java Doc)
protected int getResultSetType(boolean forWrite)(Code)(Java Doc)
public FeatureType getSchema(String typeName) throws IOException(Code)(Java Doc)
public SQLBuilder getSqlBuilder(String typeName) throws IOException(Code)(Java Doc)
public String getSqlNameEscape()(Code)(Java Doc)
public Set getSupportedHints()(Code)(Java Doc)
public int getTransactionIsolation()(Code)(Java Doc)
public String[] getTypeNames() throws IOException(Code)(Java Doc)
public FeatureSource getView(Query query) throws IOException, SchemaException(Code)(Java Doc)
protected String[] propertyNames(Query query) throws IOException(Code)(Java Doc)
protected boolean requireAutoCommit()(Code)(Java Doc)
protected void setAutoCommit(boolean forWrite, Connection conn) throws SQLException(Code)(Java Doc)
public void setFIDMapper(String featureTypeName, FIDMapper fidMapper)(Code)(Java Doc)
public void setFIDMapperFactory(FIDMapperFactory fmFactory) throws UnsupportedOperationException(Code)(Java Doc)
protected void setSqlNameEscape(String sqlNameEscape)(Code)(Java Doc)
public void setTransactionIsolation(int value)(Code)(Java Doc)
public void updateSchema(String typeName, FeatureType featureType) throws IOException(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.