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
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 |
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 |
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
SQLConnectionInfo
public SQLConnectionInfo()
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:
- Casting the ConnectionFactory object to javax.sql.DataSource
- Using JNDI to lookup the ConnectionFactoryName object,
and casting it to javax.sql.DataSource.
- 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 $