Expresso 5-5-0

com.jcorporate.expresso.core.db.config
Class JDBCConfig

java.lang.Object
  extended bycom.jcorporate.expresso.core.db.config.JDBCConfig
Direct Known Subclasses:
ConfigJdbc

public class JDBCConfig
extends Object

A Commons digester class for JDBC section of the standardmaessig Expresso Configuration XML file. This bean defines the conection characteristics to the database in this context

Documentation written by Peter Pilgrim @ Xenonsoft, Tue Feb 05 22:55:00 GMT 2002

All the 'bean' methods here are directly mapped to the <jdbc> section int the expresso-config.xml file. It is recommend that you also look at the Expresso config DTD for a better understanding of the relation of these various parameters.

Since:
Expresso 5.1, its predecessor in the core.misc package since Expresso 4.0
Version:
$Revision: 1.5 $ on $Date: 2003/06/03 06:12:13 $
Author:
Michael Nash, Yves AMAIZO, Peter Pilgrim, Michael Rimov

Field Summary
protected  String cache
           
protected  String checkZeroUpdate
           
protected  String connectFormat
           
protected  String createTableIndicies
           
protected  String dateSelectFormat
           
protected  String dateSelectFunction
           
protected  String dateTimeSelectFormat
           
protected  String dateTimeSelectFunction
           
protected  String dateTimeUpdateFormat
           
protected  String dateTimeUpdateFunction
           
protected  String dateUpdateFormat
           
protected  String dateUpdateFunction
           
protected  String dbStats
           
protected  String dbTest
           
protected  String driver
           
protected  String driverType
           
protected  String escapeHandler
           
protected  EscapeHandler escapeHandlerInstance
           
protected  String limitationPosition
           
protected  String limitationSyntax
           
protected  String login
           
protected  String nativeBlob
           
protected  String nativeBool
           
protected  String password
           
protected  String skipText
           
protected  String timeSelectFormat
           
protected  String timeSelectFunction
           
protected  String timeUpdateFormat
           
protected  String timeUpdateFunction
           
protected  String uniqueRowKeyword
           
protected  String url
           
protected  String useNullOnCreate
           
protected  Vector wildCards
           
 
Constructor Summary
JDBCConfig()
           
 
Method Summary
 void addTypeMapping(TypeMappingConfig newValue)
          Add a type mapping to the system
 void addWildcard(String newWild)
          Adds the specified wildcard entry
 boolean cache()
          Gets the cache enabled boolean flag
 boolean checkZeroUpdate()
          Gets the check zero update version as a boolean
 boolean createTableIndicies()
          Gets the create table indicies boolean value
 boolean dbStats()
          Gets the database statistics flag boolean
 String getCheckZeroUpdate()
          Gets the check zero update version as a boolean
 String getConnectFormat()
          Gets the JDBC connection format style.
 String getDateSelectFormat()
          Gets the date update function string
 String getDateSelectFunction()
          Gets the date select format string
 String getDateTimeSelectFormat()
          Sets the date time select format string
 String getDateTimeSelectFunction()
          Sets the date time select function string
 String getDateTimeUpdateFormat()
          Sets the date time update format string
 String getDateTimeUpdateFunction()
          Sets the date time select function string
 String getDateUpdateFormat()
          Gets the date update format string
 String getDateUpdateFunction()
          Gets the date update function string
 String getDbTest()
          Retrieves the DB test string
 String getDriver()
          Gets the JDBC Driver class name
 String getDriverType()
          Gets the JDBC Driver Type name
 String getEscapeHandler()
          Get the classname of the current escape handler for this data context
 EscapeHandler getEscapeHandlerClass()
           
 String getLimitationPosition()
          Gets the limitation syntax position string
 String getLimitationSyntax()
          Gets the limitation syntax
 String getLogin()
          Gets the JDBC login account name
 String getPassword()
          Gets the JDBC login password
 String getTimeSelectFormat()
          Gets the time select function string
 String getTimeSelectFunction()
          Gets the time select function string
 String getTimeUpdateFormat()
          Gets the time update format string
 String getTimeUpdateFunction()
          Gets the time update function string
 List getTypeMappings()
          Retrieve a list of all type mappings available.
 Vector getTypeMappingVector()
          Old type mappings style for a Vector to help with migration.
 String getUniqueRowKeyword()
          Gets the unique keyword flag
 String getUrl()
          Gets the JDBC URL
 Vector getWildcards()
          Gets a vector list of wildcard entries
 boolean isNativeBlob()
          Return whether this database type supports native blob types
 boolean isNativeBool()
          Returns whether or not this database supports native boolean datatypes
 void setCache(String newCache)
          Sets the cache enabled boolean flag
 void setCheckZeroUpdate(String newCheckZeroUpdate)
          Set the check zero update version
 void setConnectFormat(String newFormat)
          Sets the JDBC connection format style.
 void setCreateTableIndicies(String newIndicies)
          Sets the create table indicies boolean value
 void setDateSelectFormat(String newFormat)
          Sets the date select format string
 void setDateSelectFunction(String newFunction)
          Sets the date select functon string
 void setDateTimeSelectFormat(String newFormat)
          Sets the date time select format string
 void setDateTimeSelectFunction(String newFunction)
          Sets the date time select function string
 void setDateTimeUpdateFormat(String newFormat)
          Sets the date time update format string
 void setDateTimeUpdateFunction(String newFunction)
          Sets the date time update function string
 void setDateUpdateFormat(String newFormat)
          Sets the date update format string
 void setDateUpdateFunction(String newFunction)
          Sets the date update function string
 void setDbStats(String newStats)
          Sets the database statistics flag boolean
 void setDbTest(String newTest)
          Sets the database test
 void setDriver(String newDriver)
          Sets the JDBC driver class name
 void setDriverType(String newDriverType)
          Sets the JDBC driver Type name
 void setEscapeHandler(String newValue)
          Sets the escape handler for this jdbc connection. ie.
 void setHasBooleanType(String newValue)
          Sets whether or not this JDBC configuration supports a native boolean datatype.
 void setLimitationPosition(String newPos)
          Sets the limitation position string
 void setLimitationSyntax(String newLimit)
          Sets the limitation syntax string
 void setLogin(String newLogin)
          Sets the JDBC login account name
 void setNativeBlob(String newValue)
          Sets whether the database supports the native BLOB datatype, or whether you need binary streams.
 void setPassword(String newPassword)
          Sets the JDBC login password
 void setSkipText(String newSkip)
          Sets the skip text flag
 void setTimeSelectFormat(String newFormat)
          Sets the time select format string
 void setTimeSelectFunction(String newFunction)
          Sets the time select function string
 void setTimeUpdateFormat(String newFormat)
          Sets the time update format string
 void setTimeUpdateFunction(String newFunction)
          Sets the time update function string
 void setTypeMappings(List newValue)
          Set the list of type mappings
 void setUniqueRowKeyword(String newKey)
          Sets the unique keyword flag
 void setUrl(String newUrl)
          Sets the JDBC URL
 void setUseNullOnCreate(String newUseNull)
          Set the flag that specifies if we use the "null" keyword in the create table statement when setting a field which does allow nulls.
 boolean skipText()
          Gets the skip text flag
 boolean useNullOnCreate()
          Get the flag that specifies if we use the "null" keyword in the create table statement when setting a field which does allow nulls.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

driverType

protected String driverType

driver

protected String driver

url

protected String url

connectFormat

protected String connectFormat

login

protected String login

password

protected String password

cache

protected String cache

wildCards

protected Vector wildCards

dateSelectFormat

protected String dateSelectFormat

dateSelectFunction

protected String dateSelectFunction

dateUpdateFormat

protected String dateUpdateFormat

dateUpdateFunction

protected String dateUpdateFunction

timeSelectFormat

protected String timeSelectFormat

timeSelectFunction

protected String timeSelectFunction

timeUpdateFormat

protected String timeUpdateFormat

timeUpdateFunction

protected String timeUpdateFunction

dateTimeSelectFormat

protected String dateTimeSelectFormat

dateTimeSelectFunction

protected String dateTimeSelectFunction

dateTimeUpdateFormat

protected String dateTimeUpdateFormat

dateTimeUpdateFunction

protected String dateTimeUpdateFunction

dbStats

protected String dbStats

dbTest

protected String dbTest

createTableIndicies

protected String createTableIndicies

limitationSyntax

protected String limitationSyntax

limitationPosition

protected String limitationPosition

uniqueRowKeyword

protected String uniqueRowKeyword

skipText

protected String skipText

useNullOnCreate

protected String useNullOnCreate

nativeBool

protected String nativeBool

checkZeroUpdate

protected String checkZeroUpdate

escapeHandler

protected String escapeHandler

escapeHandlerInstance

protected EscapeHandler escapeHandlerInstance

nativeBlob

protected String nativeBlob
Constructor Detail

JDBCConfig

public JDBCConfig()
Method Detail

setSkipText

public void setSkipText(String newSkip)
Sets the skip text flag

Parameters:
newSkip - new Skip boolean value in sstring form

setUseNullOnCreate

public void setUseNullOnCreate(String newUseNull)
Set the flag that specifies if we use the "null" keyword in the create table statement when setting a field which does allow nulls. Some databases insist on this (sybase), others do not allow it (firebird)

Parameters:
newUseNull - checks if we should use the null keyword in dealing with table creation.

useNullOnCreate

public boolean useNullOnCreate()
Get the flag that specifies if we use the "null" keyword in the create table statement when setting a field which does allow nulls. Some databases insist on this (sybase), others do not allow it (firebird)

Returns:
boolean

skipText

public boolean skipText()
Gets the skip text flag

Returns:
boolean

setUniqueRowKeyword

public void setUniqueRowKeyword(String newKey)
Sets the unique keyword flag

Parameters:
newKey - the new string to use for 'unique row' as a keyword for your database

getUniqueRowKeyword

public String getUniqueRowKeyword()
Gets the unique keyword flag

Returns:
java.lang.String

setLimitationSyntax

public void setLimitationSyntax(String newLimit)
Sets the limitation syntax string

Parameters:
newLimit - the limitation syntax string

getLimitationSyntax

public String getLimitationSyntax()
Gets the limitation syntax

Returns:
java.lang.String

setLimitationPosition

public void setLimitationPosition(String newPos)
Sets the limitation position string

Parameters:
newPos - The limitation syntax position string. See the DTD for possible values

getLimitationPosition

public String getLimitationPosition()
Gets the limitation syntax position string

Returns:
java.lang.String

setDbTest

public void setDbTest(String newTest)
Sets the database test

Parameters:
newTest - java.lang.String

getDbTest

public String getDbTest()
Retrieves the DB test string

Returns:
java.lang.String

setDbStats

public void setDbStats(String newStats)
Sets the database statistics flag boolean

Parameters:
newStats - true if you wish to get Database stats

dbStats

public boolean dbStats()
Gets the database statistics flag boolean

Returns:
boolean

setCreateTableIndicies

public void setCreateTableIndicies(String newIndicies)
Sets the create table indicies boolean value

Parameters:
newIndicies - boolean string indicating that database CREATE INDEX statements should be issued to the underlying database on db creation.

createTableIndicies

public boolean createTableIndicies()
Gets the create table indicies boolean value

Returns:
true if DBCreate should issue CREATE INDEX Statements

setDateSelectFormat

public void setDateSelectFormat(String newFormat)
Sets the date select format string

Parameters:
newFormat - The data select format string.

setTimeSelectFormat

public void setTimeSelectFormat(String newFormat)
Sets the time select format string

Parameters:
newFormat - the new time select format string

setDateTimeSelectFormat

public void setDateTimeSelectFormat(String newFormat)
Sets the date time select format string

Parameters:
newFormat - the Date-Time Select format formatting string

setDateUpdateFormat

public void setDateUpdateFormat(String newFormat)
Sets the date update format string

Parameters:
newFormat - the new Date Update format to use

setTimeUpdateFormat

public void setTimeUpdateFormat(String newFormat)
Sets the time update format string

Parameters:
newFormat - the new TimeUpdate format

setDateTimeUpdateFormat

public void setDateTimeUpdateFormat(String newFormat)
Sets the date time update format string

Parameters:
newFormat - the new date time format string for update statements

setDateSelectFunction

public void setDateSelectFunction(String newFunction)
Sets the date select functon string

Parameters:
newFunction - the new format string to use for selecting date types from the database

setTimeSelectFunction

public void setTimeSelectFunction(String newFunction)
Sets the time select function string

Parameters:
newFunction - the new function for formatting time strings for database select statements

setDateTimeSelectFunction

public void setDateTimeSelectFunction(String newFunction)
Sets the date time select function string

Parameters:
newFunction - the new function for date time select statements

setDateUpdateFunction

public void setDateUpdateFunction(String newFunction)
Sets the date update function string

Parameters:
newFunction - the new date update function for UPDATE execution statements

setTimeUpdateFunction

public void setTimeUpdateFunction(String newFunction)
Sets the time update function string

Parameters:
newFunction - the new Time Update function to execute for TIME datatypes for UPDATE execution statements.

setDateTimeUpdateFunction

public void setDateTimeUpdateFunction(String newFunction)
Sets the date time update function string

Parameters:
newFunction - the new date-type update funciton

getDateSelectFormat

public String getDateSelectFormat()
Gets the date update function string

Returns:
java.lang.String

getDateSelectFunction

public String getDateSelectFunction()
Gets the date select format string

Returns:
java.lang.String

getDateUpdateFormat

public String getDateUpdateFormat()
Gets the date update format string

Returns:
java.lang.String

getDateUpdateFunction

public String getDateUpdateFunction()
Gets the date update function string

Returns:
java.lang.String

getTimeSelectFormat

public String getTimeSelectFormat()
Gets the time select function string

Returns:
java.lang.String

getTimeSelectFunction

public String getTimeSelectFunction()
Gets the time select function string

Returns:
java.lang.String

getTimeUpdateFormat

public String getTimeUpdateFormat()
Gets the time update format string

Returns:
java.lang.String

getTimeUpdateFunction

public String getTimeUpdateFunction()
Gets the time update function string

Returns:
java.lang.String

getDateTimeSelectFormat

public String getDateTimeSelectFormat()
Sets the date time select format string

Returns:
java.lang.String

getDateTimeSelectFunction

public String getDateTimeSelectFunction()
Sets the date time select function string

Returns:
java.lang.String

getDateTimeUpdateFormat

public String getDateTimeUpdateFormat()
Sets the date time update format string

Returns:
java.lang.String

getDateTimeUpdateFunction

public String getDateTimeUpdateFunction()
Sets the date time select function string

Returns:
java.lang.STring

setDriver

public void setDriver(String newDriver)
Sets the JDBC driver class name

Parameters:
newDriver - the new driver class name as spefied by the config file

addWildcard

public void addWildcard(String newWild)
Adds the specified wildcard entry

Parameters:
newWild - a new string that denotes wildcard strings for this database

getWildcards

public Vector getWildcards()
Gets a vector list of wildcard entries

Returns:
java.util.Vector of wildcard strings

setDriverType

public void setDriverType(String newDriverType)
Sets the JDBC driver Type name

Parameters:
newDriverType - either "e;datasource"e; or "e;jdbc"e;

getDriverType

public String getDriverType()
Gets the JDBC Driver Type name

Returns:
java.lang.String

getDriver

public String getDriver()
Gets the JDBC Driver class name

Returns:
java.lang.String

setUrl

public void setUrl(String newUrl)
Sets the JDBC URL

Parameters:
newUrl - the new URL for the JDBC connection

getUrl

public String getUrl()
Gets the JDBC URL

Returns:
java.lang.String

setConnectFormat

public void setConnectFormat(String newFormat)
Sets the JDBC connection format style. How does Expresso connect to the data source?

Parameters:
newFormat - number one through 5

getConnectFormat

public String getConnectFormat()
Gets the JDBC connection format style. How does Expresso connect to the data source?

Returns:
java.lang.String

setLogin

public void setLogin(String newLogin)
Sets the JDBC login account name

Parameters:
newLogin - the login to use for JDBC

getLogin

public String getLogin()
Gets the JDBC login account name

Returns:
getLogin

setHasBooleanType

public void setHasBooleanType(String newValue)
Sets whether or not this JDBC configuration supports a native boolean datatype.

Parameters:
newValue - true if your database supports native boolean data types.

setNativeBlob

public void setNativeBlob(String newValue)
Sets whether the database supports the native BLOB datatype, or whether you need binary streams.

Parameters:
newValue - The new value to set.

isNativeBlob

public boolean isNativeBlob()
Return whether this database type supports native blob types

Returns:
boolean true if it supports native blob types.

setEscapeHandler

public void setEscapeHandler(String newValue)
Sets the escape handler for this jdbc connection. ie. What class performs the filtering on the codes to properly process any special characters for the database.

Parameters:
newValue - The new value to set for the escape handler. Must be a valid classname in your class path.

getEscapeHandler

public String getEscapeHandler()
Get the classname of the current escape handler for this data context

Returns:
Classname as java.lang.String

getEscapeHandlerClass

public EscapeHandler getEscapeHandlerClass()

isNativeBool

public boolean isNativeBool()
Returns whether or not this database supports native boolean datatypes

Returns:
true if the database supports boolean datatypes natively

setPassword

public void setPassword(String newPassword)
Sets the JDBC login password

Parameters:
newPassword - the new password to connect to the database

getPassword

public String getPassword()
Gets the JDBC login password

Returns:
java.lang.String

setCache

public void setCache(String newCache)
Sets the cache enabled boolean flag

Parameters:
newCache - true if you want this data context cached

cache

public boolean cache()
Gets the cache enabled boolean flag

Returns:
true if this data context is true

setCheckZeroUpdate

public void setCheckZeroUpdate(String newCheckZeroUpdate)
Set the check zero update version

Parameters:
newCheckZeroUpdate - - a boolean value

getCheckZeroUpdate

public String getCheckZeroUpdate()
Gets the check zero update version as a boolean

Returns:
java.lang.String

checkZeroUpdate

public boolean checkZeroUpdate()
Gets the check zero update version as a boolean

Returns:
true if you are supposed to check for zero update

getTypeMappings

public List getTypeMappings()
Retrieve a list of all type mappings available.

Returns:
java.util.List a list of TypeMappingConfig objects
Since:
Expresso 5.1

getTypeMappingVector

public Vector getTypeMappingVector()
Old type mappings style for a Vector to help with migration. Will eventually be deprecated.

Returns:
java.util.Vector of type mapping objects.

setTypeMappings

public void setTypeMappings(List newValue)
Set the list of type mappings

Parameters:
newValue - a list of TypeMappingConfig objects
Since:
Expresso 5.1

addTypeMapping

public void addTypeMapping(TypeMappingConfig newValue)
Add a type mapping to the system

Parameters:
newValue - a new TypeMappingConfig value.

Expresso 5-5-0

Please see www.jcorporate.com for information about new Expresso releases.