ERCStampedEnterpriseObject Class Reference

Inherits er::extensions::eof::ERXGenericRecord.

Collaboration diagram for ERCStampedEnterpriseObject:

Collaboration graph
[legend]

List of all members.

Classes

class  ERCStampedEnterpriseObjectClazz
interface  Keys
class  Observer

Public Member Functions

void addObjectToBothSidesOfLogEntryRelationshipWithKey (EOEnterpriseObject object, String key)
NSTimestamp created ()
void init (EOEditingContext ec)
NSTimestamp lastModified ()
void setCreated (NSTimestamp value)
void setLastModified (NSTimestamp value)
void willDelete ()
void willInsert ()
void willUpdate ()

Public Attributes

EOEnterpriseObject insertionLogEntry = null

Static Public Attributes

static final Logger log = Logger.getLogger(ERCStampedEnterpriseObject.class)
static String[] TimestampAttributeKeys = new String[] { Keys.CREATED, Keys.LAST_MODIFIED}

Static Protected Member Functions

static void initialize ()
static boolean touchReadOnlyEntities ()

Private Member Functions

void touch ()

Static Private Attributes

static final Map
< EOEditingContext,
NSTimestamp > 
_datesPerEC = Collections.synchronizedMap(new WeakHashMap<EOEditingContext, NSTimestamp>())
static Boolean _touchReadOnlyEntities


Detailed Description

EO subclass that has a timestamp with its creation date, the most recent modification, and a log entry describing the change.

Member Function Documentation

void addObjectToBothSidesOfLogEntryRelationshipWithKey ( EOEnterpriseObject  object,
String  key 
)

NSTimestamp created (  ) 

void init ( EOEditingContext  ec  ) 

used for initialization stuff instead of awakeFromInsertion. awakeFromInsertions is buggy because if an EO is deleted and then its EOEditingContext is reverted using 'revert' for example then EOF will -insert- this EO again in its EOEditingContext which in turn calls awakeFromInsertion again.

Parameters:
ec the EOEditingContext in which this new EO is inserted

Reimplemented from ERXGenericRecord.

static void initialize (  )  [static, protected]

NSTimestamp lastModified (  ) 

void setCreated ( NSTimestamp  value  ) 

void setLastModified ( NSTimestamp  value  ) 

void touch (  )  [private]

er corebusinesslogic ERCStampedEnterpriseObject touchReadOnlyEntities (  )  [static, protected]

Returns whether or not read-only entities should be touched. This setting is only here in case there is a performance issue introduced by looking up the entity() in touch(), so we can roll it back out.

Returns:
whether or not read-only entities should be touched (defaults to false)

void willDelete (  )  [virtual]

Called as part of the augmented transaction process. This method is called after saveChanges is called on the editing context, but before the object is actually deleted from the database. This method is also called before validateForDelete is called on this object. This method is called by the editing context delegate ERXDefaultEditingContextDelegate.

Exceptions:
NSValidation.ValidationException to stop the object from being deleted.

Reimplemented from ERXGenericRecord.

void willInsert (  )  [virtual]

Called as part of the augmented transaction process. This method is called after saveChanges is called on the editing context, but before the object is actually inserted into the database. This method is also called before validateForInsert is called on this object. This method is called by the editing context delegate ERXDefaultEditingContextDelegate.

Reimplemented from ERXGenericRecord.

void willUpdate (  )  [virtual]

Called as part of the augmented transaction process. This method is called after saveChanges is called on the editing context, but before the object is actually updated in the database. This method is also called before validateForSave is called on this object. This method is called by the editing context delegate ERXDefaultEditingContextDelegate.

Reimplemented from ERXGenericRecord.


Member Data Documentation

final Map<EOEditingContext, NSTimestamp> _datesPerEC = Collections.synchronizedMap(new WeakHashMap<EOEditingContext, NSTimestamp>()) [static, private]

Boolean _touchReadOnlyEntities [static, private]

EOEnterpriseObject insertionLogEntry = null

final Logger log = Logger.getLogger(ERCStampedEnterpriseObject.class) [static]

logging support

Implements ERXEnterpriseObject.


The documentation for this class was generated from the following file:

Generated on Sat May 26 06:42:47 2012 for Project Wonder by  doxygen 1.5.8