org.xorm.datastore.sql
Class SQLConnectionInfo

java.lang.Object
  |
  +--org.xorm.datastore.ConnectionInfo
        |
        +--org.xorm.datastore.sql.SQLConnectionInfo
All Implemented Interfaces:
Configurable, I15d

public class SQLConnectionInfo
extends ConnectionInfo
implements I15d


Field Summary
protected static Logger logger
           
static String OPTION_AUTO_INCREMENT_PRIMARY_KEYS
           
static String OPTION_SEQUENCE_NAME_PATTERN
           
 
Fields inherited from class org.xorm.datastore.ConnectionInfo
connectionDriverName, connectionFactory, connectionFactory2, connectionFactory2Name, connectionFactoryName, connectionPassword, connectionURL, connectionUserName, factory, maxPool, minPool, msWait, properties
 
Fields inherited from interface org.xorm.I15d
I18N
 
Constructor Summary
SQLConnectionInfo()
           
 
Method Summary
 void close()
          Releases the data source associated with this connection info.
 Table describeTable(String tableName)
           
 void finalize()
          Calls close() to release any lingering resources.
 boolean getCheckReturnedConnection()
           
 DataSource getDataSource()
          Returns the DataSource configured with the settings above.
 DatastoreDriver getDriver()
          Returns a new DatastoreDriver that interacts with the datastore described by this ConnectionInfo object.
 boolean getExecuteBatch()
           
 long getIdleCheck()
           
 String getIdleCheckSQL()
           
 String getLastIDStatement()
           
 String getNextIDStatement()
           
 void setCheckReturnedConnection(boolean check)
           
 void setExecuteBatch(boolean value)
           
 void setIdleCheck(long idle)
           
 void setIdleCheckSQL(String sql)
           
 void setIsolationLevelString(String level)
           
 void setLastIDStatement(String lastIDStatement)
           
 void setNextIDStatement(String nextIDStatement)
           
 void setProperties(Properties properties)
           
 
Methods inherited from class org.xorm.datastore.ConnectionInfo
getConnectionDriverName, getConnectionFactory, getConnectionFactory2, getConnectionFactory2Name, getConnectionFactoryName, getConnectionURL, getConnectionUserName, getMaxPool, getMinPool, getMsWait, getProperties, resolveJNDI, setConnectionDriverName, setConnectionFactory, setConnectionFactory2, setConnectionFactory2Name, setConnectionFactoryName, setConnectionPassword, setConnectionURL, setConnectionUserName, setFactory, setMaxPool, setMinPool, setMsWait
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OPTION_AUTO_INCREMENT_PRIMARY_KEYS

public static final String OPTION_AUTO_INCREMENT_PRIMARY_KEYS
See Also:
Constant Field Values

OPTION_SEQUENCE_NAME_PATTERN

public static final String OPTION_SEQUENCE_NAME_PATTERN
See Also:
Constant Field Values

logger

protected static Logger logger
Constructor Detail

SQLConnectionInfo

public SQLConnectionInfo()
Method Detail

setProperties

public void setProperties(Properties properties)
Specified by:
setProperties in interface Configurable
Overrides:
setProperties in class ConnectionInfo

getDataSource

public DataSource getDataSource()
Returns the DataSource configured with the settings above. The DataSource is acquired in the following order:
  1. Casting the ConnectionFactory object to javax.sql.DataSource
  2. Using JNDI to lookup the ConnectionFactoryName object, and casting it to javax.sql.DataSource.
  3. Creating a XORM PooledDataSource instance and configuring it with the other properties (connectionDriverName is required).
If no DataSource can be acquired using any of the above techniques, returns null.


getIdleCheck

public long getIdleCheck()

setIdleCheck

public void setIdleCheck(long idle)

getIdleCheckSQL

public String getIdleCheckSQL()

setIdleCheckSQL

public void setIdleCheckSQL(String sql)

getCheckReturnedConnection

public boolean getCheckReturnedConnection()

setCheckReturnedConnection

public void setCheckReturnedConnection(boolean check)

getExecuteBatch

public boolean getExecuteBatch()

setExecuteBatch

public void setExecuteBatch(boolean value)

getNextIDStatement

public String getNextIDStatement()

setNextIDStatement

public void setNextIDStatement(String nextIDStatement)

getLastIDStatement

public String getLastIDStatement()

setLastIDStatement

public void setLastIDStatement(String lastIDStatement)

setIsolationLevelString

public void setIsolationLevelString(String level)

getDriver

public DatastoreDriver getDriver()
Description copied from class: ConnectionInfo
Returns a new DatastoreDriver that interacts with the datastore described by this ConnectionInfo object. This method must be implemented by subclasses.

Specified by:
getDriver in class ConnectionInfo

close

public void close()
Releases the data source associated with this connection info.

Overrides:
close in class ConnectionInfo

finalize

public void finalize()
Calls close() to release any lingering resources.

Overrides:
finalize in class Object

describeTable

public Table describeTable(String tableName)
Overrides:
describeTable in class ConnectionInfo


$Header: /cvsroot/xorm/xorm/docs/api/org/xorm/datastore/sql/SQLConnectionInfo.html,v 1.6 2004/05/30 08:55:06 wbiggs Exp $