|
|||||||||
| Home >> All >> er >> [ extensions overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
er.extensions
Class ERXDefaultEditingContextDelegate

java.lang.Objecter.extensions.ERXEditingContextDelegate
er.extensions.ERXDefaultEditingContextDelegate
- Direct Known Subclasses:
- ERXECNoValidationDelegate
- public class ERXDefaultEditingContextDelegate
- extends ERXEditingContextDelegate
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 | |
private boolean |
_isInWillSaveChanges
flag that can tell if the editing context is in the middle of a will save changes call. |
static ERXLogger |
log
logging support |
static ERXLogger |
logMod
logging support for modified objects |
| Constructor Summary | |
ERXDefaultEditingContextDelegate()
|
|
| 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. |
boolean |
isInWillSaveChanges()
Can tell if the delegate is in the middle of a call to will save changes. |
private static java.lang.String |
toDebugString(EOEnterpriseObject eo)
Returns a string of a verbose look a the given enterprise object. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
log
public static final ERXLogger log
- logging support
logMod
public static final ERXLogger logMod
- logging support for modified objects
_isInWillSaveChanges
private boolean _isInWillSaveChanges
- flag that can tell if the editing context is in
the middle of a will save changes call.
| Constructor Detail |
ERXDefaultEditingContextDelegate
public ERXDefaultEditingContextDelegate()
| Method Detail |
isInWillSaveChanges
public boolean isInWillSaveChanges()
- Can tell if the delegate is in the middle of a
call to will save changes.
editingContextWillSaveChanges
public void editingContextWillSaveChanges(EOEditingContext ec)
throws java.lang.Throwable
- 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. Note that this
method is called before validateForSave is called on
any of the objects.
toDebugString
private static java.lang.String toDebugString(EOEnterpriseObject eo)
- Returns a string of a verbose look a the given
enterprise object. Also includes the primary key.
editingContextShouldInvalidateObject
public boolean editingContextShouldInvalidateObject(EOEditingContext anEOEditingContext,
EOEnterpriseObject anObject,
EOGlobalID anEOGlobalID)
- When invalidating an object their local
cache is flushed by calling the method:
flushCacheson the enterprise object if it is an instance of ERXGenericRecord.
editingContextShouldMergeChangesForObject
public boolean editingContextShouldMergeChangesForObject(EOEditingContext anEditingContext,
EOEnterpriseObject object)
- When merging changes into an object their local
cache is flushed by calling the method:
flushCacheson the enterprise object if it is an instance of ERXGenericRecord.
|
|||||||||
| Home >> All >> er >> [ extensions overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC