public class DbPreparedStatement extends Object
Constructor and Description |
---|
DbPreparedStatement(DbSession ls)
Create a DbPreparedStatement from DbSession object
|
DbPreparedStatement(DbSession ls,
String request)
Create a DbPreparedStatement from DbSession object and a request
|
DbPreparedStatement(DbSession ls,
String request,
int nbFetch)
Create a DbPreparedStatement from DbSession object and a request
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the resultSet if any
|
void |
createPrepareStatement(String requestarg)
Create a preparedStatement from request
|
void |
executeQuery()
Execute a Select preparedStatement
|
int |
executeUpdate()
Execute the Update/Insert/Delete preparedStatement
|
DbSession |
getDbSession() |
boolean |
getNext()
Move the cursor to the next result
|
PreparedStatement |
getPreparedStatement() |
ResultSet |
getResultSet() |
boolean |
isReady() |
void |
realClose()
Really close the preparedStatement and the resultSet if any
|
void |
recreatePreparedStatement()
In case of closing database connection, it is possible to reopen a long
term preparedStatement as it was at
creation.
|
String |
toString() |
public DbPreparedStatement(DbSession ls) throws WaarpDatabaseNoConnectionException
ls
- WaarpDatabaseNoConnectionException
public DbPreparedStatement(DbSession ls, String request) throws WaarpDatabaseNoConnectionException, WaarpDatabaseSqlException
ls
- request
- WaarpDatabaseNoConnectionException
WaarpDatabaseSqlException
public DbPreparedStatement(DbSession ls, String request, int nbFetch) throws WaarpDatabaseNoConnectionException, WaarpDatabaseSqlException
ls
- request
- nbFetch
- the number of pre fetch rowsWaarpDatabaseNoConnectionException
WaarpDatabaseSqlException
public final void createPrepareStatement(String requestarg) throws WaarpDatabaseNoConnectionException, WaarpDatabaseSqlException
requestarg
- WaarpDatabaseNoConnectionException
WaarpDatabaseSqlException
public final void recreatePreparedStatement() throws WaarpDatabaseNoConnectionException, WaarpDatabaseSqlException
public final void executeQuery() throws WaarpDatabaseNoConnectionException, WaarpDatabaseSqlException
public final int executeUpdate() throws WaarpDatabaseNoConnectionException, WaarpDatabaseSqlException
WaarpDatabaseNoConnectionException
WaarpDatabaseSqlException
public final void close()
public final void realClose()
public final boolean getNext() throws WaarpDatabaseNoConnectionException, WaarpDatabaseSqlException
WaarpDatabaseNoConnectionException
WaarpDatabaseSqlException
public final ResultSet getResultSet() throws WaarpDatabaseNoConnectionException
WaarpDatabaseNoConnectionException
public final PreparedStatement getPreparedStatement() throws WaarpDatabaseNoConnectionException
WaarpDatabaseNoConnectionException
public final DbSession getDbSession()
public final boolean isReady()
Copyright © 2009–2022 Waarp. All rights reserved.