de.topicmapslab.majortom.database.jdbc.postgres.sql99
Class Sql99ConnectionProvider

java.lang.Object
  extended by de.topicmapslab.majortom.database.jdbc.rdbms.RDBMSConnectionProvider
      extended by de.topicmapslab.majortom.database.jdbc.postgres.base.BasePostGreSqlConnectionProvider
          extended by de.topicmapslab.majortom.database.jdbc.postgres.sql99.Sql99ConnectionProvider
All Implemented Interfaces:
IConnectionProvider
Direct Known Subclasses:
PostGreSqlConnectionProvider

public class Sql99ConnectionProvider
extends BasePostGreSqlConnectionProvider

Special connection provider for PostGreSQL.

Author:
Sven Krosse

Field Summary
 
Fields inherited from class de.topicmapslab.majortom.database.jdbc.postgres.base.BasePostGreSqlConnectionProvider
schemaInformation
 
Fields inherited from interface de.topicmapslab.majortom.database.jdbc.model.IConnectionProvider
DATABASE_NOT_EXISTS, STATE_DATABASE_IS_EMPTY, STATE_DATABASE_IS_INVALID, STATE_DATABASE_IS_VALID
 
Constructor Summary
Sql99ConnectionProvider()
          constructor
Sql99ConnectionProvider(java.lang.String host, java.lang.String datatbase, java.lang.String user, java.lang.String password)
          Constructor
 
Method Summary
 void createSchema()
          Method called by the connection provider to initialize the database schema.
protected  java.lang.String getSchemaQuery()
          Returns the SQL query to create the database schema.
 SQL99Session openSession()
          Creating a new session for accessing the database
 
Methods inherited from class de.topicmapslab.majortom.database.jdbc.postgres.base.BasePostGreSqlConnectionProvider
getConnection, getDatabaseState, getDriverClassName, getRdbmsName, setTopicMapStore
 
Methods inherited from class de.topicmapslab.majortom.database.jdbc.rdbms.RDBMSConnectionProvider
close, getConnectionCount, getDatabase, getDatabaseMetaData, getGlobalSession, getHost, getPassword, getSchemaQueries, getTopicMapStore, getUrl, getUser
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Sql99ConnectionProvider

public Sql99ConnectionProvider()
constructor


Sql99ConnectionProvider

public Sql99ConnectionProvider(java.lang.String host,
                               java.lang.String datatbase,
                               java.lang.String user,
                               java.lang.String password)
Constructor

Parameters:
host - the host
database - database
user - the user
password - the password
Method Detail

openSession

public SQL99Session openSession()
Creating a new session for accessing the database

Specified by:
openSession in interface IConnectionProvider
Overrides:
openSession in class RDBMSConnectionProvider
Returns:
the new session

createSchema

public void createSchema()
                  throws java.sql.SQLException
Method called by the connection provider to initialize the database schema.

Specified by:
createSchema in interface IConnectionProvider
Overrides:
createSchema in class RDBMSConnectionProvider
Throws:
java.sql.SQLException

getSchemaQuery

protected java.lang.String getSchemaQuery()
Returns the SQL query to create the database schema.

Overrides:
getSchemaQuery in class RDBMSConnectionProvider
Returns:
the query