|
Project Wonder 5.0 | |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ERXEnterpriseObject
Nested Class Summary | |
---|---|
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
|
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._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.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 |
Field Summary | |
---|---|
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 java.lang.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
|
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 |
Method Summary | |
---|---|
boolean |
_setUpdateInverseRelationships(boolean newValue)
Toggles whether or not inverse relationships should be updates. |
void |
addObjectsToBothSidesOfRelationshipWithKey(com.webobjects.foundation.NSArray objects,
java.lang.String key)
Adds a collection of objects to a given relationship by calling addObjectToBothSidesOfRelationshipWithKey for all
objects in the collection. |
void |
batchCheckConsistency()
This method is very similar to the checkConsistency method
except that this method is only called from an outside process, usually
a batch process, to verify that the data this object holds is consistent. |
com.webobjects.foundation.NSDictionary |
changesFromCommittedSnapshot()
Computes the current set of changes that this object has from the currently committed snapshot. |
void |
checkConsistency()
Debugging method that will be called on an object before it is saved to the database if the property key: ERDebuggingEnabled is enabled. |
java.lang.Object |
committedSnapshotValueForKey(java.lang.String key)
Determines what the value of the given key is in the committed snapshot |
java.lang.String |
description()
Cover method to return toString . |
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. |
java.lang.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. |
java.lang.Object |
foreignKeyForRelationshipWithKey(java.lang.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. |
com.webobjects.eocontrol.EOEnterpriseObject |
localInstanceIn(com.webobjects.eocontrol.EOEditingContext ec)
Returns this EO in the supplied editing context. |
com.webobjects.eocontrol.EOEnterpriseObject |
localInstanceOf(com.webobjects.eocontrol.EOEnterpriseObject eo)
Returns an EO in the same editing context as the caller. |
com.webobjects.foundation.NSArray |
localInstancesOf(com.webobjects.foundation.NSArray 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 . |
java.lang.String |
primaryKey()
Primary key of the object as a String. |
com.webobjects.foundation.NSArray |
primaryKeyAttributeNames()
Returns the names of all primary key attributes. |
java.lang.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. |
java.lang.Object |
rawPrimaryKey()
Gives the raw primary key of the object. |
java.lang.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(com.webobjects.foundation.NSArray objects,
java.lang.String key)
Removes a collection of objects to a given relationship by calling removeObjectFromBothSidesOfRelationshipWithKey for all
objects in the collection. |
void |
removeObjectsFromPropertyWithKey(com.webobjects.foundation.NSArray objects,
java.lang.String key)
Removes a collection of objects to a given relationship by calling removeObjectFromPropertyWithKey for all
objects in the collection. |
ERXEnterpriseObject |
self()
self is usefull for directtoweb purposes |
java.lang.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. |
Methods inherited from interface com.webobjects.eocontrol.EOEnterpriseObject |
---|
allPropertyKeys, attributeKeys, awakeFromClientUpdate, awakeFromFetch, awakeFromInsertion, changesFromSnapshot, classDescription, classDescriptionForDestinationKey, clearProperties, deleteRuleForRelationshipKey, editingContext, entityName, eoDescription, eoShallowDescription, inverseForRelationshipKey, invokeRemoteMethod, isToManyKey, opaqueState, ownsDestinationObjectsForRelationshipKey, prepareValuesForClient, propagateDeleteWithEditingContext, reapplyChangesFromDictionary, snapshot, toManyRelationshipKeys, toOneRelationshipKeys, updateFromSnapshot, 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, takeStoredValueForKey |
Methods inherited from interface com.webobjects.foundation.NSKeyValueCoding |
---|
takeValueForKey, valueForKey |
Methods inherited from interface com.webobjects.foundation.NSKeyValueCoding.ErrorHandling |
---|
handleQueryWithUnboundKey, handleTakeValueForUnboundKey, unableToSetNullForKey |
Methods inherited from interface com.webobjects.eocontrol.EORelationshipManipulation |
---|
addObjectToBothSidesOfRelationshipWithKey, addObjectToPropertyWithKey, removeObjectFromBothSidesOfRelationshipWithKey, removeObjectFromPropertyWithKey |
Methods inherited from interface com.webobjects.eocontrol.EOValidation |
---|
validateClientUpdate, validateForDelete, validateForInsert, validateForSave, validateForUpdate |
Methods inherited from interface com.webobjects.foundation.NSValidation |
---|
validateTakeValueForKeyPath, validateValueForKey |
Methods inherited from interface com.webobjects.eocontrol.EODeferredFaulting |
---|
willReadRelationship |
Methods inherited from interface com.webobjects.eocontrol.EOFaulting |
---|
clearFault, faultHandler, isFault, turnIntoFault, willRead |
Field Detail |
---|
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 java.lang.String KEY_MARKER
Method Detail |
---|
org.apache.log4j.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(com.webobjects.foundation.NSArray objects, java.lang.String key)
addObjectToBothSidesOfRelationshipWithKey
for all
objects in the collection.
objects
- objects to add to both sides of the given relationshipkey
- relationship keyvoid removeObjectsFromBothSidesOfRelationshipWithKey(com.webobjects.foundation.NSArray objects, java.lang.String key)
removeObjectFromBothSidesOfRelationshipWithKey
for all
objects in the collection.
objects
- objects to be removed from both sides of the given relationshipkey
- relationship keyvoid removeObjectsFromPropertyWithKey(com.webobjects.foundation.NSArray objects, java.lang.String key)
removeObjectFromPropertyWithKey
for all
objects in the collection.
objects
- objects to be removed from both sides of the given relationshipkey
- relationship keyjava.lang.String primaryKey()
java.lang.Object rawPrimaryKeyInTransaction()
rawPrimaryKey
.
java.lang.String primaryKeyInTransaction()
primaryKey
.
java.lang.Object rawPrimaryKey()
java.lang.String encryptedPrimaryKey()
ERXCrypto
.
java.lang.Object foreignKeyForRelationshipWithKey(java.lang.String rel)
rel
- relationship key
com.webobjects.foundation.NSArray primaryKeyAttributeNames()
java.lang.Object committedSnapshotValueForKey(java.lang.String key)
key
- to be checked in committed snapshot
com.webobjects.eocontrol.EOEnterpriseObject localInstanceOf(com.webobjects.eocontrol.EOEnterpriseObject eo)
com.webobjects.eocontrol.EOEnterpriseObject localInstanceIn(com.webobjects.eocontrol.EOEditingContext ec)
com.webobjects.foundation.NSArray localInstancesOf(com.webobjects.foundation.NSArray eos)
com.webobjects.foundation.NSDictionary 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 placed
java.lang.String description()
toString
.
java.lang.String toLongString()
toString
.void trimSpaces()
boolean isDeletedEO()
boolean isNewObject()
void checkConsistency() throws com.webobjects.foundation.NSValidation.ValidationException
NSValidation.ValidationException
- if the object is not consistentvoid batchCheckConsistency() throws com.webobjects.foundation.NSValidation.ValidationException
checkConsistency
method
except that this method is only called from an outside process, usually
a batch process, to verify that the data this object holds is consistent.
JUnit tests are great for testing that all of the methods of a single
object function correctly, batch checking of consistency is a good way
of checking that all of the data in a given database is consistent. Hopefully
in the future we will add a batch check consistency application to demonstrate
the use of this method.
NSValidation.ValidationException
- if the object fails consistencyboolean _setUpdateInverseRelationships(boolean newValue)
newValue
- whether or not inverse relationships should be updated
|
Last updated: Tue, Feb 21, 2017 05:45 PM CET | |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |