Class SQLStatementDelete

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

public final class SQLStatementDelete extends 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: 8778 $ $Date: 2006-04-25 15:08:23 -0600 (Tue, 25 Apr 2006) $
Author:
Dennis Butterstein, Ahmad Hassan, Ralf Joachim
  • Constructor Details

    • SQLStatementDelete

      public SQLStatementDelete(SQLEngine engine)
      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.
  • Method Details

    • executeStatement

      public void executeStatement(CastorConnection conn, Identity identity) throws PersistenceException
      Execute statement to remove 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.
      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.