ERXPartialGenericRecord Class Reference

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

Collaboration diagram for ERXPartialGenericRecord:

Collaboration graph
[legend]

List of all members.

Public Member Functions

Collection< ERXPartial > _partials ()
NSDictionary< Class, ERXPartial > _partialsDictionary ()
void awakeFromFetch (EOEditingContext editingContext)
void awakeFromInsertion (EOEditingContext editingContext)
void delete ()
void didDelete (EOEditingContext ec)
void didInsert ()
void didRevert (EOEditingContext ec)
void didUpdate ()
void mightDelete ()
void validateForInsert () throws NSValidation.ValidationException
void validateForSave () throws NSValidation.ValidationException
void validateForUpdate () throws NSValidation.ValidationException
Object validateTakeValueForKeyPath (Object value, String keyPath) throws ValidationException
Object valueForKey (String key)
void willDelete () throws NSValidation.ValidationException
void willInsert ()
void willRevert ()
void willUpdate ()

Protected Member Functions

Object _validateValueForKey (Object value, String key) throws ValidationException

Package Functions

public< U extends ERXPartial > U partialForClass (Class< U > partialClass)

Private Attributes

NSDictionary< Class, ERXPartial > _partials


Detailed Description

For overview information on partials, read the package.html in er.extensions.partials.

ERXPartialGenericRecord is the base class of any entity that allows itself to be extended with partials.

Author:
mschrag

Member Function Documentation

Collection<ERXPartial> _partials (  ) 

NSDictionary<Class, ERXPartial> _partialsDictionary (  ) 

Object _validateValueForKey ( Object  value,
String  key 
) throws ValidationException [protected]

Reimplemented from ERXGenericRecord.

void awakeFromFetch ( EOEditingContext  editingContext  ) 

Checks the editing context delegate before calling super's implementation. See the method _checkEditingContextDelegate for an explanation as to what this check does.

Parameters:
editingContext to be checked to make sure it has the correct type of delegate set.

Reimplemented from ERXGenericRecord.

void awakeFromInsertion ( EOEditingContext  editingContext  ) 

Checks the editing context delegate before calling super's implementation. See the method _checkEditingContextDelegate for an explanation as to what this check does.

Parameters:
editingContext to be checked to make sure it has the correct type of delegate set.

Reimplemented from ERXGenericRecord.

void delete (  ) 

Implementation of ERXGuardedObjectInterface. This is used to work around a bug in EOF that doesn't refresh the relationship in the parent editingContext for the object.

Reimplemented from ERXGenericRecord.

void didDelete ( EOEditingContext  ec  )  [virtual]

Called on the object after is has been deleted. The editing context is passed to the object since by this point the editingContext of the object is null. You should check if the ec is a child context when doing something here that can't be undone.

Parameters:
ec editing context that used to be associated with the object.

Reimplemented from ERXGenericRecord.

void didInsert (  )  [virtual]

Called on the object after is has successfully been inserted into the database.

Reimplemented from ERXGenericRecord.

void didRevert ( EOEditingContext  ec  )  [virtual]

Called on the object after it has been reverted. The editing context is passed to the object because if the object was in the insertedObjects list before the revert, the object has had its editingContext nulled.

Default implementation calls flushCaches.

Parameters:
ec editing context that is either currently associated with the object if the object was marked as changed or deleted before the revert, otherwise the editing context that was associated with the object before the revert.

Reimplemented from ERXGenericRecord.

void didUpdate (  )  [virtual]

Called on the object after is has successfully been updated in the database.

Reimplemented from ERXGenericRecord.

void mightDelete (  )  [virtual]

Called as part of the augmented transaction process. This method is called when deleteObject() is called on the editing context. The benefit over willDelete() is that in this method, the relationships are still intact. Mostly, at least, as it's also called when the deletes cascade.

Reimplemented from ERXGenericRecord.

public<U extends ERXPartial> U partialForClass ( Class< U >  partialClass  )  [package]

Returns the ERXPartial partial implementation for the given partial type.

Parameters:
<U> the partial type
partialClass the partial type
Returns:
an instance of the given partial associated with this EO

void validateForInsert (  )  throws NSValidation.ValidationException

Calls up validateForInsert() on the class description if it supports it.

Exceptions:
NSValidation.ValidationException if the object does not pass validation for saving to the database.

Reimplemented from ERXGenericRecord.

void validateForSave (  )  throws NSValidation.ValidationException

This method performs a few checks before invoking super's implementation. If the property key: ERDebuggingEnabled is set to true then the method checkConsistency will be called on this object.

Exceptions:
NSValidation.ValidationException if the object does not pass validation for saving to the database.

Reimplemented from ERXGenericRecord.

void validateForUpdate (  )  throws NSValidation.ValidationException

Calls up validateForUpdate() on the class description if it supports it.

Exceptions:
NSValidation.ValidationException if the object does not pass validation for saving to the database.

Reimplemented from ERXGenericRecord.

Object validateTakeValueForKeyPath ( Object  value,
String  keyPath 
) throws ValidationException

Object valueForKey ( String  key  ) 

void willDelete (  )  throws NSValidation.ValidationException [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 willRevert (  )  [virtual]

Called on the object before it will be reverted.

Default implementation does nothing other than log.

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

NSDictionary<Class, ERXPartial> _partials [private]


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

Generated on Sat May 26 06:43:17 2012 for Project Wonder by  doxygen 1.5.8