|
IBM WebSphere Application ServerTM Release 8 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface MediatorAdapter
Implemented by a user class to customize the processing of graph changes. The adapter can be used in situations when there are create methods other than create(PrimaryKey) or when business methods must be called instead of cmp setter methods or when special optimistic caching logic is needed.
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.
Field Summary | |
---|---|
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. |
Method Summary | |
---|---|
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. |
Field Detail |
---|
static final int CREATE
static final int UPDATE
static final int REMOVE
Method Detail |
---|
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.
|
IBM WebSphere Application ServerTM Release 8 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |