|
The Encog Project | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.encog.util.db.RepeatableStatement
public class RepeatableStatement
RepeatableStatement: This class implements a repeatable statement. A repeatable statement is a regular PreparedStatement that can be repeated if the connection fails. Additionally, the repeatable statement maintains a cache of PreparedStatement objects for the threads. This prevents two threads from using the same PreparedStatement at the same time. To obtain a PreparedStatement a thread should call the obtainStatement function. Once the thread no longer needs the statement, the releaseStatement method should be called.
| Nested Class Summary | |
|---|---|
class |
RepeatableStatement.Results
Simple internal class that holds the ResultSet from a query. |
| Constructor Summary | |
|---|---|
RepeatableStatement(java.lang.String sql)
Construct a repeatable statement based on the specified SQL |
|
| Method Summary | |
|---|---|
void |
close()
|
void |
execute(java.lang.Object... parameters)
Execute SQL that does not return a result set. |
RepeatableStatement.Results |
executeQuery(java.lang.Object... parameters)
Execute an SQL query that returns a result set. |
void |
init(RepeatableConnection manager)
Create the statement, so that it is ready to assign PreparedStatements. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RepeatableStatement(java.lang.String sql)
sql - The SQL to base this statement
on.| Method Detail |
|---|
public void close()
public void init(RepeatableConnection manager)
manager - The manager that created this statement.
java.sql.SQLException - Thrown if an exception occurs.public void execute(java.lang.Object... parameters)
parameters - The parameters for this SQL.
WorkloadException - Thrown if the SQL cannot be executed, and
retrying the statement has failed.public RepeatableStatement.Results executeQuery(java.lang.Object... parameters)
parameters - The parameters for this SQL.
WorkloadException - Thrown if the SQL cannot be executed, and
retrying the statement has failed.
|
The Encog Project | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||