Package org.exolab.castor.jdo.engine
Class SQLStatementLoad
java.lang.Object
org.exolab.castor.jdo.engine.SQLStatementLoad
SQLStatementLoad class that makes use of select class hierarchy to generate SQL query
structure. Execute method prepares a SQL statement, binds identity values to parameters
of the query, executes it and handles the results of the query.
- Version:
- $Revision: 8778 $ $Date: 2006-04-25 15:08:23 -0600 (Tue, 25 Apr 2006) $
- Author:
- Dennis Butterstein, Ralf Joachim
-
Constructor Summary
ConstructorsConstructorDescriptionSQLStatementLoad
(SQLEngine engine, PersistenceFactory factory) Constructor creating new SQLStatementLoad. -
Method Summary
Modifier and TypeMethodDescriptionvoid
executeStatement
(CastorConnection conn, Identity identity, ProposedEntity entity, AccessMode accessMode) Execute statement to load entity with given identity from database using given JDBC connection.
-
Constructor Details
-
SQLStatementLoad
Constructor creating new SQLStatementLoad.- Parameters:
engine
- SQLEngine to be used.factory
- PersistenceFactory to be used.- Throws:
MappingException
- If we get into trouble.
-
-
Method Details
-
executeStatement
public void executeStatement(CastorConnection conn, Identity identity, ProposedEntity entity, AccessMode accessMode) throws PersistenceException Execute statement to load entity with given identity from database using given JDBC connection.- Parameters:
conn
- CastorConnection holding connection and PersistenceFactory to be used to create statement.identity
- Identity of the object to remove.entity
- The proposed entity to be filled with results.accessMode
- Used to determine if query level locking should be used or not.- Throws:
PersistenceException
- If failed to remove object from database. This could happen if a database access error occurs, type of one of the values to bind is ambiguous or object to be deleted does not exist.
-