public interface ERXEnterpriseObject extends 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 |
EOKeyValueCodingAdditions.DefaultImplementation, EOKeyValueCodingAdditions.Utility
EOKeyValueCoding._BestBindingCreation, EOKeyValueCoding._KeyBindingCreation, EOKeyValueCoding._StoredForwardingBinding
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
NSValidation._MethodBinding, NSValidation._ValidationBinding, NSValidation.ValidationException
Modifier and Type | Field and Description |
---|---|
static boolean |
applyRestrictingQualifierOnInsert |
static ERXEnterpriseObject.Processor |
DidDeleteProcessor |
static ERXEnterpriseObject.Processor |
DidInsertProcessor |
static ERXEnterpriseObject.Processor |
DidRevertProcessor |
static ERXEnterpriseObject.Processor |
DidUpdateProcessor |
static ERXEnterpriseObject.Processor |
FlushCachesProcessor |
static org.apache.log4j.Logger |
insertionTrackingLog
logging support for insertion tracking
|
static String |
KEY_MARKER |
static org.apache.log4j.Logger |
log
general logging support
|
static org.apache.log4j.Logger |
logMod
logging support for modified objects
|
static org.apache.log4j.Logger |
tranLogDidDelete
logging support.
|
static org.apache.log4j.Logger |
tranLogDidInsert
logging support.
|
static org.apache.log4j.Logger |
tranLogDidRevert
logging support.
|
static org.apache.log4j.Logger |
tranLogDidUpdate
logging support.
|
static org.apache.log4j.Logger |
tranLogMightDelete
logging support.
|
static org.apache.log4j.Logger |
tranLogWillDelete
logging support.
|
static org.apache.log4j.Logger |
tranLogWillInsert
logging support.
|
static org.apache.log4j.Logger |
tranLogWillRevert
logging support.
|
static org.apache.log4j.Logger |
tranLogWillUpdate
logging support.
|
static org.apache.log4j.Logger |
validation
logging support for validation information
|
static org.apache.log4j.Logger |
validationException
logging support for validation exceptions
|
static ERXEnterpriseObject.Processor |
WillDeleteProcessor |
static ERXEnterpriseObject.Processor |
WillInsertProcessor |
static ERXEnterpriseObject.Processor |
WillRevertProcessor |
static ERXEnterpriseObject.Processor |
WillUpdateProcessor |
_CLASS
_KeyPathSeparatorChar, KeyPathSeparator
NullValue
Modifier and Type | Method and Description |
---|---|
boolean |
_setUpdateInverseRelationships(boolean newValue)
Toggles whether or not inverse relationships should be updates.
|
void |
addObjectsToBothSidesOfRelationshipWithKey(NSArray<? extends 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(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.
|
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.
|
org.apache.log4j.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 EOEnterpriseObject> |
localInstanceIn(EOEditingContext ec)
Returns this EO in the supplied editing context.
|
<T extends EOEnterpriseObject> |
localInstanceOf(T eo)
Returns an EO in the same editing context as the caller.
|
<T extends 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(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 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 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
validateTakeValueForKeyPath, validateValueForKey
willReadRelationship
clearFault, faultHandler, isFault, turnIntoFault, willRead
static final org.apache.log4j.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 org.apache.log4j.Logger tranLogDidInsert
static final org.apache.log4j.Logger tranLogDidDelete
static final org.apache.log4j.Logger tranLogDidUpdate
static final org.apache.log4j.Logger tranLogDidRevert
static final org.apache.log4j.Logger tranLogMightDelete
static final org.apache.log4j.Logger tranLogWillInsert
static final org.apache.log4j.Logger tranLogWillDelete
static final org.apache.log4j.Logger tranLogWillUpdate
static final org.apache.log4j.Logger tranLogWillRevert
static final org.apache.log4j.Logger validation
static final org.apache.log4j.Logger validationException
static final org.apache.log4j.Logger insertionTrackingLog
static final org.apache.log4j.Logger log
static final String KEY_MARKER
org.apache.log4j.Logger getClassLog()
Logger
for this objects classERXEnterpriseObject self()
void mightDelete()
void willDelete() throws 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(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(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 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 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 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 EOEnterpriseObject> T localInstanceOf(T eo)
eo
- to local instance<T extends EOEnterpriseObject> T localInstanceIn(EOEditingContext ec)
ec
- editing context to local instance in<T extends 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(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 – 2024 Project Wonder.