org.apache.derby.impl.sql.execute
Class DeleteCascadeResultSet
java.lang.Object
org.apache.derby.impl.sql.execute.NoRowsResultSetImpl
org.apache.derby.impl.sql.execute.DMLWriteResultSet
org.apache.derby.impl.sql.execute.DeleteResultSet
org.apache.derby.impl.sql.execute.DeleteCascadeResultSet
- All Implemented Interfaces:
- ResultSet
- public class DeleteCascadeResultSet
- extends DeleteResultSet
Delete the rows from the specified base table and executes delete/update
on dependent tables depending on the referential actions specified.
Note:(beetle:5197) Dependent Resultsets of DeleteCascade Resultset can in
any one of the multiple resultsets generated for the same table because of
multiple foreign key relationship to the same table. At the bind time ,
dependents are binded only once per table.
We can not depend on mainNodeTable Flag to fire actions on dependents,
it should be done based on whether the resultset has dependent resultsets or not.
Fields inherited from class org.apache.derby.impl.sql.execute.DeleteResultSet |
activation, baseRowReadMap, beginExecutionTime, beginTime, cascadeDelete, constantAction, constants, deferredBaseCC, deferredBaseRow, deferredRLRow, deferredSparseRow, endExecutionTime, endTime, fkInfoArray, heapDCOCI, indent, indexDCOCIs, lcc, lockMode, numberOfBaseColumns, numIndexes, rc, resultDescription, row, rowCount, rowHolder, savedSource, source, sourceDepth, streamStorableHeapColIds, subIndent, subqueryTrackingArray, tc |
Methods inherited from class org.apache.derby.impl.sql.execute.DeleteResultSet |
checkRowPosition, close, collectAffectedRows, createDependentSource, doesCommit, evaluateACheckConstraint, evaluateCheckConstraints, fireBeforeTriggers, getAbsoluteRow, getAutoGeneratedKeysResultset, getBeginExecutionTimestamp, getCurrentTimeMillis, getCursorName, getEndExecutionTimestamp, getExecuteTime, getFirstRow, getIndexNameFromCID, getLastRow, getNextRow, getNextRowCore, getPreviousRow, getQueryPlanText, getRelativeRow, getResultDescription, getRowNumber, getSubqueryTrackingArray, getTimeSpent, getWarnings, isClosed, makeDeferredSparseRow, modifiedRowCount, returnsRows, setAfterLastRow, setBeforeFirstRow |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
dependentResultSets
public ResultSet[] dependentResultSets
noDependents
private int noDependents
parentSource
private CursorResultSet parentSource
parentFKInfo
private FKInfo parentFKInfo
fkIndexConglomNumber
private long fkIndexConglomNumber
resultSetId
private java.lang.String resultSetId
mainNodeForTable
private boolean mainNodeForTable
affectedRows
private boolean affectedRows
tempRowHolderId
private int tempRowHolderId
DeleteCascadeResultSet
public DeleteCascadeResultSet(NoPutResultSet source,
Activation activation,
int constantActionItem,
ResultSet[] dependentResultSets,
java.lang.String resultSetId)
throws StandardException
open
public void open()
throws StandardException
- Description copied from interface:
ResultSet
- Needs to be called before the result set will do anything.
Need to call before getNextRow(), or for a result set
that doesn't return rows, this is the call that will
cause all the work to be done.
- Specified by:
open
in interface ResultSet
- Overrides:
open
in class DeleteResultSet
- Throws:
StandardException
- Standard Cloudscape error policy
setup
void setup()
throws StandardException
- Gathers the rows that needs to be deleted/updated
and creates a temporary resulsets that will be passed
as source to its dependent result sets.
- Overrides:
setup
in class DeleteResultSet
- Throws:
StandardException
collectAffectedRows
boolean collectAffectedRows(boolean rowsFound)
throws StandardException
- Throws:
StandardException
fireBeforeTriggers
void fireBeforeTriggers(java.util.Hashtable msht)
throws StandardException
- Throws:
StandardException
fireAfterTriggers
void fireAfterTriggers()
throws StandardException
- Overrides:
fireAfterTriggers
in class DeleteResultSet
- Throws:
StandardException
deleteDeferredRows
void deleteDeferredRows()
throws StandardException
- Overrides:
deleteDeferredRows
in class DeleteResultSet
- Throws:
StandardException
runFkChecker
void runFkChecker(boolean restrictCheckOnly)
throws StandardException
- Overrides:
runFkChecker
in class DeleteResultSet
- Throws:
StandardException
cleanUp
public void cleanUp()
throws StandardException
- Description copied from interface:
ResultSet
- Tells the system to clean up on an error.
- Specified by:
cleanUp
in interface ResultSet
- Overrides:
cleanUp
in class DeleteResultSet
- Throws:
StandardException
- Thrown on error- See Also:
ResultSet.cleanUp()
rowChangerFinish
private void rowChangerFinish()
throws StandardException
- Throws:
StandardException
mergeRowHolders
private void mergeRowHolders(java.util.Hashtable msht)
throws StandardException
- Throws:
StandardException
mergeResultSets
private void mergeResultSets()
throws StandardException
- Throws:
StandardException
finish
public void finish()
throws StandardException
- Description copied from class:
NoRowsResultSetImpl
- doesn't need to do anything, as no calls
are made that need to be restricted once
the result set is 'finished'.
- Specified by:
finish
in interface ResultSet
- Overrides:
finish
in class DeleteResultSet
- Throws:
StandardException
isMultipleDeletePathsExist
private boolean isMultipleDeletePathsExist()
setRowHoldersTypeToUniqueStream
private void setRowHoldersTypeToUniqueStream()
Apache Derby V10.0 Engine Documentation - Copyright © 1997,2004 The Apache Software Foundation or its licensors, as applicable.