|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.ims.db.DLIQueryConnection
Fields inherited from interface java.sql.Connection |
TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE |
Constructor Summary | |
protected |
DLIQueryConnection(DLIConnection dliConnection)
Creates a connection with a DL/I database using an existing DLIConnection. |
|
DLIQueryConnection(java.lang.String databaseViewName)
Creates a connection with a DL/I database. |
Method Summary | |
void |
clearWarnings()
|
void |
close()
Closes the associated DLIConnection Object if it is not externally managed, and resets its DLIConnection pointer. |
void |
commit()
This function is not supported |
java.sql.Statement |
createStatement()
Implements the Connection.createStatement() method returning
a DLIStatement object as its parent class Statement . |
java.sql.Statement |
createStatement(int resultSetType,
int resultSetConcurrency)
Implements the Connection.createStatement() method returning
a DLIStatement object as its parent class Statement . |
java.sql.Statement |
createStatement(int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
|
AIB |
getAIB()
Returns the Application Interface Block (AIB) used by the connection. |
boolean |
getAutoCommit()
|
java.lang.String |
getCatalog()
This function is not supported |
DLIConnection |
getDLIConnection()
Returns the DLIConnection associated with the DLIQueryConnection. |
int |
getHoldability()
This function is not supported Retrieves the current holdability of ResultSet objects
created using this Connection object. |
java.sql.DatabaseMetaData |
getMetaData()
|
int |
getTransactionIsolation()
|
java.util.Map |
getTypeMap()
This function is not supported |
java.sql.SQLWarning |
getWarnings()
|
boolean |
isClosed()
|
boolean |
isReadOnly()
|
java.lang.String |
nativeSQL(java.lang.String sql)
|
java.sql.CallableStatement |
prepareCall(java.lang.String sql)
This function is not supported |
java.sql.CallableStatement |
prepareCall(java.lang.String sql,
int resultSetType,
int resultSetConcurrency)
This function is not supported |
java.sql.CallableStatement |
prepareCall(java.lang.String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
This function is not supported Creates a CallableStatement object that will generate
ResultSet objects with the given type and concurrency. |
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql)
Implements the Connection.prepareStatement() method returning
a DLIPreparedStatement object as its parent class
PreparedStatement
Result sets created using the returned PreparedStatement will have
forward-only type and read-only concurrency, by default. |
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql,
int autoGeneratedKeys)
This function is not supported Creates a default PreparedStatement object that has
the capability to retrieve auto-generated keys. |
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql,
int[] columnIndexes)
This function is not supported 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)
Implements the Connection.prepareStatement() method returning
a DLIPreparedStatement object as its parent class
PreparedStatement
Result sets created using the returned PreparedStatement will have
forward-only type and read-only concurrency, by default. |
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
This function is not supported 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)
This function is not supported Creates a default PreparedStatement object capable
of returning the auto-generated keys designated by the given array. |
protected void |
resetPhysicalConnection(DLIConnection dliConnection)
Resets the DLIConnection stored in the object (needed for defered creation of DLIConnection. |
void |
rollback()
This function is not supported |
void |
setAutoCommit(boolean autoCommit)
autoCommit = true is not supported |
void |
setCatalog(java.lang.String catalog)
This function is not supported |
void |
setHoldability(int holdability)
This function is not supported Changes the holdability of ResultSet objects
created using this Connection object to the given
holdability. |
void |
setReadOnly(boolean readOnly)
|
void |
setTransactionIsolation(int level)
|
void |
setTypeMap(java.util.Map map)
This function is not supported |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DLIQueryConnection(java.lang.String databaseViewName)
databaseViewName
- the fully qualified name of the DLIDatabaseView subclass.protected DLIQueryConnection(DLIConnection dliConnection)
dliConnection
- the existing DLIConnectionMethod Detail |
public AIB getAIB()
public DLIConnection getDLIConnection()
protected void resetPhysicalConnection(DLIConnection dliConnection)
public java.sql.Statement createStatement() throws java.sql.SQLException
Connection.createStatement()
method returning
a DLIStatement
object as its parent class Statement
.
Result sets created using the returned Statement
object will by default have forward-only type and read-only concurrency.createStatement
in interface java.sql.Connection
java.sql.SQLException
- if a database access error occurspublic java.sql.PreparedStatement prepareStatement(java.lang.String sql) throws java.sql.SQLException
Connection.prepareStatement()
method returning
a DLIPreparedStatement
object as its parent class
PreparedStatement
Result sets created using the returned PreparedStatement will have
forward-only type and read-only concurrency, by default.prepareStatement
in interface java.sql.Connection
sql
- a SQL statement that may contain one or more '?' IN parameter placeholdersjava.sql.SQLException
- if a database access error occurspublic java.sql.CallableStatement prepareCall(java.lang.String sql) throws java.sql.SQLException
prepareCall
in interface java.sql.Connection
public java.lang.String nativeSQL(java.lang.String sql) throws java.sql.SQLException
nativeSQL
in interface java.sql.Connection
public void setAutoCommit(boolean autoCommit) throws java.sql.SQLException
setAutoCommit
in interface java.sql.Connection
public boolean getAutoCommit() throws java.sql.SQLException
getAutoCommit
in interface java.sql.Connection
public void commit() throws java.sql.SQLException
commit
in interface java.sql.Connection
public void rollback() throws java.sql.SQLException
rollback
in interface java.sql.Connection
public void close() throws java.sql.SQLException
close
in interface java.sql.Connection
public boolean isClosed() throws java.sql.SQLException
isClosed
in interface java.sql.Connection
public java.sql.DatabaseMetaData getMetaData() throws java.sql.SQLException
getMetaData
in interface java.sql.Connection
public void setReadOnly(boolean readOnly) throws java.sql.SQLException
setReadOnly
in interface java.sql.Connection
public boolean isReadOnly() throws java.sql.SQLException
isReadOnly
in interface java.sql.Connection
public void setCatalog(java.lang.String catalog) throws java.sql.SQLException
setCatalog
in interface java.sql.Connection
public java.lang.String getCatalog() throws java.sql.SQLException
getCatalog
in interface java.sql.Connection
public void setTransactionIsolation(int level) throws java.sql.SQLException
setTransactionIsolation
in interface java.sql.Connection
public int getTransactionIsolation() throws java.sql.SQLException
getTransactionIsolation
in interface java.sql.Connection
public java.sql.SQLWarning getWarnings() throws java.sql.SQLException
getWarnings
in interface java.sql.Connection
public void clearWarnings() throws java.sql.SQLException
clearWarnings
in interface java.sql.Connection
public java.sql.Statement createStatement(int resultSetType, int resultSetConcurrency) throws java.sql.SQLException
Connection.createStatement()
method returning
a DLIStatement
object as its parent class Statement
.createStatement
in interface java.sql.Connection
resultSetType
- a result set type; see ResultSet.TYPE_XXXresultSetConcurrency
- a concurrency type; see ResultSet.CONCUR_XXXjava.sql.SQLException
- if a database access error occurspublic java.sql.PreparedStatement prepareStatement(java.lang.String sql, int resultSetType, int resultSetConcurrency) throws java.sql.SQLException
Connection.prepareStatement()
method returning
a DLIPreparedStatement
object as its parent class
PreparedStatement
Result sets created using the returned PreparedStatement will have
forward-only type and read-only concurrency, by default.prepareStatement
in interface java.sql.Connection
sql
- a SQL statement that may contain one or more '?' IN parameter placeholdersresultSetType
- a result set type; see ResultSet.TYPE_XXXresultSetConcurrency
- a concurrency type; see ResultSet.CONCUR_XXXjava.sql.SQLException
- if a database access error occurspublic java.sql.CallableStatement prepareCall(java.lang.String sql, int resultSetType, int resultSetConcurrency) throws java.sql.SQLException
prepareCall
in interface java.sql.Connection
public java.util.Map getTypeMap() throws java.sql.SQLException
getTypeMap
in interface java.sql.Connection
public void setTypeMap(java.util.Map map) throws java.sql.SQLException
setTypeMap
in interface java.sql.Connection
public void setHoldability(int holdability) throws java.sql.SQLException
ResultSet
objects
created using this Connection
object to the given
holdability.holdability
- 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 supportedgetHoldability()
,
ResultSet
public int getHoldability() throws java.sql.SQLException
ResultSet
objects
created using this Connection
object.ResultSet.HOLD_CURSORS_OVER_COMMIT
or
ResultSet.CLOSE_CURSORS_AT_COMMIT
java.sql.SQLException
- if a database access occurssetHoldability(int)
,
ResultSet
public java.sql.Statement createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws java.sql.SQLException
public java.sql.PreparedStatement prepareStatement(java.lang.String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws java.sql.SQLException
PreparedStatement
object that will generate
ResultSet
objects with the given type, concurrency,
and holdability.
This method is the same as the prepareStatement
method
above, but it allows the default result set
type, concurrency, and holdability to be overridden.
sql
- 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_SENSITIVE
resultSetConcurrency
- one of the following ResultSet
constants:
ResultSet.CONCUR_READ_ONLY
or
ResultSet.CONCUR_UPDATABLE
resultSetHoldability
- one of the following ResultSet
constants:
ResultSet.HOLD_CURSORS_OVER_COMMIT
or
ResultSet.CLOSE_CURSORS_AT_COMMIT
PreparedStatement
object, containing the
pre-compiled SQL statement, that will generate
ResultSet
objects with the given type,
concurrency, and holdabilityjava.sql.SQLException
- if a database access error occurs
or the given parameters are not ResultSet
constants indicating type, concurrency, and holdabilityResultSet
public java.sql.CallableStatement prepareCall(java.lang.String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws java.sql.SQLException
CallableStatement
object that will generate
ResultSet
objects with the given type and concurrency.
This method is the same as the prepareCall
method
above, but it allows the default result set
type, result set concurrency type and holdability to be overridden.sql
- 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_SENSITIVE
resultSetConcurrency
- one of the following ResultSet
constants:
ResultSet.CONCUR_READ_ONLY
or
ResultSet.CONCUR_UPDATABLE
resultSetHoldability
- one of the following ResultSet
constants:
ResultSet.HOLD_CURSORS_OVER_COMMIT
or
ResultSet.CLOSE_CURSORS_AT_COMMIT
CallableStatement
object, containing the
pre-compiled SQL statement, that will generate
ResultSet
objects with the given type,
concurrency, and holdabilityjava.sql.SQLException
- if a database access error occurs
or the given parameters are not ResultSet
constants indicating type, concurrency, and holdabilityResultSet
public java.sql.PreparedStatement prepareStatement(java.lang.String sql, int autoGeneratedKeys) throws java.sql.SQLException
PreparedStatement
object that has
the capability to retrieve auto-generated keys. The given constant
tells the driver whether it should make auto-generated keys
available for retrieval. This parameter is ignored if the SQL
statement is not an INSERT
statement.
Note: This method is optimized for handling
parametric SQL statements that benefit from precompilation. If
the driver supports precompilation,
the method prepareStatement
will send
the statement to the database for precompilation. Some drivers
may not support precompilation. In this case, the statement may
not be sent to the database until the PreparedStatement
object is executed. This has no direct effect on users; however, it does
affect which methods throw certain SQLExceptions.
Result sets created using the returned PreparedStatement
object will by default be type TYPE_FORWARD_ONLY
and have a concurrency level of CONCUR_READ_ONLY
.
sql
- an SQL statement that may contain one or more '?' IN
parameter placeholdersautoGeneratedKeys
- a flag indicating whether auto-generated keys
should be returned; one of the following Statement
constants:autoGeneratedKeys
- a flag indicating that auto-generated keys should be returned, one of
Statement.RETURN_GENERATED_KEYS
or
Statement.NO_GENERATED_KEYS
.PreparedStatement
object, containing the
pre-compiled SQL statement, that will have the capability of
returning auto-generated keysjava.sql.SQLException
- if a database access error occurs
or the given parameter is not a Statement
constant indicating whether auto-generated keys should be
returnedpublic java.sql.PreparedStatement prepareStatement(java.lang.String sql, int[] columnIndexes) throws java.sql.SQLException
PreparedStatement
object capable
of returning the auto-generated keys designated by the given array.
This array contains the indexes of the columns in the target
table that contain the auto-generated keys that should be made
available. This array is ignored if the SQL
statement is not an INSERT
statement.
An SQL statement with or without IN parameters can be
pre-compiled and stored in a PreparedStatement
object. This
object can then be used to efficiently execute this statement
multiple times.
Note: This method is optimized for handling
parametric SQL statements that benefit from precompilation. If
the driver supports precompilation,
the method prepareStatement
will send
the statement to the database for precompilation. Some drivers
may not support precompilation. In this case, the statement may
not be sent to the database until the PreparedStatement
object is executed. This has no direct effect on users; however, it does
affect which methods throw certain SQLExceptions.
Result sets created using the returned PreparedStatement
object will by default be type TYPE_FORWARD_ONLY
and have a concurrency level of CONCUR_READ_ONLY
.
sql
- 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 rowsPreparedStatement
object, containing the
pre-compiled statement, that is capable of returning the
auto-generated keys designated by the given array of column
indexesjava.sql.SQLException
- if a database access error occurspublic java.sql.PreparedStatement prepareStatement(java.lang.String sql, java.lang.String[] columnNames) throws java.sql.SQLException
PreparedStatement
object capable
of returning the auto-generated keys designated by the given array.
This array contains the names of the columns in the target
table that contain the auto-generated keys that should be returned.
This array is ignored if the SQL
statement is not an INSERT
statement.
An SQL statement with or without IN parameters can be
pre-compiled and stored in a PreparedStatement
object. This
object can then be used to efficiently execute this statement
multiple times.
Note: This method is optimized for handling
parametric SQL statements that benefit from precompilation. If
the driver supports precompilation,
the method prepareStatement
will send
the statement to the database for precompilation. Some drivers
may not support precompilation. In this case, the statement may
not be sent to the database until the PreparedStatement
object is executed. This has no direct effect on users; however, it does
affect which methods throw certain SQLExceptions.
Result sets created using the returned PreparedStatement
object will by default be type TYPE_FORWARD_ONLY
and have a concurrency level of CONCUR_READ_ONLY
.
sql
- 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 rowsPreparedStatement
object, containing the
pre-compiled statement, that is capable of returning the
auto-generated keys designated by the given array of column
namesjava.sql.SQLException
- if a database access error occurs
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |