public interface MediatorAdapter
Three passes are made over DataGraph Log passing changed DataObjects to the applyChange method.
In pass 1 new DataObjects are passed. Adapter should create the EJB instance and set the cmp fields. CMRs that reference EJBs that have not been created yet must be deferred to pass 2.
In pass 2 new and updated DataObjects are passed. CMRs deferred from pass 1 can be set at this time.
In pass 3 deleted DataObjects are passed.
Adapter return true if it has processed the change and return false to have the mediator process the change.
Modifier and Type | Field and Description |
---|---|
static int |
CREATE
Pass 1 to handle creation of new EJBs.
|
static int |
REMOVE
Pass 3 to handle EJB removal.
|
static int |
UPDATE
Pass 2 to handle update of cmp fields and ejb relationships.
|
Modifier and Type | Method and Description |
---|---|
boolean |
applyChange(commonj.sdo.DataObject object,
int phase)
A changed DataObject is passed to the adapter.
|
void |
end()
Called after pass 3 to clean up any resources.
|
void |
init(commonj.sdo.ChangeSummary log)
Called before pass 1 to allow adapter class to initialize itself.
|
static final int CREATE
static final int UPDATE
static final int REMOVE
boolean applyChange(commonj.sdo.DataObject object, int phase) throws QueryException
object
- The changed DataObject from the graph log.phase
- Processing phase.QueryException
- The adapter throwing an excption will cause
the mediator to abort processing.void end()
void init(commonj.sdo.ChangeSummary log)
log
- The graph log.