|
Sun Adapter for Oracle Applications API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.stc.connector.oracleadapter.base.DbConnectorImpl
public class DbConnectorImpl
Connector class implementation for database e*Way.
| Constructor Summary | |
|---|---|
DbConnectorImpl()
Default constructor. |
|
| Method Summary | |
|---|---|
void |
close()
Requests the DbConnector to close a connection and release all the necessary resources. |
void |
commit()
Commits a transaction for the connection. |
java.lang.Object |
connInvoke(java.lang.String methodName,
java.lang.Class[] argsCls,
java.lang.Object[] args)
Invokes a method of the database Connection object of this ETD. |
boolean |
getAutoCommit()
Gets the AutoCommit mode of the connection. |
java.lang.String |
getCatalog()
Gets the catalog name of the connection. |
java.sql.Connection |
getConnection()
Get the database Connection object of this ETD. |
com.stc.connector.appconn.db.StatementAgent |
getInstance(java.lang.Class clsAgent)
Gets an instance of the named StaementAgent. |
com.stc.connector.appconn.db.StatementAgent |
getInstance(java.lang.Class clsAgent,
int iScroll,
int iConcur)
Gets an instance of the named StaementAgent with the specified resultset and concurrency types. |
int |
getTransactionIsolation()
Gets the transaction isolation level for the connection. |
void |
init(javax.sql.DataSource ds,
java.util.Properties props)
Initialize DbConnector |
boolean |
isConnected()
Returns the connection status. |
boolean |
isOpen()
Checks if the DbConnector has a open connection. |
static void |
main(java.lang.String[] args)
Main test program. |
void |
open(javax.sql.DataSource ds,
java.util.Properties props)
Requests the DbConnector object to open a connection and allocate necessary resources. |
void |
release()
Releases all the DbConnector resources. |
void |
requestReset()
Receives a request to reset the data content of the DB ETD. |
void |
rollback()
Rollbacks a transaction for the connection. |
void |
setAutoCommit(boolean bAuto)
Sets the AutoCommit mode of the connection. |
void |
setCatalog(java.lang.String sCatalog)
Sets the catalog name of the connection. |
void |
setConcurrencyToReadOnly()
Set concurrency type of the session to read only. |
void |
setConcurrencyToUpdatable()
Set concurrency type of the session to updatable. |
void |
setRSReadOnly()
Force it to read only so that we can satisfy Clover tests. |
void |
setScrollTypeToForwardOnly()
Set result set type of the session to be forward only. |
void |
setScrollTypeToScrollInsensitive()
Set result set type of the session to be insensitive. |
void |
setScrollTypeToScrollSensitive()
Set result set type of the session to be sensitive. |
void |
setTransactionIsolation(int iLevel)
Sets the transaction isolation level for the connection. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DbConnectorImpl()
| Method Detail |
|---|
public void init(javax.sql.DataSource ds,
java.util.Properties props)
throws java.sql.SQLException
init in interface com.stc.connector.db.DbConnectords - a DataSource object used to establish connection.props - a property object which consists of connecton information.
java.sql.SQLException - owing to session creation.
public void open(javax.sql.DataSource ds,
java.util.Properties props)
throws java.sql.SQLException
open in interface com.stc.connector.db.DbConnectords - a DataSource object used to establish connection.props - a property object which consists of connecton information.
java.sql.SQLException - owing to opening a connection.
public boolean isOpen()
throws java.sql.SQLException
isOpen in interface com.stc.connector.db.DbConnectorjava.sql.SQLException - if errors are encountered during connection checking.public boolean isConnected()
isConnected in interface com.stc.connector.db.DbConnector
public void close()
throws java.sql.SQLException
close in interface com.stc.connector.db.DbConnectorjava.sql.SQLException - when encountering any error in closing a connection.public void release()
release in interface com.stc.connector.db.DbConnector
public com.stc.connector.appconn.db.StatementAgent getInstance(java.lang.Class clsAgent)
throws java.sql.SQLException
getInstance in interface com.stc.connector.db.DbConnectorclsAgent - the class of the StatementAgent.
java.sql.SQLException - if it encounters errors in instantiating the named class.
public com.stc.connector.appconn.db.StatementAgent getInstance(java.lang.Class clsAgent,
int iScroll,
int iConcur)
throws java.sql.SQLException
getInstance in interface com.stc.connector.db.DbConnectorclsAgent - the class of the StatementAgent.iScroll - resultset type; TYPE_FORWARD_ONLY, TYPE_SCROLL_INSENSITIVE, TYPE_SCROLL_SENSITIVEiConcur - concurrency type; CONCUR_READ_ONLY, CONCUR_UPDATABLE
java.sql.SQLException - if it encounters errors in instantiating the named class.
public boolean getAutoCommit()
throws java.sql.SQLException
getAutoCommit in interface com.stc.connector.db.DbConnectorjava.sql.SQLException - if there is any error in getting the AutoCommit mode from the database.
public void setAutoCommit(boolean bAuto)
throws java.sql.SQLException
setAutoCommit in interface com.stc.connector.db.DbConnectorbAuto - a true value will set the connection to be in AutoCommit mode; false otherwise.
java.sql.SQLException - if there is any problem in setting the AutoCommit mode.
public java.lang.String getCatalog()
throws java.sql.SQLException
getCatalog in interface com.stc.connector.db.DbConnectorjava.sql.SQLException - if there is any problem in getting the catalog name.
public void setCatalog(java.lang.String sCatalog)
throws java.sql.SQLException
setCatalog in interface com.stc.connector.db.DbConnectorsCatalog - the desired catalog name.
java.sql.SQLException - if there is any problem in setting the catalog name.
public int getTransactionIsolation()
throws java.sql.SQLException
getTransactionIsolation in interface com.stc.connector.db.DbConnectorjava.sql.SQLException - if there is any error in getting the transaction isolation level.
public void setTransactionIsolation(int iLevel)
throws java.sql.SQLException
setTransactionIsolation in interface com.stc.connector.db.DbConnectoriLevel - a transaction isolation value: TRANSACTION_NONE,
TRANSACTION_READ_UNCOMMITTED, TRANSACTION_READ_COMMITTED,
TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE.
java.sql.SQLException - if there is any problem in setting the transaction isolation level.
public void commit()
throws java.sql.SQLException
commit in interface com.stc.connector.db.DbConnectorjava.sql.SQLException - if there is any problem in commiting a transaction.
public void rollback()
throws java.sql.SQLException
rollback in interface com.stc.connector.db.DbConnectorjava.sql.SQLException - if there is any problem in rolling back a transaction.public void requestReset()
requestReset in interface com.stc.connector.db.DbConnector
public java.lang.Object connInvoke(java.lang.String methodName,
java.lang.Class[] argsCls,
java.lang.Object[] args)
throws java.sql.SQLException
Connection object of this ETD.
connInvoke in interface com.stc.connector.db.DbConnectormethodName - the name of the methodargsCls - Class array for types of formal arguments for method,
in the declared order. Can be null if there are no
formal arguments. However, cannot invoke constructor here.args - Object array of formal arguments for method in the
declared order. Can be null if there are no formal
arguments. However, cannot invoke constructor here.
Object instance resulting from the method invocation. Can be
null if nothing is returned (void return declaration).
java.sql.SQLException - whatever exception the invoked method throws.
public java.sql.Connection getConnection()
throws java.sql.SQLException
Connection object of this ETD.
getConnection in interface com.stc.connector.db.DbConnectorConnection object of this ETD.
java.sql.SQLException - owing to connection retrieval.
public void setScrollTypeToForwardOnly()
throws java.sql.SQLException
setScrollTypeToForwardOnly in interface com.stc.connector.db.DbConnectorjava.sql.SQLException - if there is any problem in setting result set type.
public void setScrollTypeToScrollInsensitive()
throws java.sql.SQLException
setScrollTypeToScrollInsensitive in interface com.stc.connector.db.DbConnectorjava.sql.SQLException - if there is any problem in setting result set type.
public void setScrollTypeToScrollSensitive()
throws java.sql.SQLException
setScrollTypeToScrollSensitive in interface com.stc.connector.db.DbConnectorjava.sql.SQLException - if there is any problem in setting result set type.
public void setConcurrencyToReadOnly()
throws java.sql.SQLException
setConcurrencyToReadOnly in interface com.stc.connector.db.DbConnectorjava.sql.SQLException - if there is any problem in setting concurrency type.
public void setConcurrencyToUpdatable()
throws java.sql.SQLException
setConcurrencyToUpdatable in interface com.stc.connector.db.DbConnectorjava.sql.SQLException - if there is any problem in setting concurrency type.public void setRSReadOnly()
public static void main(java.lang.String[] args)
args - command line arguments.
|
Sun Adapter for Oracle Applications API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||