org.castor.cpa.persistence.sql.engine
Class SQLStatementDelete

java.lang.Object
  extended by org.castor.cpa.persistence.sql.engine.SQLStatementDelete

public final class SQLStatementDelete
extends java.lang.Object

SQLStatementDelete class that makes use of delete class hierarchy to generate SQL query structure. Execute method prepares a SQL statement, binds identity values to parameters of the query and executes it.

Version:
$Revision: 8469 $ $Date: 2006-04-25 15:08:23 -0600 (Tue, 25 Apr 2006) $
Author:
Ahmad Hassan, Ralf Joachim

Constructor Summary
SQLStatementDelete(SQLEngine engine, PersistenceFactory factory)
          Constructor.
 
Method Summary
 java.lang.Object executeStatement(java.sql.Connection conn, Identity identity)
          Execute statement to remove 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

SQLStatementDelete

public SQLStatementDelete(SQLEngine engine,
                          PersistenceFactory factory)
Constructor.

Parameters:
engine - SQL engine for all persistence operations at entities of the type this class is responsible for. Holds all required information of the entity type.
factory - Persistence factory for the database engine the entity is persisted in. Used to format the SQL statement.
Method Detail

executeStatement

public java.lang.Object executeStatement(java.sql.Connection conn,
                                         Identity identity)
                                  throws PersistenceException
Execute statement to remove entity with given identity from database using given JDBC connection.

Parameters:
conn - An open JDBC connection.
identity - Identity of the object to remove.
Returns:
Always returns null.
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.


Intalio Inc. (C) 1999-2008. All rights reserved http://www.intalio.com