Project Wonder 5.0

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:
com.webobjects.eocontrol._EOPrivateMemento, com.webobjects.eocontrol.EODeferredFaulting, com.webobjects.eocontrol.EOEnterpriseObject, com.webobjects.eocontrol.EOFaulting, com.webobjects.eocontrol.EOKeyValueCoding, com.webobjects.eocontrol.EOKeyValueCoding._BestBindingCreation._ForwardingBindingCheck, com.webobjects.eocontrol.EOKeyValueCoding._KeyBindingCreation, com.webobjects.eocontrol.EOKeyValueCodingAdditions, com.webobjects.eocontrol.EORelationshipManipulation, com.webobjects.eocontrol.EOValidation, com.webobjects.foundation.NSKeyValueCoding, com.webobjects.foundation.NSKeyValueCoding._KeyBindingCreation, com.webobjects.foundation.NSKeyValueCoding._ReflectionKeyBindingCreation.Callback, com.webobjects.foundation.NSKeyValueCoding.ErrorHandling, com.webobjects.foundation.NSKeyValueCodingAdditions, com.webobjects.foundation.NSValidation, ERXDatabaseContextDelegate.AutoBatchFaultingEnterpriseObject, ERXEnterpriseObject, ERXGeneratesPrimaryKeyInterface, ERXGuardedObjectInterface, ERXKey.ValueCoding, ERXNonNullObjectInterface, java.io.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.

See Also:
Serialized Form
Author:
mschrag

Nested Class Summary
 
Nested classes/interfaces inherited from class er.extensions.eof.ERXGenericRecord
ERXGenericRecord.ERXGenericRecordClazz<T extends com.webobjects.eocontrol.EOEnterpriseObject>, ERXGenericRecord.InverseRelationshipUpdater, ERXGenericRecord.LocalizedBinding, ERXGenericRecord.TouchingBinding
 
Nested classes/interfaces inherited from class com.webobjects.eocontrol.EOGenericRecord
com.webobjects.eocontrol.EOGenericRecord._DictionaryBinding, com.webobjects.eocontrol.EOGenericRecord._LazyDictionaryBinding
 
Nested classes/interfaces inherited from class com.webobjects.eocontrol.EOCustomObject
com.webobjects.eocontrol.EOCustomObject._BooleanFieldBinding, com.webobjects.eocontrol.EOCustomObject._FieldBinding, com.webobjects.eocontrol.EOCustomObject._LazyFieldBinding, com.webobjects.eocontrol.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
com.webobjects.eocontrol.EOKeyValueCodingAdditions.DefaultImplementation, com.webobjects.eocontrol.EOKeyValueCodingAdditions.Utility
 
Nested classes/interfaces inherited from interface com.webobjects.eocontrol.EOKeyValueCoding
com.webobjects.eocontrol.EOKeyValueCoding._BestBindingCreation, com.webobjects.eocontrol.EOKeyValueCoding._KeyBindingCreation, com.webobjects.eocontrol.EOKeyValueCoding._StoredForwardingBinding
 
Nested classes/interfaces inherited from interface com.webobjects.foundation.NSKeyValueCoding
com.webobjects.foundation.NSKeyValueCoding._BooleanFieldBinding, com.webobjects.foundation.NSKeyValueCoding._BooleanMethodBinding, com.webobjects.foundation.NSKeyValueCoding._FieldBinding, com.webobjects.foundation.NSKeyValueCoding._ForwardingBinding, com.webobjects.foundation.NSKeyValueCoding._KeyBinding, com.webobjects.foundation.NSKeyValueCoding._NumberFieldBinding, com.webobjects.foundation.NSKeyValueCoding._NumberMethodBinding, com.webobjects.foundation.NSKeyValueCoding._ReflectionKeyBindingCreation, com.webobjects.foundation.NSKeyValueCoding.ErrorHandling, com.webobjects.foundation.NSKeyValueCoding.Null, com.webobjects.foundation.NSKeyValueCoding.UnknownKeyException, com.webobjects.foundation.NSKeyValueCoding.ValueAccessor
 
Nested classes/interfaces inherited from interface com.webobjects.foundation.NSValidation
com.webobjects.foundation.NSValidation._MethodBinding, com.webobjects.foundation.NSValidation._ValidationBinding, com.webobjects.foundation.NSValidation.ValidationException
 
Nested classes/interfaces inherited from interface com.webobjects.eocontrol._EOPrivateMemento
com.webobjects.eocontrol._EOPrivateMemento.DefaultImplementation
 
Field Summary
 
Fields inherited from class er.extensions.eof.ERXGenericRecord
_primaryKey, _touchSource, insertionStackTrace
 
Fields inherited from class com.webobjects.eocontrol.EOGenericRecord
_CLASS
 
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
 
Constructor Summary
ERXPartialGenericRecord()
           
 
Method Summary
 java.util.Collection<ERXPartial> _partials()
           
 com.webobjects.foundation.NSDictionary<java.lang.Class,ERXPartial> _partialsDictionary()
           
protected  java.lang.Object _validateValueForKey(java.lang.Object value, java.lang.String key)
           
 void awakeFromFetch(com.webobjects.eocontrol.EOEditingContext editingContext)
          Checks the editing context delegate before calling super's implementation.
 void awakeFromInsertion(com.webobjects.eocontrol.EOEditingContext editingContext)
          Checks the editing context delegate before calling super's implementation.
 void delete()
          Implementation of ERXGuardedObjectInterface.
 void didDelete(com.webobjects.eocontrol.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(com.webobjects.eocontrol.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(java.lang.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.
 java.lang.Object validateTakeValueForKeyPath(java.lang.Object value, java.lang.String keyPath)
           
 java.lang.Object valueForKey(java.lang.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, _setPrimaryKeyDictionary, _setUpdateInverseRelationships, _setValueForPrimaryKey, _updateInverseRelationships, addObjectsToBothSidesOfRelationshipWithKey, addObjectToBothSidesOfRelationshipWithKey, applyRestrictingQualifierOnInsert, awakeFromClientUpdate, batchCheckConsistency, batchFaultingRelationshipName, batchFaultingSourceGlobalID, batchFaultingTimeStamp, canDelete, canUpdate, changesFromCommittedSnapshot, checkConsistency, checkMatchingEditingContexts, clearProperties, committedSnapshot, committedSnapshotValueForKey, description, didCopyFromChildInEditingContext, encryptedPrimaryKey, entity, excludeObjectFromPropertyWithKey, flushCaches, foreignKeyForRelationshipWithKey, getClassLog, hasKeyChangedFromCommittedSnapshot, hasKeyChangedFromCommittedSnapshotFromValue, hasKeyChangedFromCommittedSnapshotFromValueToNewValue, hasKeyChangedFromCommittedSnapshotToValue, includeObjectIntoPropertyWithKey, init, isDeletedEO, isNewEO, isNewObject, isNonNull, isUpdatedObject, isValidatedWhenNested, localesForKey, localInstanceIn, localInstanceOf, localInstancesOf, localizationShouldFallbackToDefaultLanguage, parentObjectStoreIsObjectStoreCoordinator, permanentGlobalID, permanentGlobalID, primaryKey, primaryKeyAttributeNames, primaryKeyDictionary, primaryKeyInTransaction, rawPrimaryKey, rawPrimaryKeyInTransaction, refetchObjectFromDB, refetchObjectFromDBinEditingContext, removeObjectsFromBothSidesOfRelationshipWithKey, removeObjectsFromPropertyWithKey, self, setBatchFaultingTimestamp, setValidatedWhenNested, shouldTrimSpaces, takeStoredValueForKey, takeValueForKey, takeValueForKey, toLongString, toString, touchFromBatchFaultingSource, 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, 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, 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 com.webobjects.foundation.NSDictionary<java.lang.Class,ERXPartial> _partialsDictionary()

_partials

public java.util.Collection<ERXPartial> _partials()

partialForClass

public <U extends ERXPartial> U partialForClass(java.lang.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 java.lang.Object valueForKey(java.lang.String key)
Specified by:
valueForKey in interface com.webobjects.foundation.NSKeyValueCoding
Overrides:
valueForKey in class com.webobjects.eocontrol.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 com.webobjects.foundation.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(com.webobjects.eocontrol.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(com.webobjects.eocontrol.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(com.webobjects.eocontrol.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 com.webobjects.eocontrol.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(com.webobjects.eocontrol.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 com.webobjects.eocontrol.EOEnterpriseObject
Overrides:
awakeFromFetch in class ERXGenericRecord
Parameters:
editingContext - to be checked to make sure it has the correct type of delegate set.

_validateValueForKey

protected java.lang.Object _validateValueForKey(java.lang.Object value,
                                                java.lang.String key)
                                         throws com.webobjects.foundation.NSValidation.ValidationException
Overrides:
_validateValueForKey in class ERXGenericRecord
Throws:
com.webobjects.foundation.NSValidation.ValidationException

validateTakeValueForKeyPath

public java.lang.Object validateTakeValueForKeyPath(java.lang.Object value,
                                                    java.lang.String keyPath)
                                             throws com.webobjects.foundation.NSValidation.ValidationException
Specified by:
validateTakeValueForKeyPath in interface com.webobjects.foundation.NSValidation
Overrides:
validateTakeValueForKeyPath in class com.webobjects.eocontrol.EOCustomObject
Throws:
com.webobjects.foundation.NSValidation.ValidationException

validateForSave

public void validateForSave()
                     throws com.webobjects.foundation.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 com.webobjects.eocontrol.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 com.webobjects.foundation.NSValidation.ValidationException
Description copied from class: ERXGenericRecord
Calls up validateForInsert() on the class description if it supports it.

Specified by:
validateForInsert in interface com.webobjects.eocontrol.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 com.webobjects.foundation.NSValidation.ValidationException
Description copied from class: ERXGenericRecord
Calls up validateForUpdate() on the class description if it supports it.

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

Last updated: Tue, Feb 21, 2017 • 05:45 PM CET

Copyright © 2002 – 2007 Project Wonder.