|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectvortex.sql.vortexConnection
public class vortexConnection
A connection (session) with a specific database.
| Constructor Summary | |
|---|---|
vortexConnection(java.lang.String conn,
int port,
java.lang.String host,
java.lang.String service,
java.lang.String environs,
int fbs,
int mcl,
int dbc,
int mlc,
java.lang.String login,
java.lang.String socksHost,
java.lang.String socksPort,
java.util.Properties info)
Constructs a new JDBC connection object for the VORTEX Channel |
|
| Method Summary | |
|---|---|
void |
clearWarnings()
Clear the warning chain. |
void |
close()
Close the database connection. |
void |
commit()
Commit a transaction. |
java.sql.Statement |
createStatement()
Create a SQL statement object. |
java.sql.Statement |
createStatement(int resultSetType,
int resultSetConcurrency)
JDBC 2.0 Creates a Statement object that will generate ResultSet objects with the given type and concurrency. |
java.sql.Statement |
createStatement(int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
Creates a Statement object that will generate ResultSet objects with the given type, concurrency, and holdability. |
void |
disableAutoClose()
Disable closing of statements and result sets. |
boolean |
getAutoClose()
Get the current auto-close state. |
boolean |
getAutoCommit()
Getting auto-commit mode. |
java.lang.String |
getCatalog()
JDBC draft specification method to return the catalog. |
int |
getHoldability()
Retrieves the current holdability of ResultSet objects created using this Connection object. |
java.sql.DatabaseMetaData |
getMetaData()
Return information about the database. |
int |
getTransactionIsolation()
JDBC draft specification method for retrieving the transaction isolation level for the connection. |
java.util.Map<java.lang.String,java.lang.Class<?>> |
getTypeMap()
Get type map. |
java.lang.String |
getURL()
Gives the URL used to connect to the database. |
java.lang.String |
getUser()
Retrieve the user name of the connection. |
java.sql.SQLWarning |
getWarnings()
Retrieving a chain of warnings related to the connection. |
boolean |
isClosed()
Checking the connection status. |
boolean |
isReadOnly()
Checking the read-only status of the connection. |
java.lang.String |
nativeSQL(java.lang.String sql)
Converts the given SQL statement into the system's native SQL grammar. |
java.sql.CallableStatement |
prepareCall(java.lang.String sql)
Create a stored procedure call. |
java.sql.CallableStatement |
prepareCall(java.lang.String sql,
int resultSetType,
int resultSetConcurrency)
Create a stored procedure call. |
java.sql.CallableStatement |
prepareCall(java.lang.String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
Creates a CallableStatement object that will generate ResultSet objects with the given type and concurrency. |
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql)
Create an SQL pre-compiled statement. |
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql,
int autoGeneratedKeys)
Creates a default PreparedStatement object that has the capability to retrieve auto-generated keys. |
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql,
int[] columnIndexes)
Creates a default PreparedStatement object capable of returning the auto-generated keys designated by the given array. |
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql,
int resultSetType,
int resultSetConcurrency)
JDBC 2.0 Creates a PreparedStatement object that will generate ResultSet objects with the given type and concurrency. |
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
Creates a PreparedStatement object that will generate ResultSet objects with the given type, concurrency, and holdability. |
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql,
java.lang.String[] columnNames)
Creates a default PreparedStatement object capable of returning the auto-generated keys designated by the given array. |
void |
releaseSavepoint(java.sql.Savepoint savepoint)
Removes the given Savepoint object from the current transaction. |
void |
rollback()
Rollback a transaction. |
void |
rollback(java.sql.Savepoint savepoint)
Undoes all changes made after the given Savepoint object was set. |
void |
setAutoClose(boolean autoClose)
When a Connection is in auto-close mode all its PreparedStatements, CallableStatements, and ResultSets will be closed when a transaction is committed or rolled back. |
void |
setAutoCommit(boolean b)
Setting the auto-commit mode. |
void |
setCatalog(java.lang.String str)
JDBC draft specification method to select a sub-space of the target database. |
void |
setHoldability(int holdability)
Changes the holdability of ResultSet objects created using this Connection object to the given holdability. |
void |
setReadOnly(boolean b)
Setup the connection in read-only mode. |
java.sql.Savepoint |
setSavepoint()
Creates an unnamed savepoint in the current transaction and returns the new Savepoint object that represents it. |
java.sql.Savepoint |
setSavepoint(java.lang.String name)
Creates a savepoint with the given name in the current transaction and returns the new Savepoint object that represents it. |
void |
setTransactionIsolation(int level)
This method has no meaning to VORTEX since VORTEX support isolation level on a newly opened connection, using TRANSACTION_REPEATABLE_READ only |
void |
setTypeMap(java.util.Map<java.lang.String,java.lang.Class<?>> map)
Set type map. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public vortexConnection(java.lang.String conn,
int port,
java.lang.String host,
java.lang.String service,
java.lang.String environs,
int fbs,
int mcl,
int dbc,
int mlc,
java.lang.String login,
java.lang.String socksHost,
java.lang.String socksPort,
java.util.Properties info)
throws java.sql.SQLException
Constructs a new JDBC connection object for the VORTEX Channel
conn - the database login like 'scott/tiger' for Oracleport - the TCP/IP services port numberhost - the IP address of the host on which the VORTEX server residesservice - the host program on server eg. 'VTX4'environs - the environment variablesfbs - the fetch buffer size for query like 8192mcl - the max DB columns like 256dbc - the number of DB cursorsmlc - the max number of logical cursorslogin - the operating system logon like '(user/password)'socksHost - the IP address or name of the SOCKS serversocksPort - the port of the SOCKS serverinfo - extra configuration parameters
java.sql.SQLException - raised in the event of connection failure
java.sql.SQLException - thrown in the event the connection fails| Method Detail |
|---|
public java.sql.Statement createStatement()
throws java.sql.SQLException
createStatement in interface java.sql.Connectionjava.sql.SQLException - thrown in the event the creation failsConnection.createStatement()
public java.sql.Statement createStatement(int resultSetType,
int resultSetConcurrency)
throws java.sql.SQLException
createStatement in interface java.sql.Connectionjava.sql.SQLException - thrown in the event the creation failsConnection.createStatement()
public java.sql.PreparedStatement prepareStatement(java.lang.String sql)
throws java.sql.SQLException
prepareStatement in interface java.sql.Connectionsql - SQL statement
java.sql.SQLException - gets if the prepare failsConnection.prepareStatement(java.lang.String)
public java.sql.PreparedStatement prepareStatement(java.lang.String sql,
int resultSetType,
int resultSetConcurrency)
throws java.sql.SQLException
prepareStatement in interface java.sql.Connectionsql - SQL statementresultSetType - - a result set type; see ResultSet.TYPE_XXXresultSetConcurrency - - a concurrency type; see ResultSet.CONCUR_XXX
java.sql.SQLException - thrown in the event the creation fails
public java.sql.CallableStatement prepareCall(java.lang.String sql)
throws java.sql.SQLException
Note that stored procedures aren't supported by VORTEXjdbc now, so this method throws an exception.
prepareCall in interface java.sql.Connectionsql - SQL statement
java.sql.SQLException - gets thrown any time this is calledConnection.prepareCall(java.lang.String)
public java.sql.CallableStatement prepareCall(java.lang.String sql,
int resultSetType,
int resultSetConcurrency)
throws java.sql.SQLException
Note that stored procedures aren't supported by VORTEXjdbc now, so this method throws an exception.
prepareCall in interface java.sql.Connectionsql - SQL statementresultSetType - resultSetConcurrency -
java.sql.SQLException - gets thrown any time this is calledConnection.prepareCall(java.lang.String)
public void setTypeMap(java.util.Map<java.lang.String,java.lang.Class<?>> map)
throws java.sql.SQLException
setTypeMap in interface java.sql.Connectionjava.sql.SQLException - Not apply
public java.util.Map<java.lang.String,java.lang.Class<?>> getTypeMap()
throws java.sql.SQLException
getTypeMap in interface java.sql.Connectionjava.sql.SQLException - Not apply
public java.lang.String nativeSQL(java.lang.String sql)
throws java.sql.SQLException
nativeSQL in interface java.sql.Connectionjava.sql.SQLException - if a database access error occurs
public void setAutoCommit(boolean b)
throws java.sql.SQLException
setAutoCommit in interface java.sql.Connectionb - this set auto commit
java.sql.SQLException - Not applyConnection.setAutoCommit(boolean)
public boolean getAutoCommit()
throws java.sql.SQLException
getAutoCommit in interface java.sql.Connectionjava.sql.SQLException - Not applyConnection.getAutoCommit()
public void commit()
throws java.sql.SQLException
commit in interface java.sql.Connectionjava.sql.SQLException - thrown in the event the commit failsConnection.commit()
public void rollback()
throws java.sql.SQLException
rollback in interface java.sql.Connectionjava.sql.SQLException - thrown in the event the rollback failsConnection.rollback()
public void close()
throws java.sql.SQLException
close in interface java.sql.Connectionjava.sql.SQLException - thrown in the event of an cursor close failsConnection.close()
public boolean isClosed()
throws java.sql.SQLException
isClosed in interface java.sql.Connectionjava.sql.SQLException - Not applyConnection.isClosed()
public java.sql.DatabaseMetaData getMetaData()
throws java.sql.SQLException
getMetaData in interface java.sql.Connectionjava.sql.SQLException - thrown if an error occurs reading meta-dataConnection.getMetaData()
public void setReadOnly(boolean b)
throws java.sql.SQLException
setReadOnly in interface java.sql.Connectionb - boolean read-only
java.sql.SQLException - Not applyConnection.setReadOnly(boolean)
public boolean isReadOnly()
throws java.sql.SQLException
isReadOnly in interface java.sql.Connectionjava.sql.SQLException - Not applyConnection.isReadOnly()
public void setCatalog(java.lang.String str)
throws java.sql.SQLException
setCatalog in interface java.sql.Connectionstr - the catalog
java.sql.SQLException - thrown method does not supportConnection.setCatalog(java.lang.String)
public java.lang.String getCatalog()
throws java.sql.SQLException
getCatalog in interface java.sql.Connectionjava.sql.SQLException - thrown method does not supportConnection.getCatalog()
public void setTransactionIsolation(int level)
throws java.sql.SQLException
Note: setTransactionIsolation cannot be called while in the middle of a transaction.
setTransactionIsolation in interface java.sql.Connectionlevel - one of the TRANSACTION_* isolation values with the
exception of TRANSACTION_NONE; some databases may not support
other values
java.sql.SQLException - threw method does not support by VORTEXjdbc.DatabaseMetaData.supportsTransactionIsolationLevel(int)
public int getTransactionIsolation()
throws java.sql.SQLException
VORTEXjdbc return TRANSACTION_REPEATABLE_READ only
getTransactionIsolation in interface java.sql.Connectionjava.sql.SQLException - Not applyConnection.getTransactionIsolation()
public void disableAutoClose()
throws java.sql.SQLException
java.sql.SQLException - Not apply
public void setAutoClose(boolean autoClose)
throws java.sql.SQLException
When auto-close is disabled JDBC attempts to keep all statements and ResultSets open across commits and rollbacks. However the actual behaviour will vary depending on what the underlying database supports. Some databases allow these objects to remain open across commits whereas other databases insist on closing them.
autoClose - true enables auto-close, false disables
auto-close.
java.sql.SQLException - Not applyDatabaseMetaData.supportsOpenCursorsAcrossCommit(),
DatabaseMetaData.supportsOpenCursorsAcrossRollback(),
DatabaseMetaData.supportsOpenStatementsAcrossCommit(),
DatabaseMetaData.supportsOpenStatementsAcrossRollback()
public boolean getAutoClose()
throws java.sql.SQLException
java.sql.SQLException - Not applysetAutoClose(boolean)
public java.sql.SQLWarning getWarnings()
throws java.sql.SQLException
getWarnings in interface java.sql.Connectionjava.sql.SQLException - Not applyConnection.getWarnings()
public void clearWarnings()
throws java.sql.SQLException
clearWarnings in interface java.sql.Connectionjava.sql.SQLException - Not applyConnection.clearWarnings()public final java.lang.String getURL()
public final java.lang.String getUser()
public void setHoldability(int holdability)
throws java.sql.SQLException
setHoldability in interface java.sql.Connectionholdability - - a ResultSet holdability constant; one of
ResultSet.HOLD_CURSORS_OVER_COMMIT or ResultSet.CLOSE_CURSORS_AT_COMMIT
java.sql.SQLException - - if a database access occurs, the given parameter
is not a ResultSet constant indicating holdability, or the given
holdability is not supported
public int getHoldability()
throws java.sql.SQLException
getHoldability in interface java.sql.Connectionjava.sql.SQLException - - if a database access occurs
public java.sql.Savepoint setSavepoint()
throws java.sql.SQLException
setSavepoint in interface java.sql.Connectionjava.sql.SQLException - - if a database access error occurs or this
Connection object is currently in auto-commit mode
public java.sql.Savepoint setSavepoint(java.lang.String name)
throws java.sql.SQLException
setSavepoint in interface java.sql.Connectionname - - a String containing the name of the savepoint
java.sql.SQLException - - if a database access error occurs or this
Connection object is currently in auto-commit mode
public void rollback(java.sql.Savepoint savepoint)
throws java.sql.SQLException
rollback in interface java.sql.Connectionsavepoint - - the Savepoint object to roll back to
java.sql.SQLException - - if a database access error occurs, the
Savepoint object is no longer valid, or this Connection object
is currently in auto-commit mode
public void releaseSavepoint(java.sql.Savepoint savepoint)
throws java.sql.SQLException
releaseSavepoint in interface java.sql.Connectionsavepoint - - the Savepoint object to be removed
java.sql.SQLException - - if a database access error occurs or the
given Savepoint object is not a valid savepoint in the current transaction
public java.sql.Statement createStatement(int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
throws java.sql.SQLException
createStatement in interface java.sql.ConnectionresultSetType - - one of the following ResultSet constants:
ResultSet.TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_INSENSITIVE, or
ResultSet.TYPE_SCROLL_SENSITIVEresultSetConcurrency - - one of the following ResultSet constants:
ResultSet.CONCUR_READ_ONLY or ResultSet.CONCUR_UPDATABLEresultSetHoldability - - one of the following ResultSet constants:
ResultSet.HOLD_CURSORS_OVER_COMMIT or ResultSet.CLOSE_CURSORS_AT_COMMIT
java.sql.SQLException - - if a database access error occurs or the given
parameters are not ResultSet constants indicating type, concurrency,
and holdability
public java.sql.PreparedStatement prepareStatement(java.lang.String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
throws java.sql.SQLException
prepareStatement in interface java.sql.Connectionsql - - a String object that is the SQL statement to be sent to the
database; may contain one or more ? IN parametersresultSetType - - one of the following ResultSet constants:
ResultSet.TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_INSENSITIVE, or
ResultSet.TYPE_SCROLL_SENSITIVEresultSetConcurrency - - one of the following ResultSet constants:
ResultSet.CONCUR_READ_ONLY or ResultSet.CONCUR_UPDATABLEresultSetHoldability - - one of the following ResultSet constants:
ResultSet.HOLD_CURSORS_OVER_COMMIT or ResultSet.CLOSE_CURSORS_AT_COMMIT
java.sql.SQLException - - if a database access error occurs or the given
parameters are not ResultSet constants indicating type, concurrency, and
holdability
public java.sql.CallableStatement prepareCall(java.lang.String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
throws java.sql.SQLException
prepareCall in interface java.sql.Connectionsql - - a String object that is the SQL statement to be sent to the
database; may contain on or more ? parametersresultSetType - - one of the following ResultSet constants:
ResultSet.TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_INSENSITIVE, or
ResultSet.TYPE_SCROLL_SENSITIVEresultSetConcurrency - - one of the following ResultSet constants:
ResultSet.CONCUR_READ_ONLY or ResultSet.CONCUR_UPDATABLEresultSetHoldability - - one of the following ResultSet constants:
ResultSet.HOLD_CURSORS_OVER_COMMIT or ResultSet.CLOSE_CURSORS_AT_COMMIT
java.sql.SQLException - - if a database access error occurs or the given
parameters are not ResultSet constants indicating type, concurrency, and
holdability
public java.sql.PreparedStatement prepareStatement(java.lang.String sql,
int autoGeneratedKeys)
throws java.sql.SQLException
prepareStatement in interface java.sql.Connectionsql - - an SQL statement that may contain one or more '?' IN parameter
placeholdersautoGeneratedKeys - - a flag indicating whether auto-generated keys
should be returned; one of Statement.RETURN_GENERATED_KEYS or
Statement.NO_GENERATED_KEYS
java.sql.SQLException - - if a database access error occurs or the given
parameter is not a Statement constant indicating whether auto-generated
keys should be returned
public java.sql.PreparedStatement prepareStatement(java.lang.String sql,
int[] columnIndexes)
throws java.sql.SQLException
prepareStatement in interface java.sql.Connectionsql - - an SQL statement that may contain one or more '?' IN parameter
placeholderscolumnIndexes - - an array of column indexes indicating the columns
that should be returned from the inserted row or rows
java.sql.SQLException - - if a database access error occurs
public java.sql.PreparedStatement prepareStatement(java.lang.String sql,
java.lang.String[] columnNames)
throws java.sql.SQLException
prepareStatement in interface java.sql.Connectionsql - - an SQL statement that may contain one or more '?' IN parameter
placeholderscolumnNames - - an array of column names indicating the columns that
should be returned from the inserted row or rows
java.sql.SQLException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||