org.castor.cpa.persistence.sql.engine
Class SQLStatementUpdateCheck2
java.lang.Object
org.castor.cpa.persistence.sql.engine.SQLStatementUpdateCheck2
public final class SQLStatementUpdateCheck2
- extends 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: 9026 $ $Date: 2011-08-09 00:23:03 +0200 (Di, 09 Aug 2011) $
- Author:
- Assaf Arkin, Thomas Yip, Bruce Snyder, Werner Guttmann, Ralf Joachim, Ahmad Hassan, Dennis Butterstein
|
Method Summary |
void |
updateFailureCheck(CastorConnection 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 |
SQLStatementUpdateCheck2
public SQLStatementUpdateCheck2(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.
updateFailureCheck
public void updateFailureCheck(CastorConnection 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 - CastorConnection holding connection and PersistenceFactory to be used to create
statement.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.
Copyright © 2012. All Rights Reserved.