S - row class of table that is source of cascadeT - row class of table that is target of cascadepublic class SelectCascadeOperation<S,T> extends CascadeOperation<S,T>
| Constructor and Description |
|---|
SelectCascadeOperation(SormulaField<S,?> targetField,
Table<T> targetTable,
SelectCascade selectCascadeAnnotation)
Constructor used by
SelectOperation. |
| Modifier and Type | Method and Description |
|---|---|
void |
cascade(S sourceRow)
Performs cascade operation.
|
void |
close()
Cleans up by closing any JDBC resources.
|
void |
prepare()
Prepares operation by initializing JDBC statements.
|
protected void |
prepareParameterFields()
Uses reflection to get fields for each of the source class
variables that will be read from source and set as parameters on
cascade operation.
|
protected void |
setParameters(S sourceRow)
cascade(S) invokes this method to set parameters in cascade operation based
upon parameter fields that were created by prepareParameterFields(). |
protected T[] |
toTargetArray(java.util.Collection<T> c) |
createOperation, getTargetField, getTargetTable, isPostpublic SelectCascadeOperation(SormulaField<S,?> targetField, Table<T> targetTable, SelectCascade selectCascadeAnnotation)
SelectOperation.targetField - cascade select operation modifies this fieldtargetTable - cascade select operation is performed on this tableselectCascadeAnnotation - cascade operationpublic void cascade(S sourceRow) throws OperationException
cascade in class CascadeOperation<S,T>sourceRow - row in parent table that was source the cascadeOperationException - if errorpublic void prepare()
throws OperationException
prepare in class CascadeOperation<S,T>OperationException - if errorprotected void prepareParameterFields()
throws OperationException
setParameters(S) is
invoked by cascade(S).OperationException - if errorprotected void setParameters(S sourceRow) throws OperationException
cascade(S) invokes this method to set parameters in cascade operation based
upon parameter fields that were created by prepareParameterFields().
Override for custom parameter initialization.sourceRow - cascade source rowOperationExceptionpublic void close()
throws OperationException
close in interface java.lang.AutoCloseableclose in class CascadeOperation<S,T>OperationException - if errorprotected T[] toTargetArray(java.util.Collection<T> c) throws OperationException
OperationException