public interface DBAccess
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkExists(java.lang.String existsSQL)
Checks the existence of a record using a SQL query.
|
boolean |
checkPreparedExists(java.lang.String existsSQL,
java.lang.Object[] o1)
Checks the existence of a record using a prepared SQL query with bind variables.
|
void |
closeCall()
Closes the default callablestatement.
|
void |
closeCall(java.lang.String name)
Closes a named callablestatement.
|
void |
closeResultSet()
Closes the default resultset.
|
void |
closeResultSet(java.lang.String name)
Closes a named resultset.
|
void |
closeStatement()
Closes the default prepared statement.
|
void |
closeStatement(java.lang.String name)
Closes a named prepared statement.
|
void |
createPreparedResultSet(java.lang.String sql,
java.lang.Object[] objectlist)
Creates a new auto-named result set based on bind variables.
|
void |
createPreparedResultSet(java.lang.String name,
java.lang.String sql,
java.lang.Object[] objectlist)
Creates a new named result set based on bind variables.
|
void |
createResultSet(java.lang.String sql)
Creates a new auto-named result set.
|
void |
createResultSet(java.lang.String name,
java.lang.String sql)
Creates a new named result set.
|
int |
executePreparedUpdate(java.lang.String sql,
java.lang.Object[] objectlist)
Executes a statement (insert, update or delete) based on bind bind variables.
|
void |
executeSQL(java.lang.String sql)
executeSQL Method
|
int |
executeUpdate(java.lang.String sql)
executeUpdate Method
|
java.math.BigDecimal |
getBigDecimal(java.lang.String column)
Returns a column big decimal value from the current record of the default resultset.
|
java.math.BigDecimal |
getBigDecimal(java.lang.String name,
java.lang.String column)
Returns a column big decimal value from the current record of a resultset.
|
java.lang.String |
getBinaryStream(java.lang.String column)
Deprecated.
This method is replaced by getClob to retrieve from nvarchar(max) column
|
java.lang.String |
getBinaryStream(java.lang.String name,
java.lang.String column)
Deprecated.
This method is replaced by getClob to retrieve from nvarchar(max) column
|
java.sql.Blob |
getBlob(java.lang.String column)
Returns a column blob value from the current record of the default resultset.
|
java.sql.Blob |
getBlob(java.lang.String name,
java.lang.String column)
Returns a column blob value from the current record of a resultset.
|
java.lang.String |
getClob(java.lang.String column)
Returns a column clob value from the current record of the default resultset.
|
java.lang.String |
getClob(java.lang.String name,
java.lang.String column)
Returns a column clob value from the current record of a resultset
|
int |
getColumnCount()
getColumnCount Method
|
int |
getColumnCount(java.lang.String name)
getColumnCount Method
|
java.lang.String |
getColumnName(int col)
getColumnName Method
|
java.lang.String |
getColumnName(java.lang.String name,
int col)
getColumnName Method
|
java.sql.Connection |
getConnection()
getConnection Method
|
int |
getCount(java.lang.String countSQL)
Returns an int being the result of a select count(*) type query
|
int |
getInt(java.lang.String column)
Returns a column integer value from the current record of the default resultset.
|
int |
getInt(java.lang.String name,
java.lang.String column)
Returns a column integer value from the current record of a resultset.
|
boolean |
getNext()
Moves to the next record in the objects resultset.
|
boolean |
getNext(java.lang.String name)
Moves to the next record of a resultset.
|
int |
getPreparedCount(java.lang.String countSQL,
java.lang.Object[] o1)
Returns an int being the result of a select count(*) type query
|
int |
getQueryTimeout()
getQueryTimeout Method
|
java.sql.ResultSet |
getResultSet()
getResultSet Method
|
java.sql.ResultSet |
getResultSet(java.lang.String name)
getResultSet Method
|
java.lang.String |
getString(java.lang.String column)
Returns a column string value from the current record of the default resultset.
|
java.lang.String |
getString(java.lang.String name,
java.lang.String column)
Returns a column string value from the current record of a resultset.
|
java.sql.Timestamp |
getTimestamp(java.lang.String column)
Returns a column timestamp value from the current record of the default resultset.
|
java.sql.Timestamp |
getTimestamp(java.lang.String name,
java.lang.String column)
Returns a column timestamp value from the current record of a resultset.
|
java.lang.String |
getValue(java.lang.String column)
Returns a not null string value from the current record of the default resultset.
|
java.lang.String |
getValue(java.lang.String name,
java.lang.String column)
Returns a not null string value from the current record of a resultset.
|
java.lang.String |
hint(java.lang.String table)
Deprecated.
This method is no longer required for SQLServer implementations due to the implementation of row versioning isolation mode
|
boolean |
isOracle()
isOracle Method
|
boolean |
isSqlServer()
isSqlServer Method
|
java.lang.String |
newName()
Returns a unique name that can be used when creating resultsets or prepared statements.
|
java.sql.CallableStatement |
prepareCall(java.lang.String statement)
Prepares a new auto-named callable statement.
|
java.sql.CallableStatement |
prepareCall(java.lang.String name,
java.lang.String statement)
Prepares a new named callable statement.
|
java.sql.PreparedStatement |
prepareStatement(java.lang.String statement)
Prepares a new auto-named callable statement.
|
java.sql.PreparedStatement |
prepareStatement(java.lang.String name,
java.lang.String statement)
Prepares a new named prepared statement.
|
void |
setQueryTimeout(int queryTimeout)
setQueryTimeout Method
|
java.lang.String newName()
boolean checkExists(java.lang.String existsSQL)
throws SapphireException
existsSQL - Query to check existence of a rowSapphireException - Thrown when an unexpected SQL errors occursboolean checkPreparedExists(java.lang.String existsSQL,
java.lang.Object[] o1)
throws SapphireException
existsSQL - Query with bind variables to check existence of a rowo1 - array to holder corresponding bind valuesSapphireException - Thrown when an unexpected SQL errors occursint getCount(java.lang.String countSQL)
throws SapphireException
countSQL - Query of the sort: select count(*) from ...SapphireException - Thrown when an unexpected SQL errors occursint getPreparedCount(java.lang.String countSQL,
java.lang.Object[] o1)
throws SapphireException
countSQL - Query of the sort: select count(*) from ... with bind variable place holders ?...o1 - array to holder corresponding bind valuesSapphireException - Thrown when an unexpected SQL errors occursvoid createResultSet(java.lang.String name,
java.lang.String sql)
throws SapphireException
name - A name for the result set createdsql - Query to generate a result setSapphireException - Thrown when an unexpected SQL errors occursvoid createResultSet(java.lang.String sql)
throws SapphireException
sql - Query to generate a result setSapphireException - Thrown when an unexpected SQL errors occursvoid createPreparedResultSet(java.lang.String sql,
java.lang.Object[] objectlist)
throws SapphireException
sql - Query to generate a result set (including ?s for parameters)objectlist - Array of object corresponding to the ?s in the sql statementSapphireException - Thrown when an unexpected SQL errors occursvoid createPreparedResultSet(java.lang.String name,
java.lang.String sql,
java.lang.Object[] objectlist)
throws SapphireException
name - A name for the result set createdsql - Query to generate a result set (including ?s for parameters)objectlist - Array of object corresponding to the ?s in the sql statementSapphireException - Thrown when an unexpected SQL errors occursjava.sql.CallableStatement prepareCall(java.lang.String name,
java.lang.String statement)
throws SapphireException
name - A name for the callable statement createdstatement - sql to generate a callable statementSapphireException - Thrown when an unexpected SQL errors occursjava.sql.CallableStatement prepareCall(java.lang.String statement)
throws SapphireException
statement - sql to generate a callable statementSapphireException - Thrown when an unexpected SQL errors occursjava.sql.PreparedStatement prepareStatement(java.lang.String name,
java.lang.String statement)
throws SapphireException
name - A name for the prepared statement createdstatement - sql to generate a prepared statementSapphireException - Thrown when an unexpected SQL errors occursjava.sql.PreparedStatement prepareStatement(java.lang.String statement)
throws SapphireException
statement - sql to generate a prepared statementSapphireException - Thrown when an unexpected SQL errors occursboolean getNext(java.lang.String name)
throws SapphireException
name - The name of the result setSapphireException - Thrown when an unexpected SQL errors occursboolean getNext()
throws SapphireException
SapphireException - Thrown when an unexpected SQL errors occursjava.lang.String getString(java.lang.String name,
java.lang.String column)
throws SapphireException
name - The name of the result setname - The name of the column in the result setSapphireException - Thrown when an unexpected SQL errors occursjava.lang.String getString(java.lang.String column)
throws SapphireException
column - The name of the column in the result setSapphireException - Thrown when an unexpected SQL errors occursjava.lang.String getValue(java.lang.String name,
java.lang.String column)
throws SapphireException
name - The name of the result setname - The name of the column in the result setSapphireException - Thrown when an unexpected SQL errors occursjava.lang.String getValue(java.lang.String column)
throws SapphireException
column - The name of the column in the result setSapphireException - Thrown when an unexpected SQL errors occursjava.math.BigDecimal getBigDecimal(java.lang.String name,
java.lang.String column)
throws SapphireException
name - The name of the result setcolumn - The name of the column in the result setSapphireException - Thrown when an unexpected SQL errors occursjava.math.BigDecimal getBigDecimal(java.lang.String column)
throws SapphireException
column - The name of the column in the result setSapphireException - Thrown when an unexpected SQL errors occursint getInt(java.lang.String name,
java.lang.String column)
throws SapphireException
name - The name of the result setname - The name of the column in the result setSapphireException - Thrown when an unexpected SQL errors occursint getInt(java.lang.String column)
throws SapphireException
column - The name of the column in the result setSapphireException - Thrown when an unexpected SQL errors occursjava.sql.Timestamp getTimestamp(java.lang.String name,
java.lang.String column)
throws SapphireException
name - The name of the result setname - The name of the column in the result setSapphireException - Thrown when an unexpected SQL errors occursjava.sql.Timestamp getTimestamp(java.lang.String column)
throws SapphireException
column - The name of the column in the result setSapphireException - Thrown when an unexpected SQL errors occursjava.lang.String getBinaryStream(java.lang.String name,
java.lang.String column)
throws SapphireException
name - column - SapphireExceptionjava.lang.String getBinaryStream(java.lang.String column)
throws SapphireException
column - name of the columnSapphireExceptionjava.sql.Blob getBlob(java.lang.String name,
java.lang.String column)
throws SapphireException
name - The name of the result setname - The name of the column in the result setSapphireException - Thrown when an unexpected SQL errors occursjava.sql.Blob getBlob(java.lang.String column)
throws SapphireException
column - The name of the column in the result setSapphireException - Thrown when an unexpected SQL errors occursjava.lang.String getClob(java.lang.String name,
java.lang.String column)
throws SapphireException
name - The name of the result setname - The name of the column in the result setSapphireException - Thrown when an unexpected SQL errors occursjava.lang.String getClob(java.lang.String column)
throws SapphireException
column - The name of the column in the result setSapphireException - Thrown when an unexpected SQL errors occursvoid closeResultSet(java.lang.String name)
name - The name of the result setvoid closeResultSet()
void closeCall(java.lang.String name)
name - The name of the callablestatementvoid closeCall()
void closeStatement(java.lang.String name)
name - The name of the prepared statementvoid closeStatement()
void executeSQL(java.lang.String sql)
throws SapphireException
sql - DDL statement to be executedSapphireException - Thrown when an unexpected SQL errors occursint executeUpdate(java.lang.String sql)
throws SapphireException
sql - Update statement to be executedSapphireException - Thrown when an unexpected SQL errors occursint getColumnCount(java.lang.String name)
throws SapphireException
name - The name of the result setSapphireException - Thrown when an unexpected SQL errors occursint getColumnCount()
throws SapphireException
SapphireException - Thrown when an unexpected SQL errors occursjava.lang.String getColumnName(java.lang.String name,
int col)
throws SapphireException
name - The name of the result setcol - A column number in the result setSapphireException - Thrown when an unexpected SQL errors occursjava.lang.String getColumnName(int col)
throws SapphireException
col - A column number in the result setSapphireException - Thrown when an unexpected SQL errors occursjava.sql.ResultSet getResultSet()
throws SapphireException
SapphireException - Thrown when the result set name is invalidjava.sql.ResultSet getResultSet(java.lang.String name)
throws SapphireException
name - The name of the result setSapphireException - Thrown when the result set name is invalidjava.sql.Connection getConnection()
int executePreparedUpdate(java.lang.String sql,
java.lang.Object[] objectlist)
throws SapphireException
sql - Statement to execute (including ?s for parameters)objectlist - Array of object corresponding to the ?s in the sql statementSapphireException - Thrown when an unexpected SQL errors occursint getQueryTimeout()
void setQueryTimeout(int queryTimeout)
queryTimeout - Set SQL query or statement to be executed to the time out value in seconds. This overrides the configured system default query time outjava.lang.String hint(java.lang.String table)
table - The table name from the queryboolean isOracle()
boolean isSqlServer()