|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.sormula.operation.cascade.CascadeOperation<S,T> org.sormula.operation.cascade.SelectCascadeOperation<S,T>
S
- row class of table that is source of cascadeT
- row class of table that is target of cascadepublic class SelectCascadeOperation<S,T>
Cascade that selects rows from target table into target field when source operation initiates a cascade.
Constructor Summary | |
---|---|
SelectCascadeOperation(SormulaField<S,?> targetField,
Table<T> targetTable,
SelectCascade selectCascadeAnnotation)
Constructor used by SelectOperation . |
Method Summary | |
---|---|
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)
|
Methods inherited from class org.sormula.operation.cascade.CascadeOperation |
---|
createOperation, getTargetField, getTargetTable, isPost |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public 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 operationMethod Detail |
---|
public void cascade(S sourceRow) throws OperationException
cascade
in class CascadeOperation<S,T>
sourceRow
- row in parent table that was source the cascade
OperationException
- 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 row
OperationException
public void close() throws OperationException
close
in class CascadeOperation<S,T>
OperationException
- if errorprotected T[] toTargetArray(java.util.Collection<T> c) throws OperationException
OperationException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |