public class PreparedStatementFactory extends CachedIndexFactory
PreparedStatements for an SQL
statement string.
The cached contents are discarded if the database structure has changed since the cache was created.
Execution of the statement in a transaction reflects uncommitted changes in that transaction.
The supertype dictates that connections can be identified by index, but this is slightly complicated and the additional methods rely on transactions instead.
| Constructor and Description |
|---|
PreparedStatementFactory(Database database,
String sql)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
get(int index)
Get either from cache or, failing that, really get it.
|
PreparedStatement |
preparedStatement() |
PreparedStatement |
preparedStatement(PoemTransaction transaction)
Get a new or cached PreparedStatement.
|
ResultSet |
resultSet() |
String |
toString() |
invalidate, invalidatepublic Object get(int index)
get in interface IndexFactoryget in class CachedIndexFactoryindex - the indexCachedIndexFactory.get(int)public PreparedStatement preparedStatement(PoemTransaction transaction)
transaction - the PoemTransaction, can be nullpublic final PreparedStatement preparedStatement()
public final ResultSet resultSet()
public String toString()
toString in class ObjectObject.toString()Copyright © 2000–2021 PanEris. All rights reserved.