com.sag.osami.contextstore.storage.jdbc
Class DerbyDialect

java.lang.Object
  extended by com.sag.osami.contextstore.storage.jdbc.GenericJDBCDialect
      extended by com.sag.osami.contextstore.storage.jdbc.DerbyDialect
All Implemented Interfaces:
DBConstants, IJDBCDialect

public class DerbyDialect
extends GenericJDBCDialect

A JDBC dialect for Derby. It also provides a reasonable default JDBC URL.

See Also:
JDBCStorage, DEFAULT_URL

Field Summary
static java.lang.String DEFAULT_URL
          Default URL for the Derby database.
 
Fields inherited from interface com.sag.osami.contextstore.storage.DBConstants
COL_CTXSTORE_ID, COL_DATA, COL_DATA_CLASS, COL_ID, COL_ORIGINID, COL_TIMESTAMP, COL_TYPE, COLS, TABLE_AND_COLS, TABLE_NAME
 
Constructor Summary
DerbyDialect()
           
 
Method Summary
 java.lang.String createTable()
          Returns the SQL statement for creating the context store table.
 java.lang.String driver()
          Returns the fully qualified class name of the JDBC driver to be used.
 
Methods inherited from class com.sag.osami.contextstore.storage.jdbc.GenericJDBCDialect
createTable, deleteContextEvent, dropTable, idParams, insertContextEvent, loadContextEvent, loadContextEvents, queryLastID, tableExists
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_URL

public static final java.lang.String DEFAULT_URL
Default URL for the Derby database.

On Unix-like systems, the database will be stored in ~/.ContextStore.

On Windows systems, the database will be stored in %APPDATA%/ContextStore.

Constructor Detail

DerbyDialect

public DerbyDialect()
Method Detail

driver

public java.lang.String driver()
Description copied from interface: IJDBCDialect
Returns the fully qualified class name of the JDBC driver to be used.

Returns:
the JDBC driver class name

createTable

public java.lang.String createTable()
Description copied from interface: IJDBCDialect
Returns the SQL statement for creating the context store table.

Be aware that the ID column should not be auto incremented by the database. ID generation is handled by the ContextStore.

Returns:
the create table SQL statement