org.castor.cpa.persistence.sql.engine
Class SQLStatementUpdateCheck
java.lang.Object
org.castor.cpa.persistence.sql.engine.SQLStatementUpdateCheck
public final class SQLStatementUpdateCheck
- extends java.lang.Object
SQLStatementUpdatCheck class to check whether the new SQL update statement has failed because
entity has been removed previously from persistent storage or the object has been modified
before. If the object has been modified an ObjectModifiedException and if object has been
deleted an ObjectDeletedException is raised.
- Version:
- $Revision: 8285 $ $Date: 2006-04-25 15:08:23 -0600 (Tue, 25 Apr 2006) $
- Author:
- Assaf Arkin, Thomas Yip, Bruce Snyder, Werner Guttmann, Ralf Joachim, Ahmad Hassan
Method Summary |
void |
updateFailureCheck(java.sql.Connection conn,
Identity identity)
This function checks whether the object specified in the statement has been previously
removed from the persistent storage or has been modified. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SQLStatementUpdateCheck
public SQLStatementUpdateCheck(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.
updateFailureCheck
public void updateFailureCheck(java.sql.Connection conn,
Identity identity)
throws PersistenceException
- This function checks whether the object specified in the statement has been previously
removed from the persistent storage or has been modified. If the object has been modified
an ObjectModifiedException and if object has been deleted an ObjectDeletedException is
raised.
- Parameters:
conn
- An Open JDBC Connection.identity
- Identity of the object to check for availability.
- Throws:
PersistenceException
- If a database access error occurs, identity size mismatches,
column length mismatches, ObjectDeletedException if object had been deleted or
ObjectModifiedException if object had been modified before.
Intalio Inc. (C) 1999-2008. All rights reserved http://www.intalio.com