org.opensubsystems.core.persist.db
Class DatabaseDeleteSingleDataObjectOperation
java.lang.Object
org.opensubsystems.core.persist.db.DatabaseOperation
org.opensubsystems.core.persist.db.DatabaseUpdateOperation
org.opensubsystems.core.persist.db.DatabaseDeleteSingleDataObjectOperation
- All Implemented Interfaces:
- DatabaseOperations
public class DatabaseDeleteSingleDataObjectOperation
- extends DatabaseUpdateOperation
Adapter to simplify writing of database updates which delete single data object,
which takes care of requesting and returning connections, transaction
management, query preparation and exception handling.
- Version:
- $Id: DatabaseDeleteSingleDataObjectOperation.java,v 1.8 2007/01/28 06:54:42 bastafidli Exp $
- Author:
- Julian Legeny
- Code reviewer:
- Miro Halas
- Code reviewed:
- 1.6 2007/01/07 06:14:18 bastafidli
|
Method Summary |
protected void |
performOperation(DatabaseFactoryImpl dbfactory,
java.sql.Connection cntConnection,
java.sql.PreparedStatement pstmQuery)
Define content of this method to perform the database operation using the
provided connection and optional prepared statement. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DatabaseDeleteSingleDataObjectOperation
public DatabaseDeleteSingleDataObjectOperation(DatabaseFactoryImpl factory,
java.lang.String strQuery,
ModifiableDatabaseSchema schema,
int iId,
int iDomainId)
- Copy constructor to use when database update doesn't require any prepared
statement.
- Parameters:
factory - - factory which is executing this operationstrQuery - - sql query that has to be processedschema - - schema to use to execute database dependent operationsiId - - ID of data object to deleteiDomainId - - ID of domain the data object belongs to
performOperation
protected void performOperation(DatabaseFactoryImpl dbfactory,
java.sql.Connection cntConnection,
java.sql.PreparedStatement pstmQuery)
throws OSSException,
java.sql.SQLException
- Define content of this method to perform the database operation using the
provided connection and optional prepared statement.
- Overrides:
performOperation in class DatabaseUpdateOperation
- Parameters:
dbfactory - - database factory used for this operationcntConnection - - ready to use connection to perform the database
operation. No need to return this connection.pstmQuery - - prepared statement for query passed in as a
parameter to the constructor. No need to close
this statement. If no query was passed into
constructor, this will be null.
- Throws:
OSSException - - an error has occured
java.sql.SQLException - - an error has occured
Copyright © 2003 - 2006 OpenSubsystems s.r.o.