|
Project Wonder 2.0 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object er.extensions.ERXEditingContextDelegate er.extensions.ERXDefaultEditingContextDelegate
Default editing context delegate. This delegate augments the regular transaction process by adding the calling of willInsert, willUpdate or willDelete on enterprise objects that are of type ERXGenericRecord after saveChanges is called on the editing context, but before validateForSave is called on the object. These methods can give the object a last chance to modify itself before validation occurs. The second enhancement is a built in flushing of caches on subclasses of ERXGenericRecords when objects have changes merged in or are invalidated. Being able to maintain caches on enterprise objects that are flushed when the underlying values change can be very handy.
Field Summary | |
static ERXLogger |
log
logging support |
static ERXLogger |
logMod
logging support for modified objects |
Constructor Summary | |
ERXDefaultEditingContextDelegate()
Constructor needed for Serialable interface |
Method Summary | |
boolean |
editingContextShouldInvalidateObject(EOEditingContext anEOEditingContext,
EOEnterpriseObject anObject,
EOGlobalID anEOGlobalID)
When invalidating an object their local cache is flushed by calling the method:
flushCaches on the enterprise object if
it is an instance of ERXGenericRecord. |
boolean |
editingContextShouldMergeChangesForObject(EOEditingContext anEditingContext,
EOEnterpriseObject object)
When merging changes into an object their local cache is flushed by calling the method:
flushCaches on the enterprise object if
it is an instance of ERXGenericRecord. |
void |
editingContextWillSaveChanges(EOEditingContext ec)
Enumerates through all of the objects that have been changed, inserted and deleted calling the appropriate will* method, willInsert, etc. on each of the objects if they are of type ERXGenericRecord. |
boolean |
isInWillSaveChanges()
Can tell if the delegate is in the middle of a call to will save changes. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final ERXLogger log
public static final ERXLogger logMod
Constructor Detail |
public ERXDefaultEditingContextDelegate()
Method Detail |
public boolean isInWillSaveChanges()
public void editingContextWillSaveChanges(EOEditingContext ec) throws Throwable
ec
- editing context that is about to be saved.
Throwable
public boolean editingContextShouldInvalidateObject(EOEditingContext anEOEditingContext, EOEnterpriseObject anObject, EOGlobalID anEOGlobalID)
flushCaches
on the enterprise object if
it is an instance of ERXGenericRecord.
anObject
- enterprise object to be invlidatedanEOGlobalID
- global id to be invalidated
public boolean editingContextShouldMergeChangesForObject(EOEditingContext anEditingContext, EOEnterpriseObject object)
flushCaches
on the enterprise object if
it is an instance of ERXGenericRecord.
anEditingContext
- current editing contextobject
- enterprise object to have changes
merged into it.
|
Last updated: Do, Dez 9, 2004 12:46 PM CET | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |