protected abstract class Sql.AbstractQueryCommand
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
sql |
protected java.sql.Statement |
statement |
| Modifier and Type | Method and Description |
|---|---|
void |
closeResources()
After performing the execute operation and making use of its return, it's necessary
to free the resources allocated for the statement.
|
void |
closeResources(java.sql.ResultSet rs)
After performing the execute operation and making use of its return, it's necessary
to free the resources allocated for the statement.
|
protected abstract java.sql.ResultSet |
runQuery(java.sql.Connection connection)
Perform the query.
|
protected final java.lang.String sql
protected java.sql.Statement statement
public final void closeResources()
public final void closeResources(java.sql.ResultSet rs)
rs - allows the caller to conveniently close its resource as wellprotected abstract java.sql.ResultSet runQuery(java.sql.Connection connection)
throws java.sql.SQLException
execute()) method can clean up.
This is the method that encloses the variant part of the code.connection - the connection to usejava.sql.SQLException - if a database error occurs