|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DataContextDelegate
Defines API for a DataContext "delegate" - an object that is temporarily passed control by DataContext at some critical points in the normal flow of execution. A delegate thus can modify the flow, abort an operation, modify the objects participating in an operation, or perform any other tasks it deems necessary. DataContextDelegate is shared by DataContext and its ObjectStore.
DataContext
Method Summary | |
---|---|
void |
finishedMergeChanges(DataObject object)
Called after a successful merging of external changes to an object. |
void |
finishedProcessDelete(DataObject object)
Called after a successful processing of externally deleted object. |
boolean |
shouldMergeChanges(DataObject object,
DataRow snapshotInStore)
Invoked by parent DataContext whenever an object change is detected. |
boolean |
shouldProcessDelete(DataObject object)
Invoked by ObjectStore whenever it is detected that a database row was deleted for object. |
Query |
willPerformGenericQuery(DataContext context,
Query query)
Invoked before a Query is executed via DataContext.performGenericQuery. |
Query |
willPerformQuery(DataContext context,
Query query)
Invoked before a Query is executed via DataContext.performQuery. |
Method Detail |
---|
Query willPerformQuery(DataContext context, Query query)
Query willPerformGenericQuery(DataContext context, Query query)
boolean shouldMergeChanges(DataObject object, DataRow snapshotInStore)
true
, ObjectStore will attempt to merge
the changes into an object.
void finishedMergeChanges(DataObject object)
false
from
shouldMergeChanges(DataObject, DataRow)
, this method is not invoked,
since changes were not merged.
boolean shouldProcessDelete(DataObject object)
true
, ObjectStore will change
MODIFIED objects to NEW (resulting in recreating the deleted record on next commit)
and all other objects - to TRANSIENT. To block this behavior, delegate should
return false
, and possibly do its own processing.
object
- DataObject that was deleted externally and is still present in the
ObjectStore associated with the delegate.void finishedProcessDelete(DataObject object)
false
from
shouldProcessDelete(DataObject)
, this method is not invoked, since no
processing was done.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |