Package org.exolab.castor.jdo.engine
Class SQLStatementLoad
- java.lang.Object
-
- org.exolab.castor.jdo.engine.SQLStatementLoad
-
public final class SQLStatementLoad extends java.lang.Object
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
Constructors Constructor Description SQLStatementLoad(SQLEngine engine, PersistenceFactory factory)
Constructor creating new SQLStatementLoad.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
executeStatement(CastorConnection conn, Identity identity, ProposedEntity entity, AccessMode accessMode)
Execute statement to load entity with given identity from database using given JDBC connection.
-
-
-
Constructor Detail
-
SQLStatementLoad
public SQLStatementLoad(SQLEngine engine, PersistenceFactory factory) throws MappingException
Constructor creating new SQLStatementLoad.- Parameters:
engine
- SQLEngine to be used.factory
- PersistenceFactory to be used.- Throws:
MappingException
- If we get into trouble.
-
-
Method Detail
-
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.
-
-