
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 - WaarpDatabaseNoConnectionExceptionpublic DbPreparedStatement(DbSession ls, String request) throws WaarpDatabaseNoConnectionException, WaarpDatabaseSqlException
ls - request - WaarpDatabaseNoConnectionExceptionWaarpDatabaseSqlExceptionpublic DbPreparedStatement(DbSession ls, String request, int nbFetch) throws WaarpDatabaseNoConnectionException, WaarpDatabaseSqlException
ls - request - nbFetch - the number of pre fetch rowsWaarpDatabaseNoConnectionExceptionWaarpDatabaseSqlExceptionpublic final void createPrepareStatement(String requestarg) throws WaarpDatabaseNoConnectionException, WaarpDatabaseSqlException
requestarg - WaarpDatabaseNoConnectionExceptionWaarpDatabaseSqlExceptionpublic final void recreatePreparedStatement()
throws WaarpDatabaseNoConnectionException,
WaarpDatabaseSqlException
public final void executeQuery()
throws WaarpDatabaseNoConnectionException,
WaarpDatabaseSqlException
public final int executeUpdate()
throws WaarpDatabaseNoConnectionException,
WaarpDatabaseSqlException
WaarpDatabaseNoConnectionExceptionWaarpDatabaseSqlExceptionpublic final void close()
public final void realClose()
public final boolean getNext()
throws WaarpDatabaseNoConnectionException,
WaarpDatabaseSqlException
WaarpDatabaseNoConnectionExceptionWaarpDatabaseSqlExceptionpublic final ResultSet getResultSet() throws WaarpDatabaseNoConnectionException
WaarpDatabaseNoConnectionExceptionpublic final PreparedStatement getPreparedStatement() throws WaarpDatabaseNoConnectionException
WaarpDatabaseNoConnectionExceptionpublic final DbSession getDbSession()
public final boolean isReady()
Copyright © 2009–2022 Waarp. All rights reserved.