org.sormula.active.operation
Class ActiveLazySelector<R extends ActiveRecord<R>>

java.lang.Object
  extended by org.sormula.active.operation.ActiveOperation<R,java.lang.Void>
      extended by org.sormula.active.operation.ActiveLazySelector<R>
Type Parameters:
R - record type

public class ActiveLazySelector<R extends ActiveRecord<R>>
extends ActiveOperation<R,java.lang.Void>

Performs lazy loading of active records. Used by ActiveRecord.checkLazySelects(String).

Since:
1.8 and 2.2
Author:
Jeff Miller

Constructor Summary
ActiveLazySelector(ActiveTable<R> sourceActiveTable, R sourceActiveRecord, SelectCascadeAnnotationReader scar)
          Constructs for the source and annotation reader.
 
Method Summary
 java.lang.Void operate()
          Invoked by ActiveOperation.execute() to perform the operation.
 
Methods inherited from class org.sormula.active.operation.ActiveOperation
attach, attach, close, execute, getOperationDatabase, getTable, isLocalTransaction
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ActiveLazySelector

public ActiveLazySelector(ActiveTable<R> sourceActiveTable,
                          R sourceActiveRecord,
                          SelectCascadeAnnotationReader scar)
Constructs for the source and annotation reader.

Parameters:
sourceActiveTable - parent table of 1-to-1 or 1-to-n relationship; active database is obtained from this table
sourceActiveRecord - parent record that gets modified with selected child(ren)
scar - annotation reader for field within parent that has lazy cascade defined
Method Detail

operate

public java.lang.Void operate()
                       throws java.lang.Exception
Description copied from class: ActiveOperation
Invoked by ActiveOperation.execute() to perform the operation. Subclasses must implement.

Specified by:
operate in class ActiveOperation<R extends ActiveRecord<R>,java.lang.Void>
Returns:
result of operation (Integer, List, etc.)
Throws:
java.lang.Exception