org.exolab.castor.jdo.engine
Class SQLStatementLoad

java.lang.Object
  extended by org.exolab.castor.jdo.engine.SQLStatementLoad

public final class SQLStatementLoad
extends 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
SQLStatementLoad(SQLEngine engine, PersistenceFactory factory)
          Constructor creating new SQLStatementLoad.
 
Method Summary
 void executeStatement(CastorConnection conn, Identity identity, ProposedEntity entity, AccessMode accessMode)
          Execute statement to load entity with given identity from database using given JDBC connection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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.


Copyright © 2011. All Rights Reserved.