public interface ERXEnterpriseObject
extends com.webobjects.eocontrol.EOEnterpriseObject
Modifier and Type | Interface and Description |
---|---|
static class |
ERXEnterpriseObject.Observer
Registers as a listener for various editing context notifications and calls up the willXXX and
didXXX methods in objects that implement ERXEnterpriseObject.
|
static class |
ERXEnterpriseObject.Processor |
com.webobjects.eocontrol.EOKeyValueCodingAdditions.DefaultImplementation, com.webobjects.eocontrol.EOKeyValueCodingAdditions.Utility
com.webobjects.eocontrol.EOKeyValueCoding._BestBindingCreation, com.webobjects.eocontrol.EOKeyValueCoding._KeyBindingCreation, com.webobjects.eocontrol.EOKeyValueCoding._StoredForwardingBinding
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._MethodBinding, com.webobjects.foundation.NSKeyValueCoding._NumberFieldBinding, com.webobjects.foundation.NSKeyValueCoding._NumberMethodBinding, com.webobjects.foundation.NSKeyValueCoding._ReflectionKeyBindingCreation, com.webobjects.foundation.NSKeyValueCoding.ErrorHandling, com.webobjects.foundation.NSKeyValueCoding.MapImplementation, com.webobjects.foundation.NSKeyValueCoding.Null<T>, com.webobjects.foundation.NSKeyValueCoding.UnknownKeyException, com.webobjects.foundation.NSKeyValueCoding.ValueAccessor
Modifier and Type | Method and Description |
---|---|
boolean |
_setUpdateInverseRelationships(boolean newValue)
Toggles whether or not inverse relationships should be updates.
|
void |
addObjectsToBothSidesOfRelationshipWithKey(NSArray<? extends com.webobjects.eocontrol.EOEnterpriseObject> objects,
String key)
Adds a collection of objects to a given relationship by calling
addObjectToBothSidesOfRelationshipWithKey for all
objects in the collection. |
NSDictionary<String,Object> |
changesFromCommittedSnapshot()
Computes the current set of changes that this object has from the
currently committed snapshot.
|
Object |
committedSnapshotValueForKey(String key)
Determines what the value of the given key is in the committed
snapshot
|
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.
|
String |
encryptedPrimaryKey()
Takes the primary key of the object and encrypts it
with the blowfish cipher using
ERXCrypto . |
void |
flushCaches()
This is called when an object has had
changes merged into it by the editing context.
|
Object |
foreignKeyForRelationshipWithKey(String rel)
Returns the foreign key for a given relationship.
|
Logger |
getClassLog()
This methods checks if we already have created an Logger for this class
If not, one will be created, stored and returned on next request.
|
boolean |
isDeletedEO()
Determines if this object is a deleted object by
checking to see if it is included in the deletedObjects
array of the editing context or - if it's editing context
is null - it already has a global id.
|
boolean |
isNewObject()
Determines if this object is a new object and
hasn't been saved to the database yet.
|
<T extends com.webobjects.eocontrol.EOEnterpriseObject> |
localInstanceIn(com.webobjects.eocontrol.EOEditingContext ec)
Returns this EO in the supplied editing context.
|
<T extends com.webobjects.eocontrol.EOEnterpriseObject> |
localInstanceOf(T eo)
Returns an EO in the same editing context as the caller.
|
<T extends com.webobjects.eocontrol.EOEnterpriseObject> |
localInstancesOf(NSArray<T> eos)
Returns an array of EOs in the same editing context as the caller.
|
void |
mightDelete()
Called as part of the augmented transaction process.
|
boolean |
parentObjectStoreIsObjectStoreCoordinator()
Simple method that will return if the parent object store of this object's editing
context is an instance of
EOObjectStoreCoordinator . |
String |
primaryKey()
Primary key of the object as a String.
|
NSArray<String> |
primaryKeyAttributeNames()
Returns the names of all primary key attributes.
|
String |
primaryKeyInTransaction()
Calling this method will return the primary key of the
given enterprise object or if one has not been assigned
to it yet, then it will have the adaptor channel generate
one for it, cache it and then use that primary key when it
is saved to the database.
|
Object |
rawPrimaryKey()
Gives the raw primary key of the object.
|
Object |
rawPrimaryKeyInTransaction()
Calling this method will return the primary key of the
given enterprise object or if one has not been assigned
to it yet, then it will have the adaptor channel generate
one for it, cache it and then use that primary key when it
is saved to the database.
|
ERXEnterpriseObject |
refetchObjectFromDBinEditingContext(com.webobjects.eocontrol.EOEditingContext ec)
Method that will make sure to fetch an eo from the Database and
place it in the editingContext provided
as an argument
|
void |
removeObjectsFromBothSidesOfRelationshipWithKey(NSArray<? extends com.webobjects.eocontrol.EOEnterpriseObject> objects,
String key)
Removes a collection of objects to a given relationship by calling
removeObjectFromBothSidesOfRelationshipWithKey for all
objects in the collection. |
void |
removeObjectsFromPropertyWithKey(NSArray<? extends com.webobjects.eocontrol.EOEnterpriseObject> objects,
String key)
Removes a collection of objects to a given relationship by calling
removeObjectFromPropertyWithKey for all
objects in the collection. |
ERXEnterpriseObject |
self()
self is useful for D2W purposes
|
String |
toLongString()
Returns the super classes implementation of toString
which prints out the current key-value pairs for all
of the attributes and relationships for the current
object.
|
void |
trimSpaces()
This method will trim the leading and trailing white
space from any attributes that are mapped to a String
object.
|
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.
|
allPropertyKeys, attributeKeys, awakeFromClientUpdate, awakeFromFetch, awakeFromInsertion, changesFromSnapshot, classDescription, classDescriptionForDestinationKey, clearProperties, deleteRuleForRelationshipKey, editingContext, entityName, eoDescription, eoShallowDescription, inverseForRelationshipKey, invokeRemoteMethod, isReadOnly, isToManyKey, opaqueState, ownsDestinationObjectsForRelationshipKey, prepareValuesForClient, propagateDeleteWithEditingContext, reapplyChangesFromDictionary, snapshot, toManyRelationshipKeys, toOneRelationshipKeys, updateFromSnapshot, userPresentableDescription, willChange
takeValuesFromDictionary, takeValuesFromDictionaryWithMapping, valuesForKeys, valuesForKeysWithMapping
takeValueForKeyPath, valueForKeyPath
storedValueForKey, takeStoredValueForKey
takeValueForKey, valueForKey
handleQueryWithUnboundKey, handleTakeValueForUnboundKey, unableToSetNullForKey
addObjectToBothSidesOfRelationshipWithKey, addObjectToPropertyWithKey, removeObjectFromBothSidesOfRelationshipWithKey, removeObjectFromPropertyWithKey
validateClientUpdate, validateForDelete, validateForInsert, validateForSave, validateForUpdate
static final Logger logMod
static final boolean applyRestrictingQualifierOnInsert
static final ERXEnterpriseObject.Processor FlushCachesProcessor
static final ERXEnterpriseObject.Processor WillInsertProcessor
static final ERXEnterpriseObject.Processor DidInsertProcessor
static final ERXEnterpriseObject.Processor WillUpdateProcessor
static final ERXEnterpriseObject.Processor DidUpdateProcessor
static final ERXEnterpriseObject.Processor WillDeleteProcessor
static final ERXEnterpriseObject.Processor DidDeleteProcessor
static final ERXEnterpriseObject.Processor WillRevertProcessor
static final ERXEnterpriseObject.Processor DidRevertProcessor
static final Logger tranLogDidInsert
static final Logger tranLogDidDelete
static final Logger tranLogDidUpdate
static final Logger tranLogDidRevert
static final Logger tranLogMightDelete
static final Logger tranLogWillInsert
static final Logger tranLogWillDelete
static final Logger tranLogWillUpdate
static final Logger tranLogWillRevert
static final Logger validation
static final Logger validationException
static final Logger insertionTrackingLog
static final Logger log
static final String KEY_MARKER
Logger getClassLog()
Logger
for this objects classERXEnterpriseObject self()
void mightDelete()
void willDelete() throws com.webobjects.foundation.NSValidation.ValidationException
validateForDelete
is called on this
object. This method is called by the editing context
delegate ERXDefaultEditingContextDelegate
.NSValidation.ValidationException
- to stop the object
from being deleted.void willInsert()
validateForInsert
is called on this
object. This method is called by the editing context
delegate ERXDefaultEditingContextDelegate
.void willUpdate()
validateForSave
is called on this
object. This method is called by the editing context
delegate ERXDefaultEditingContextDelegate
.void flushCaches()
ERXDefaultEditingContextDelegate
after it merges changes. Any caches that an object
keeps based on any of it's values it should flush.
The default implementation of this method does
nothing.void didDelete(com.webobjects.eocontrol.EOEditingContext ec)
ec
is a child context when doing something here that
can't be undone.ec
- editing context that used to be associated
with the object.void didUpdate()
void didInsert()
void willRevert()
void didRevert(com.webobjects.eocontrol.EOEditingContext ec)
flushCaches
.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.void addObjectsToBothSidesOfRelationshipWithKey(NSArray<? extends com.webobjects.eocontrol.EOEnterpriseObject> objects, String key)
addObjectToBothSidesOfRelationshipWithKey
for all
objects in the collection.objects
- objects to add to both sides of the given relationshipkey
- relationship keyvoid removeObjectsFromBothSidesOfRelationshipWithKey(NSArray<? extends com.webobjects.eocontrol.EOEnterpriseObject> objects, String key)
removeObjectFromBothSidesOfRelationshipWithKey
for all
objects in the collection.objects
- objects to be removed from both sides of the given relationshipkey
- relationship keyvoid removeObjectsFromPropertyWithKey(NSArray<? extends com.webobjects.eocontrol.EOEnterpriseObject> objects, String key)
removeObjectFromPropertyWithKey
for all
objects in the collection.objects
- objects to be removed from both sides of the given relationshipkey
- relationship keyString primaryKey()
Object rawPrimaryKeyInTransaction()
rawPrimaryKey
.String primaryKeyInTransaction()
primaryKey
.Object rawPrimaryKey()
String encryptedPrimaryKey()
ERXCrypto
.Object foreignKeyForRelationshipWithKey(String rel)
rel
- relationship keyNSArray<String> primaryKeyAttributeNames()
Object committedSnapshotValueForKey(String key)
key
- to be checked in committed snapshot<T extends com.webobjects.eocontrol.EOEnterpriseObject> T localInstanceOf(T eo)
eo
- to local instance<T extends com.webobjects.eocontrol.EOEnterpriseObject> T localInstanceIn(com.webobjects.eocontrol.EOEditingContext ec)
ec
- editing context to local instance in<T extends com.webobjects.eocontrol.EOEnterpriseObject> NSArray<T> localInstancesOf(NSArray<T> eos)
eos
- array of EOs to local instanceNSDictionary<String,Object> changesFromCommittedSnapshot()
boolean parentObjectStoreIsObjectStoreCoordinator()
EOObjectStoreCoordinator
. The reason this is important
is because if this condition evaluates to true then when changes are saved in this
editing context they will be propagated to the database.ERXEnterpriseObject refetchObjectFromDBinEditingContext(com.webobjects.eocontrol.EOEditingContext ec)
ec
- the editing context in which the result will be placedString toLongString()
toString
.void trimSpaces()
boolean isDeletedEO()
boolean isNewObject()
boolean _setUpdateInverseRelationships(boolean newValue)
newValue
- whether or not inverse relationships should be updatedCopyright © 2002 – 2020 Project Wonder.