Class JDBCImple_driver
java.lang.Object
com.arjuna.ats.internal.arjuna.objectstore.jdbc.JDBCImple_driver
- Direct Known Subclasses:
h2_driver
,ibm_driver
,jconnect_driver
,mariadb_driver
,microsoft_driver
,mysql_ab_driver
,mysql_driver
,oracle_driver
,postgresql_driver
An object store implementation which uses a JDBC database for maintaining
object states. All states are maintained within a single table.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
allObjUids
(String typeName, InputObjectState state, int match) allObjUids - Given a type name, return an ObjectState that contains all of the uids of objects of that type.boolean
allTypes
(InputObjectState foundTypes) protected abstract void
protected abstract void
checkDropTableException
(Connection connection, SQLException ex) boolean
commit_state
(Uid objUid, String typeName) protected void
createTable
(Statement stmt, String tableName) Can be overridden by implementation-specific code to create the store table.int
currentState
(Uid objUid, String typeName) currentState - determine the current state of an object.int
protected String
boolean
hide_state
(Uid objUid, String typeName) void
initialise
(JDBCAccess jdbcAccess, String tableName, ObjectStoreEnvironmentBean jdbcStoreEnvironmentBean) Set up the store for use.read_state
(Uid objUid, String typeName, int stateType) boolean
remove_state
(Uid objUid, String typeName, int stateType) boolean
reveal_state
(Uid objUid, String typeName) boolean
write_state
(Uid objUid, String typeName, OutputObjectState state, int stateType)
-
Field Details
-
tableName
-
-
Constructor Details
-
JDBCImple_driver
public JDBCImple_driver()
-
-
Method Details
-
commit_state
- Throws:
ObjectStoreException
-
hide_state
- Throws:
ObjectStoreException
-
reveal_state
- Throws:
ObjectStoreException
-
currentState
currentState - determine the current state of an object. State search is ordered OS_UNCOMMITTED, OS_UNCOMMITTED_HIDDEN, OS_COMMITTED, OS_COMMITTED_HIDDEN- Throws:
ObjectStoreException
- - in case the JDBC store cannot be contacted
-
allObjUids
public boolean allObjUids(String typeName, InputObjectState state, int match) throws ObjectStoreException allObjUids - Given a type name, return an ObjectState that contains all of the uids of objects of that type.- Throws:
ObjectStoreException
-
allTypes
- Throws:
ObjectStoreException
-
remove_state
- Throws:
ObjectStoreException
-
read_state
public InputObjectState read_state(Uid objUid, String typeName, int stateType) throws ObjectStoreException - Throws:
ObjectStoreException
-
write_state
public boolean write_state(Uid objUid, String typeName, OutputObjectState state, int stateType) throws ObjectStoreException - Throws:
ObjectStoreException
-
initialise
public void initialise(JDBCAccess jdbcAccess, String tableName, ObjectStoreEnvironmentBean jdbcStoreEnvironmentBean) throws SQLException, NamingException Set up the store for use.- Throws:
NamingException
SQLException
- In case the configured store cannot be connected to
-
createTable
Can be overridden by implementation-specific code to create the store table. Called from initialise() and addTable(), above.- Throws:
SQLException
-
getObjectStateSQLType
-
checkCreateTableError
- Throws:
SQLException
-
checkDropTableException
protected abstract void checkDropTableException(Connection connection, SQLException ex) throws SQLException - Throws:
SQLException
-
getMaxStateSize
public int getMaxStateSize()
-