org.openanzo.common.rdb.container
Class CoreDBConfiguration

java.lang.Object
  extended by org.openanzo.common.rdb.container.CoreDBConfiguration
Direct Known Subclasses:
RDBConfiguration, RepositoryConnectionConfiguration

public class CoreDBConfiguration
extends java.lang.Object

Author:
Matthew Roy ( mroy@cambridgesemantics.com )

Constructor Summary
CoreDBConfiguration()
          Core configuration properties for jdbc connections
 
Method Summary
 java.lang.String getBigInt()
          Get the SQL String for BigInt declaration
 boolean getClearOnStartup()
          Get the clear on startup flag
 java.lang.String getDBContainerName()
          Get the container name
 java.lang.String getDriverClassName()
          Get the driver's class name
 java.lang.String getDropExtras()
          Get the SQL string needed by this database at the end of the standard drop table call
 java.lang.String getFileLocation()
          Get the file_location for file based rdbs
 boolean getForceTempCreation()
          Determine if the database requires a forced creation of temporary tables
 boolean getForceTempTablePurge()
          Determine if connection needs to force a clear on temporary tables
 java.lang.String getIndexSuffix()
          Get the string to add to the end of index creation
 java.lang.String getJdbcUrl()
          Get the JDBC url for connections
 java.lang.String getLiteralFalse()
          Get the string that the database uses to represent FALSE
 java.lang.String getLiteralTrue()
          Get the string that the database uses to represent TRUE
 int getMaxIndexKeyLength()
          Get the max length an index key can be
 int getMaxLongObjectLength()
          Get the max length of a long object
 int getMaxTablenameLength()
          Get the max table name length
 int getNodeCacheSize()
          Get the size of the caches for the ID->Node and Node->ID maps
 java.lang.String getOptimizationString()
          Get the String containing any extra sql text to be added to the end of a query
 java.lang.String getPassword()
          Get the password
 java.lang.String getQuoteChar()
          Get the quote char
 boolean getRequiresUniqueTempNames()
          Determine if the database requires unique temporary table names
 java.lang.String getSessionPrefix()
          Get the sessionPrefix for temporary tables
 java.lang.String getSmallInt()
          Get the SQL String for SmallInt declaration
 java.lang.String getSqlFilename()
          Get the sql filename
 boolean getSupportsFullouterJoins()
          Determine if the db supports full outer joins
 boolean getSupportsIsolation()
          Determine if the database supports transaction isolation modes
 boolean getSupportsSequences()
          Determine if the db supports sequences
 boolean getSupportsTableLocks()
          Determine if the database supports table locks
 boolean getSupportsTableUnLocks()
          Determine if the database supports table unlocks
 boolean getSupportsTempForInsert()
          Determine if the db should use temporary tables during insert operations
 boolean getSupportsTempOnFind()
          Determine if the db should use temporary tables during find operations
 boolean getSupportsWithClause()
          Determine if the database supports the WITH clause
 java.lang.String getTableCreateExtras()
          Get the String containing any extra sql text to be added to the end of a create table call
 java.lang.String getTableLocksExtras()
          Get the string needed at the end of a table lock call
 java.lang.String getTextFieldExtras()
          Get the String containing any extra sql needed as part of a text column definition
 java.lang.String getType()
           
 java.lang.String getUniqueTempName(java.lang.String name, int index)
          Return a temporary table name, with an appended number string if the table requires unique temporary table names
 java.lang.String getUrlPostfix()
          Get the string to add to the end of all jdbc urls
 java.lang.String getUrlPrefix()
          Get the string to add to the start of all jdbc urls
 java.lang.String getUser()
          Get the database user
 boolean getUsesUppercase()
          Determine if the database uses all uppercase table and column names
 boolean getUsesUppercaseTempTables()
          Determine if the database uses all uppercase temporary table and column names
 java.lang.String getVarChar()
          Get the SQL String for VarChar declaration
 void setClearOnStartup(boolean clear)
          Set the clear on startup flag
 void setDBContainerName(java.lang.String containerName)
          Set the container's name
 void setDriverClassName(java.lang.String driver)
          Set the jdbc driver's class name
 void setDropExtras(java.lang.String dropExtras)
          Set the SQL string needed by this database at the end of the standard drop table call
 void setFileLocation(java.lang.String file_location)
          Set the file location for file based rdbs
 void setForceTempCreation(boolean forceTempTableCreation)
          Set if the database requires a forced creation of temporary tables
 void setForceTempTablePurge(boolean forceTempTablePurge)
          Set if connection needs to force a clear on temporary tables
 void setJBDCUrl(java.lang.String url)
          Set the jdbc URL
 void setLiteralFalse(java.lang.String literalFalse)
          Set the string that the database uses to represent FALSE
 void setLiteralTrue(java.lang.String literalTrue)
          Set the string that the database uses to represent TRUE
 void setMaxIndexKeyLength(int max_index_key_length)
          Set the max length an index key can be
 void setMaxLongObjectLength(int max_long_object_length)
          Set the max length of a long object
 void setMaxTablenameLength(int max_tablename_length)
          Set the max table name length
 void setNodeCacheSize(int nodeCacheSize)
          Set the size of the caches for the ID->Node and Node->ID maps
 void setOptimizationString(java.lang.String optimizationString)
          Set the String containing any extra sql text to be added to the end of a query
 void setPassword(java.lang.String password)
          Set the password
 void setQuoteChar(java.lang.String quote_char)
          Set the quote char
 void setRequiresUniqueTempNames(boolean uniqueTempNames)
          Set if the database requires unique temporary table names
 void setSessionPrefix(java.lang.String sessionPrefix)
          Set the sessionPrefix for temporary tables
 void setSqlFilename(java.lang.String sql_filename)
          Set the sql filename
 void setSupportsFullouterJoins(boolean supports_fullouter_joins)
          Set if the db supports full outer joins
 void setSupportsSequences(boolean supports_sequences)
          Set if the database supports sequences
 void setSupportsTableLocks(boolean supportsTableLocks)
          Set if database supports table locks
 void setSupportsTableUnLocks(boolean supportsTableUnLocks)
          Set if database supports table unlocks
 void setSupportsTempForInsert(boolean use_temp_inserts)
          Set if the database should use temporary tables during find operations
 void setSupportsTempOnFind(boolean use_temp_find)
          Set if the database should use temporary tables during find operations
 void setSupportsWithClause(boolean supports_with_clause)
          Set if the database supports the WITH clause
 void setTableCreateExtras(java.lang.String tableCreateExtras)
          Set the String containing any extra sql text to be added to the end of a create table call
 void setTableLocksExtras(java.lang.String tableLocksExtras)
          Set the String needed at the end of a table lock call
 void setTextFieldExtras(java.lang.String textFieldExtras)
          Set the String containing any extra sql needed as part of a text column definition
 void setType(java.lang.String type)
          Set the db type string
 void setUrlPostfix(java.lang.String url_postfix)
          Set the string to add to the end of all jdbc urls
 void setUrlPrefix(java.lang.String url_prefix)
          Set the string to add to the end of all jdbc urls
 void setUser(java.lang.String user)
          Set the database user
 void setUsesUppercase(boolean uses_uppercase)
          Set if the database uses all uppercase table and column names
 void setUsesUppercaseTempTables(boolean uses_uppercase_temptables)
          Set if the database uses all uppercase temporary table and column names
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CoreDBConfiguration

public CoreDBConfiguration()
Core configuration properties for jdbc connections

Method Detail

getClearOnStartup

public boolean getClearOnStartup()
Get the clear on startup flag

Returns:
the clear on startup flag

setClearOnStartup

public void setClearOnStartup(boolean clear)
Set the clear on startup flag

Parameters:
clear - true if the database is should be cleared on start

getDBContainerName

public java.lang.String getDBContainerName()
Get the container name

Returns:
the container name

setDBContainerName

public void setDBContainerName(java.lang.String containerName)
Set the container's name

Parameters:
containerName - the container's name

getDriverClassName

public java.lang.String getDriverClassName()
Get the driver's class name

Returns:
the driver's class name

setDriverClassName

public void setDriverClassName(java.lang.String driver)
Set the jdbc driver's class name

Parameters:
driver - the jdbc driver's class name

getFileLocation

public java.lang.String getFileLocation()
Get the file_location for file based rdbs

Returns:
the file_location for file based rdbs

setFileLocation

public void setFileLocation(java.lang.String file_location)
Set the file location for file based rdbs

Parameters:
file_location - the file_location to set

getMaxIndexKeyLength

public int getMaxIndexKeyLength()
Get the max length an index key can be

Returns:
the max length an index key can be

setMaxIndexKeyLength

public void setMaxIndexKeyLength(int max_index_key_length)
Set the max length an index key can be

Parameters:
max_index_key_length - the max_index_key_length to set

getMaxLongObjectLength

public int getMaxLongObjectLength()
Get the max length of a long object

Returns:
the max length of a long object

setMaxLongObjectLength

public void setMaxLongObjectLength(int max_long_object_length)
Set the max length of a long object

Parameters:
max_long_object_length - the max_long_object_length to set

getMaxTablenameLength

public int getMaxTablenameLength()
Get the max table name length

Returns:
the max table name length

setMaxTablenameLength

public void setMaxTablenameLength(int max_tablename_length)
Set the max table name length

Parameters:
max_tablename_length - the max tablename length to set

getPassword

public java.lang.String getPassword()
Get the password

Returns:
the password

setPassword

public void setPassword(java.lang.String password)
Set the password

Parameters:
password - the password to set

getQuoteChar

public java.lang.String getQuoteChar()
Get the quote char

Returns:
the quote char

setQuoteChar

public void setQuoteChar(java.lang.String quote_char)
Set the quote char

Parameters:
quote_char - the quote char to set

getSqlFilename

public java.lang.String getSqlFilename()
Get the sql filename

Returns:
the sql filename

setSqlFilename

public void setSqlFilename(java.lang.String sql_filename)
Set the sql filename

Parameters:
sql_filename - the sql filename to set

getSupportsFullouterJoins

public boolean getSupportsFullouterJoins()
Determine if the db supports full outer joins

Returns:
true if the db supports full outer joins

setSupportsFullouterJoins

public void setSupportsFullouterJoins(boolean supports_fullouter_joins)
Set if the db supports full outer joins

Parameters:
supports_fullouter_joins - supports full outer joins

getSupportsSequences

public boolean getSupportsSequences()
Determine if the db supports sequences

Returns:
true if the db supports sequences

setSupportsSequences

public void setSupportsSequences(boolean supports_sequences)
Set if the database supports sequences

Parameters:
supports_sequences - flag if the database supports sequences

getSupportsTempOnFind

public boolean getSupportsTempOnFind()
Determine if the db should use temporary tables during find operations

Returns:
true if the db should use temporary tables during find operations

setSupportsTempOnFind

public void setSupportsTempOnFind(boolean use_temp_find)
Set if the database should use temporary tables during find operations

Parameters:
use_temp_find - if the database should use temporary tables during find operations

getSupportsTempForInsert

public boolean getSupportsTempForInsert()
Determine if the db should use temporary tables during insert operations

Returns:
true if the db should use temporary tables during insert operations

setSupportsTempForInsert

public void setSupportsTempForInsert(boolean use_temp_inserts)
Set if the database should use temporary tables during find operations

Parameters:
use_temp_inserts - db should use temporary tables during find operations

getSupportsWithClause

public boolean getSupportsWithClause()
Determine if the database supports the WITH clause

Returns:
true if the database supports the WITH clause

setSupportsWithClause

public void setSupportsWithClause(boolean supports_with_clause)
Set if the database supports the WITH clause

Parameters:
supports_with_clause - db supports the WITH clause

getType

public java.lang.String getType()
Returns:
the db type string

setType

public void setType(java.lang.String type)
Set the db type string

Parameters:
type - the db type

setJBDCUrl

public void setJBDCUrl(java.lang.String url)
Set the jdbc URL

Parameters:
url - the jdbc url

getUrlPostfix

public java.lang.String getUrlPostfix()
Get the string to add to the end of all jdbc urls

Returns:
the string to add to the end of all jdbc urls

setUrlPostfix

public void setUrlPostfix(java.lang.String url_postfix)
Set the string to add to the end of all jdbc urls

Parameters:
url_postfix - the string to add to the end of all jdbc urls

getUrlPrefix

public java.lang.String getUrlPrefix()
Get the string to add to the start of all jdbc urls

Returns:
the string to add to the start of all jdbc urls

setUrlPrefix

public void setUrlPrefix(java.lang.String url_prefix)
Set the string to add to the end of all jdbc urls

Parameters:
url_prefix - the string to add to the end of all jdbc urls

getUser

public java.lang.String getUser()
Get the database user

Returns:
the database user

setUser

public void setUser(java.lang.String user)
Set the database user

Parameters:
user - the username

getUsesUppercase

public boolean getUsesUppercase()
Determine if the database uses all uppercase table and column names

Returns:
true if the database uses all uppercase table and column names

setUsesUppercase

public void setUsesUppercase(boolean uses_uppercase)
Set if the database uses all uppercase table and column names

Parameters:
uses_uppercase - if the database uses all uppercase table and column names

getUsesUppercaseTempTables

public boolean getUsesUppercaseTempTables()
Determine if the database uses all uppercase temporary table and column names

Returns:
true if the database uses all uppercase temporary table and column names

setUsesUppercaseTempTables

public void setUsesUppercaseTempTables(boolean uses_uppercase_temptables)
Set if the database uses all uppercase temporary table and column names

Parameters:
uses_uppercase_temptables - if the database uses all uppercase temporary table and column names

getJdbcUrl

public java.lang.String getJdbcUrl()
Get the JDBC url for connections

Returns:
the JDBC url for connections

getSessionPrefix

public java.lang.String getSessionPrefix()
Get the sessionPrefix for temporary tables

Returns:
the sessionPrefix for temporary tables

setSessionPrefix

public void setSessionPrefix(java.lang.String sessionPrefix)
Set the sessionPrefix for temporary tables

Parameters:
sessionPrefix - the sessionPrefix for temporary tables

getForceTempTablePurge

public boolean getForceTempTablePurge()
Determine if connection needs to force a clear on temporary tables

Returns:
true if connection needs to force a clear on temporary tables

setForceTempTablePurge

public void setForceTempTablePurge(boolean forceTempTablePurge)
Set if connection needs to force a clear on temporary tables

Parameters:
forceTempTablePurge - if connection needs to force a clear on temporary tables

getIndexSuffix

public java.lang.String getIndexSuffix()
Get the string to add to the end of index creation

Returns:
the string to add to the end of index creation

getOptimizationString

public java.lang.String getOptimizationString()
Get the String containing any extra sql text to be added to the end of a query

Returns:
the String containing any extra sql text to be added to the end of a query

setOptimizationString

public void setOptimizationString(java.lang.String optimizationString)
Set the String containing any extra sql text to be added to the end of a query

Parameters:
optimizationString - the String containing any extra sql text to be added to the end of a query

getTableCreateExtras

public java.lang.String getTableCreateExtras()
Get the String containing any extra sql text to be added to the end of a create table call

Returns:
the String containing any extra sql text to be added to the end of a create table call

setTableCreateExtras

public void setTableCreateExtras(java.lang.String tableCreateExtras)
Set the String containing any extra sql text to be added to the end of a create table call

Parameters:
tableCreateExtras - the String containing any extra sql text to be added to the end of a create table call

getTextFieldExtras

public java.lang.String getTextFieldExtras()
Get the String containing any extra sql needed as part of a text column definition

Returns:
the String containing any extra sql needed as part of a text column definition

setTextFieldExtras

public void setTextFieldExtras(java.lang.String textFieldExtras)
Set the String containing any extra sql needed as part of a text column definition

Parameters:
textFieldExtras - the String containing any extra sql needed as part of a text column definition

getSupportsTableLocks

public boolean getSupportsTableLocks()
Determine if the database supports table locks

Returns:
the true if the database supports table locks

setSupportsTableLocks

public void setSupportsTableLocks(boolean supportsTableLocks)
Set if database supports table locks

Parameters:
supportsTableLocks - if database supports table locks

getSupportsTableUnLocks

public boolean getSupportsTableUnLocks()
Determine if the database supports table unlocks

Returns:
true if database supports table unlocks

setSupportsTableUnLocks

public void setSupportsTableUnLocks(boolean supportsTableUnLocks)
Set if database supports table unlocks

Parameters:
supportsTableUnLocks - if database supports table unlocks

getTableLocksExtras

public java.lang.String getTableLocksExtras()
Get the string needed at the end of a table lock call

Returns:
the string needed at the end of a table lock call

setTableLocksExtras

public void setTableLocksExtras(java.lang.String tableLocksExtras)
Set the String needed at the end of a table lock call

Parameters:
tableLocksExtras - the String needed at the end of a table lock call

getSmallInt

public java.lang.String getSmallInt()
Get the SQL String for SmallInt declaration

Returns:
the SQL String for SmallInt declaration

getBigInt

public java.lang.String getBigInt()
Get the SQL String for BigInt declaration

Returns:
the SQL String for BigInt declaration

getVarChar

public java.lang.String getVarChar()
Get the SQL String for VarChar declaration

Returns:
the SQL String for VarChar declaration

getSupportsIsolation

public boolean getSupportsIsolation()
Determine if the database supports transaction isolation modes

Returns:
true if the database supports transaction isolation modes

getRequiresUniqueTempNames

public boolean getRequiresUniqueTempNames()
Determine if the database requires unique temporary table names

Returns:
true if the database requires unique temporary table names

setRequiresUniqueTempNames

public void setRequiresUniqueTempNames(boolean uniqueTempNames)
Set if the database requires unique temporary table names

Parameters:
uniqueTempNames - if the database requires unique temporary table names

getLiteralTrue

public java.lang.String getLiteralTrue()
Get the string that the database uses to represent TRUE

Returns:
the string that the database uses to represent TRUE

setLiteralTrue

public void setLiteralTrue(java.lang.String literalTrue)
Set the string that the database uses to represent TRUE

Parameters:
literalTrue - the string that the database uses to represent TRUE

getLiteralFalse

public java.lang.String getLiteralFalse()
Get the string that the database uses to represent FALSE

Returns:
the string that the database uses to represent FALSE

setLiteralFalse

public void setLiteralFalse(java.lang.String literalFalse)
Set the string that the database uses to represent FALSE

Parameters:
literalFalse - the string that the database uses to represent FALSE

getForceTempCreation

public boolean getForceTempCreation()
Determine if the database requires a forced creation of temporary tables

Returns:
if the database requires a forced creation of temporary tables

setForceTempCreation

public void setForceTempCreation(boolean forceTempTableCreation)
Set if the database requires a forced creation of temporary tables

Parameters:
forceTempTableCreation - if the database requires a forced creation of temporary tables

getDropExtras

public java.lang.String getDropExtras()
Get the SQL string needed by this database at the end of the standard drop table call

Returns:
the SQL string needed by this database at the end of the standard drop table call

setDropExtras

public void setDropExtras(java.lang.String dropExtras)
Set the SQL string needed by this database at the end of the standard drop table call

Parameters:
dropExtras - the SQL string needed by this database at the end of the standard drop table call

getUniqueTempName

public java.lang.String getUniqueTempName(java.lang.String name,
                                          int index)
Return a temporary table name, with an appended number string if the table requires unique temporary table names

Parameters:
name - name of table
index - this occurrence of the temporary table name in the query
Returns:
a temporary table name, with an appended number string if the table requires unique temporary table names

getNodeCacheSize

public int getNodeCacheSize()
Get the size of the caches for the ID->Node and Node->ID maps

Returns:
the nodeCacheSize the size of the caches for the ID->Node and Node->ID maps

setNodeCacheSize

public void setNodeCacheSize(int nodeCacheSize)
Set the size of the caches for the ID->Node and Node->ID maps

Parameters:
nodeCacheSize - the size of the caches for the ID->Node and Node->ID maps


Copyright © 2007 Cambridge Semantics Inc.. All Rights Reserved.