Project Wonder 5.0.0.8794

er.extensions.partials
Class ERXPartialGenericRecord

java.lang.Object
  extended by com.webobjects.eocontrol.EOCustomObject
      extended by com.webobjects.eocontrol.EOGenericRecord
          extended by er.extensions.eof.ERXGenericRecord
              extended by er.extensions.partials.ERXPartialGenericRecord
All Implemented Interfaces:
_EOPrivateMemento, EODeferredFaulting, EOEnterpriseObject, EOFaulting, EOKeyValueCoding, EOKeyValueCoding._BestBindingCreation._ForwardingBindingCheck, EOKeyValueCoding._KeyBindingCreation, EOKeyValueCodingAdditions, EORelationshipManipulation, EOValidation, NSKeyValueCoding, NSKeyValueCoding._KeyBindingCreation, NSKeyValueCoding._ReflectionKeyBindingCreation.Callback, NSKeyValueCoding.ErrorHandling, NSKeyValueCodingAdditions, NSValidation, ERXEnterpriseObject, ERXGeneratesPrimaryKeyInterface, ERXGuardedObjectInterface, ERXKey.ValueCoding, Serializable

public class ERXPartialGenericRecord
extends ERXGenericRecord

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
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class er.extensions.eof.ERXGenericRecord
ERXGenericRecord.ERXGenericRecordClazz<T extends EOEnterpriseObject>, ERXGenericRecord.InverseRelationshipUpdater, ERXGenericRecord.LocalizedBinding
 
Nested classes/interfaces inherited from class com.webobjects.eocontrol.EOGenericRecord
EOGenericRecord._DictionaryBinding, EOGenericRecord._LazyDictionaryBinding
 
Nested classes/interfaces inherited from class com.webobjects.eocontrol.EOCustomObject
EOCustomObject._BooleanFieldBinding, EOCustomObject._FieldBinding, EOCustomObject._LazyFieldBinding, EOCustomObject._NumberFieldBinding
 
Nested classes/interfaces inherited from interface er.extensions.eof.ERXEnterpriseObject
ERXEnterpriseObject.Observer, ERXEnterpriseObject.Processor
 
Nested classes/interfaces inherited from interface com.webobjects.eocontrol.EOKeyValueCodingAdditions
EOKeyValueCodingAdditions.DefaultImplementation, EOKeyValueCodingAdditions.Utility
 
Nested classes/interfaces inherited from interface com.webobjects.foundation.NSKeyValueCoding
NSKeyValueCoding._BooleanFieldBinding, NSKeyValueCoding._BooleanMethodBinding, NSKeyValueCoding._FieldBinding, NSKeyValueCoding._ForwardingBinding, NSKeyValueCoding._KeyBinding, NSKeyValueCoding._MethodBinding, NSKeyValueCoding._NumberFieldBinding, NSKeyValueCoding._NumberMethodBinding, NSKeyValueCoding._ReflectionKeyBindingCreation, NSKeyValueCoding.ErrorHandling, NSKeyValueCoding.MapImplementation, NSKeyValueCoding.Null<T>, NSKeyValueCoding.UnknownKeyException, NSKeyValueCoding.ValueAccessor
 
Nested classes/interfaces inherited from interface com.webobjects.eocontrol.EOKeyValueCoding
EOKeyValueCoding._BestBindingCreation, EOKeyValueCoding._KeyBindingCreation, EOKeyValueCoding._StoredForwardingBinding
 
Nested classes/interfaces inherited from interface com.webobjects.foundation.NSKeyValueCoding
NSKeyValueCoding._BooleanFieldBinding, NSKeyValueCoding._BooleanMethodBinding, NSKeyValueCoding._FieldBinding, NSKeyValueCoding._ForwardingBinding, NSKeyValueCoding._KeyBinding, NSKeyValueCoding._MethodBinding, NSKeyValueCoding._NumberFieldBinding, NSKeyValueCoding._NumberMethodBinding, NSKeyValueCoding._ReflectionKeyBindingCreation, NSKeyValueCoding.ErrorHandling, NSKeyValueCoding.MapImplementation, NSKeyValueCoding.Null<T>, NSKeyValueCoding.UnknownKeyException, NSKeyValueCoding.ValueAccessor
 
Nested classes/interfaces inherited from interface com.webobjects.foundation.NSValidation
NSValidation._MethodBinding, NSValidation._ValidationBinding, NSValidation.ValidationException
 
Nested classes/interfaces inherited from interface com.webobjects.eocontrol._EOPrivateMemento
_EOPrivateMemento.DefaultImplementation
 
Field Summary
 
Fields inherited from class er.extensions.eof.ERXGenericRecord
_primaryKey, insertionStackTrace
 
Fields inherited from class com.webobjects.eocontrol.EOGenericRecord
_CLASS
 
Fields inherited from class com.webobjects.eocontrol.EOCustomObject
__readOnly
 
Fields inherited from interface er.extensions.eof.ERXEnterpriseObject
applyRestrictingQualifierOnInsert, DidDeleteProcessor, DidInsertProcessor, DidRevertProcessor, DidUpdateProcessor, FlushCachesProcessor, insertionTrackingLog, KEY_MARKER, log, logMod, tranLogDidDelete, tranLogDidInsert, tranLogDidRevert, tranLogDidUpdate, tranLogMightDelete, tranLogWillDelete, tranLogWillInsert, tranLogWillRevert, tranLogWillUpdate, validation, validationException, WillDeleteProcessor, WillInsertProcessor, WillRevertProcessor, WillUpdateProcessor
 
Fields inherited from interface com.webobjects.eocontrol.EOEnterpriseObject
_CLASS
 
Fields inherited from interface com.webobjects.foundation.NSKeyValueCodingAdditions
_KeyPathSeparatorChar, KeyPathSeparator
 
Fields inherited from interface com.webobjects.foundation.NSKeyValueCoding
NullValue
 
Fields inherited from interface com.webobjects.foundation.NSKeyValueCoding
NullValue
 
Constructor Summary
ERXPartialGenericRecord()
           
 
Method Summary
 Collection<ERXPartial> _partials()
           
 NSDictionary<Class,ERXPartial> _partialsDictionary()
           
protected  Object _validateValueForKey(Object value, String key)
           
 void awakeFromFetch(EOEditingContext editingContext)
          Checks the editing context delegate before calling super's implementation.
 void awakeFromInsertion(EOEditingContext editingContext)
          Checks the editing context delegate before calling super's implementation.
 void delete()
          Implementation of ERXGuardedObjectInterface.
 void didDelete(EOEditingContext ec)
          Called on the object after is has been deleted.
 void didInsert()
          Called on the object after is has successfully been inserted into the database.
 void didRevert(EOEditingContext ec)
          Called on the object after it has been reverted.
 void didUpdate()
          Called on the object after is has successfully been updated in the database.
 void mightDelete()
          Called as part of the augmented transaction process.
<U extends ERXPartial>
U
partialForClass(Class<U> partialClass)
          Returns the ERXPartial partial implementation for the given partial type.
 void validateForInsert()
          Calls up validateForInsert() on the class description if it supports it.
 void validateForSave()
          This method performs a few checks before invoking super's implementation.
 void validateForUpdate()
          Calls up validateForUpdate() on the class description if it supports it.
 Object validateTakeValueForKeyPath(Object value, String keyPath)
           
 Object valueForKey(String key)
           
 void willDelete()
          Called as part of the augmented transaction process.
 void willInsert()
          Called as part of the augmented transaction process.
 void willRevert()
          Called on the object before it will be reverted.
 void willUpdate()
          Called as part of the augmented transaction process.
 
Methods inherited from class er.extensions.eof.ERXGenericRecord
_otherStorageBinding, _setUpdateInverseRelationships, _updateInverseRelationships, addObjectsToBothSidesOfRelationshipWithKey, addObjectToBothSidesOfRelationshipWithKey, applyRestrictingQualifierOnInsert, awakeFromClientUpdate, batchCheckConsistency, canDelete, canUpdate, changesFromCommittedSnapshot, checkConsistency, checkMatchingEditingContexts, clearProperties, committedSnapshot, committedSnapshotValueForKey, description, encryptedPrimaryKey, entity, excludeObjectFromPropertyWithKey, flushCaches, foreignKeyForRelationshipWithKey, getClassLog, includeObjectIntoPropertyWithKey, init, isDeletedEO, isNewEO, isNewObject, isUpdatedObject, localesForKey, localInstanceIn, localInstanceOf, localInstancesOf, localizationShouldFallbackToDefaultLanguage, parentObjectStoreIsObjectStoreCoordinator, permanentGlobalID, permanentGlobalID, primaryKey, primaryKeyAttributeNames, primaryKeyDictionary, primaryKeyInTransaction, rawPrimaryKey, rawPrimaryKeyInTransaction, refetchObjectFromDBinEditingContext, removeObjectsFromBothSidesOfRelationshipWithKey, removeObjectsFromPropertyWithKey, self, shouldTrimSpaces, takeStoredValueForKey, takeValueForKey, takeValueForKey, toLongString, toString, trimSpaces, updateFromSnapshot, validateValueForKey, valueForKey, willReadRelationship
 
Methods inherited from class com.webobjects.eocontrol.EOGenericRecord
__setClassDescription, _keyGetBindingForKey, _keySetBindingForKey, _storedKeyGetBindingForKey, _storedKeySetBindingForKey, classDescription, usesDeferredFaultCreation
 
Methods inherited from class com.webobjects.eocontrol.EOCustomObject
__classDescription, __clearPendingChanges, __editingContext, __globalID, __hasAuxillaryObservers, __hasPendingChanges, __hasPendingUpdate, __isInitialized, __isPendingDeletion, __isPendingInsertion, __isShared, __lastSnapshot, __originalSnapshot, __retainCount, __setAuxillaryObservers, __setEditingContext, __setGlobalID, __setInitialized, __setLastSnapshot, __setOriginalSnapshot, __setPendingDeletion, __setPendingInsertion, __setPendingUpdate, __setRetainCount, __setShared, _createKeyGetBindingForKey, _createKeySetBindingForKey, _createStoredKeyGetBindingForKey, _createStoredKeySetBindingForKey, _fieldKeyBinding, _forwardingBindingNeededForClass, _methodKeyGetBinding, _methodKeySetBinding, addObjectToPropertyWithKey, allPropertyKeys, attributeKeys, canAccessFieldsDirectly, changesFromSnapshot, classDescriptionForDestinationKey, clearFault, deleteRuleForRelationshipKey, editingContext, entityName, eoDescription, eoShallowDescription, equals, faultHandler, handleQueryWithUnboundKey, handleTakeValueForUnboundKey, hashCode, inverseForRelationshipKey, invokeRemoteMethod, isFault, isReadOnly, isToManyKey, opaqueState, ownsDestinationObjectsForRelationshipKey, prepareValuesForClient, propagateDeleteWithEditingContext, readResolve, reapplyChangesFromDictionary, removeObjectFromBothSidesOfRelationshipWithKey, removeObjectFromPropertyWithKey, shouldUseStoredAccessors, snapshot, storedValueForKey, takeValueForKeyPath, takeValuesFromDictionary, takeValuesFromDictionaryWithMapping, toManyRelationshipKeys, toOneRelationshipKeys, turnIntoFault, unableToSetNullForKey, userPresentableDescription, validateClientUpdate, validateForDelete, valueForKeyPath, valuesForKeys, valuesForKeysWithMapping, willChange, willRead
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.webobjects.eocontrol.EOEnterpriseObject
allPropertyKeys, attributeKeys, changesFromSnapshot, classDescription, classDescriptionForDestinationKey, deleteRuleForRelationshipKey, editingContext, entityName, eoDescription, eoShallowDescription, inverseForRelationshipKey, invokeRemoteMethod, isReadOnly, isToManyKey, opaqueState, ownsDestinationObjectsForRelationshipKey, prepareValuesForClient, propagateDeleteWithEditingContext, reapplyChangesFromDictionary, snapshot, toManyRelationshipKeys, toOneRelationshipKeys, userPresentableDescription, willChange
 
Methods inherited from interface com.webobjects.eocontrol.EOKeyValueCodingAdditions
takeValuesFromDictionary, takeValuesFromDictionaryWithMapping, valuesForKeys, valuesForKeysWithMapping
 
Methods inherited from interface com.webobjects.foundation.NSKeyValueCodingAdditions
takeValueForKeyPath, valueForKeyPath
 
Methods inherited from interface com.webobjects.eocontrol.EOKeyValueCoding
storedValueForKey
 
Methods inherited from interface com.webobjects.foundation.NSKeyValueCoding.ErrorHandling
handleQueryWithUnboundKey, handleTakeValueForUnboundKey, unableToSetNullForKey
 
Methods inherited from interface com.webobjects.eocontrol.EORelationshipManipulation
addObjectToPropertyWithKey, removeObjectFromBothSidesOfRelationshipWithKey, removeObjectFromPropertyWithKey
 
Methods inherited from interface com.webobjects.eocontrol.EOValidation
validateClientUpdate, validateForDelete
 
Methods inherited from interface com.webobjects.eocontrol.EOFaulting
clearFault, faultHandler, isFault, turnIntoFault, willRead
 

Constructor Detail

ERXPartialGenericRecord

public ERXPartialGenericRecord()
Method Detail

_partialsDictionary

public NSDictionary<Class,ERXPartial> _partialsDictionary()

_partials

public Collection<ERXPartial> _partials()

partialForClass

public <U extends ERXPartial> U partialForClass(Class<U> partialClass)
Returns the ERXPartial partial implementation for the given partial type.

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

valueForKey

public Object valueForKey(String key)
Specified by:
valueForKey in interface NSKeyValueCoding
Overrides:
valueForKey in class EOCustomObject

delete

public void delete()
Description copied from class: ERXGenericRecord
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.

Specified by:
delete in interface ERXGuardedObjectInterface
Overrides:
delete in class ERXGenericRecord

mightDelete

public void mightDelete()
Description copied from interface: ERXEnterpriseObject
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.

Specified by:
mightDelete in interface ERXEnterpriseObject
Overrides:
mightDelete in class ERXGenericRecord

willDelete

public void willDelete()
                throws NSValidation.ValidationException
Description copied from interface: ERXEnterpriseObject
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.

Specified by:
willDelete in interface ERXEnterpriseObject
Overrides:
willDelete in class ERXGenericRecord
Throws:
NSValidation.ValidationException - to stop the object from being deleted.

willInsert

public void willInsert()
Description copied from interface: ERXEnterpriseObject
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.

Specified by:
willInsert in interface ERXEnterpriseObject
Overrides:
willInsert in class ERXGenericRecord

willUpdate

public void willUpdate()
Description copied from interface: ERXEnterpriseObject
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.

Specified by:
willUpdate in interface ERXEnterpriseObject
Overrides:
willUpdate in class ERXGenericRecord

didDelete

public void didDelete(EOEditingContext ec)
Description copied from interface: ERXEnterpriseObject
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.

Specified by:
didDelete in interface ERXEnterpriseObject
Overrides:
didDelete in class ERXGenericRecord
Parameters:
ec - editing context that used to be associated with the object.

didUpdate

public void didUpdate()
Description copied from interface: ERXEnterpriseObject
Called on the object after is has successfully been updated in the database.

Specified by:
didUpdate in interface ERXEnterpriseObject
Overrides:
didUpdate in class ERXGenericRecord

didInsert

public void didInsert()
Description copied from interface: ERXEnterpriseObject
Called on the object after is has successfully been inserted into the database.

Specified by:
didInsert in interface ERXEnterpriseObject
Overrides:
didInsert in class ERXGenericRecord

willRevert

public void willRevert()
Description copied from interface: ERXEnterpriseObject
Called on the object before it will be reverted. Default implementation does nothing other than log.

Specified by:
willRevert in interface ERXEnterpriseObject
Overrides:
willRevert in class ERXGenericRecord

didRevert

public void didRevert(EOEditingContext ec)
Description copied from interface: ERXEnterpriseObject
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.

Specified by:
didRevert in interface ERXEnterpriseObject
Overrides:
didRevert in class ERXGenericRecord
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.

awakeFromInsertion

public void awakeFromInsertion(EOEditingContext editingContext)
Description copied from class: ERXGenericRecord
Checks the editing context delegate before calling super's implementation. See the method _checkEditingContextDelegate for an explanation as to what this check does.

Specified by:
awakeFromInsertion in interface EOEnterpriseObject
Overrides:
awakeFromInsertion in class ERXGenericRecord
Parameters:
editingContext - to be checked to make sure it has the correct type of delegate set.

awakeFromFetch

public void awakeFromFetch(EOEditingContext editingContext)
Description copied from class: ERXGenericRecord
Checks the editing context delegate before calling super's implementation. See the method _checkEditingContextDelegate for an explanation as to what this check does.

Specified by:
awakeFromFetch in interface EOEnterpriseObject
Overrides:
awakeFromFetch in class ERXGenericRecord
Parameters:
editingContext - to be checked to make sure it has the correct type of delegate set.

_validateValueForKey

protected Object _validateValueForKey(Object value,
                                      String key)
                               throws NSValidation.ValidationException
Overrides:
_validateValueForKey in class ERXGenericRecord
Throws:
NSValidation.ValidationException

validateTakeValueForKeyPath

public Object validateTakeValueForKeyPath(Object value,
                                          String keyPath)
                                   throws NSValidation.ValidationException
Specified by:
validateTakeValueForKeyPath in interface NSValidation
Overrides:
validateTakeValueForKeyPath in class EOCustomObject
Throws:
NSValidation.ValidationException

validateForSave

public void validateForSave()
                     throws NSValidation.ValidationException
Description copied from class: ERXGenericRecord
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.

Specified by:
validateForSave in interface EOValidation
Overrides:
validateForSave in class ERXGenericRecord
Throws:
NSValidation.ValidationException - if the object does not pass validation for saving to the database.

validateForInsert

public void validateForInsert()
                       throws NSValidation.ValidationException
Description copied from class: ERXGenericRecord
Calls up validateForInsert() on the class description if it supports it.

Specified by:
validateForInsert in interface EOValidation
Overrides:
validateForInsert in class ERXGenericRecord
Throws:
NSValidation.ValidationException - if the object does not pass validation for saving to the database.

validateForUpdate

public void validateForUpdate()
                       throws NSValidation.ValidationException
Description copied from class: ERXGenericRecord
Calls up validateForUpdate() on the class description if it supports it.

Specified by:
validateForUpdate in interface EOValidation
Overrides:
validateForUpdate in class ERXGenericRecord
Throws:
NSValidation.ValidationException - if the object does not pass validation for saving to the database.

Last updated: Thu, Jan 8, 2009 • 12:32 PM EST