|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.wotonomy.control.EOCustomObject
public class EOCustomObject
EOCustomObject implements all the necessary interfaces to receive first-class treatment from the control framework. The implementation delegates as much class meta-behavior as possible to EOClassDescription, letting subclasses focus exclusively on business logic while still allowing them to customize as much class behavior as needed.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface net.wotonomy.control.EOKeyValueCodingAdditions |
---|
EOKeyValueCodingAdditions.DefaultImplementation, EOKeyValueCodingAdditions.Utility |
Nested classes/interfaces inherited from interface net.wotonomy.foundation.NSKeyValueCoding |
---|
net.wotonomy.foundation.NSKeyValueCoding.Null |
Nested classes/interfaces inherited from interface net.wotonomy.foundation.NSKeyValueCoding |
---|
net.wotonomy.foundation.NSKeyValueCoding.Null |
Field Summary |
---|
Fields inherited from interface net.wotonomy.foundation.NSKeyValueCoding |
---|
NullValue |
Fields inherited from interface net.wotonomy.foundation.NSKeyValueCoding |
---|
NullValue |
Constructor Summary | |
---|---|
EOCustomObject()
Default constructor initializes private state. |
|
EOCustomObject(EOEditingContext aContext,
EOClassDescription aClassDescription,
EOGlobalID aGlobalID)
Preferred constructor, specifying an editing context, a class description, and a global id, any or all of which may be null. |
Method Summary | |
---|---|
void |
addObjectToBothSidesOfRelationshipWithKey(EORelationshipManipulation anObject,
java.lang.String aKey)
As addObjectToProperty with key, but also performs the reciprocal operation on the other side of the relationship. |
void |
addObjectToPropertyWithKey(java.lang.Object anObject,
java.lang.String aKey)
Adds the specified object to the relationship on this object specified by the key. |
net.wotonomy.foundation.NSArray |
allPropertyKeys()
Returns a List of all property keys defined on this object. |
net.wotonomy.foundation.NSArray |
attributeKeys()
Returns a list of all attributes defined on this object. |
void |
awakeFromFetch(EOEditingContext anEditingContext)
Called when the object has first been fetched into the specified editing context. |
void |
awakeFromInsertion(EOEditingContext anEditingContext)
Called when the object has been inserted into the specified editing context. |
static boolean |
canAccessFieldsDirectly()
Specifies whether the implementation of EOKeyValueCoding is permitted to access field directly. |
net.wotonomy.foundation.NSDictionary |
changesFromSnapshot(net.wotonomy.foundation.NSDictionary snapshot)
Returns a Map representing the delta of the current state from the state represented in the specified snapshot. |
EOClassDescription |
classDescription()
Returns a class description for this object. |
EOClassDescription |
classDescriptionForDestinationKey(java.lang.String aKey)
Returns a class description for the object at the other end of the specified relationship key. |
void |
clearFault()
Called by EOFaultHandler to prepare the object to be turned into a fault. |
void |
clearProperties()
Clears all property values for this object. |
int |
deleteRuleForRelationshipKey(java.lang.String aRelationshipKey)
Returns the delete rule constant defined on EOClassDescription for the relationship defined by the specified key. |
EOEditingContext |
editingContext()
Returns the editing context in which this object is registered. |
java.lang.String |
entityName()
Returns the name of the entity that this object represents. |
java.lang.String |
eoDescription()
Returns a String containing all property keys and values for this object. |
java.lang.String |
eoShallowDescription()
Returns a String containing all attribute keys and values for this object. |
EOFaultHandler |
faultHandler()
Returns this object's EOFaultHandler. |
java.lang.Object |
handleQueryWithUnboundKey(java.lang.String aKey)
Called by valueForKey when the specified key is not found on this object. |
void |
handleTakeValueForUnboundKey(java.lang.Object aValue,
java.lang.String aKey)
Called by takeValueForKey when the specified key is not found on this object. |
java.lang.String |
inverseForRelationshipKey(java.lang.String aRelationshipKey)
Returns the key used to reference this object on the object at the other end of the specified relationship. |
boolean |
isFault()
Returns whether this object is currently a fault. |
boolean |
isToManyKey(java.lang.String aKey)
Returns whether the specified relationship key represents a to-many relationship. |
boolean |
ownsDestinationObjectsForRelationshipKey(java.lang.String aKey)
Returns whether the objects at the other end of the specified relationship should be deleted when this object is deleted. |
void |
propagateDeleteWithEditingContext(EOEditingContext aContext)
Called to perform the delete propagation for this object on the specified editing context. |
void |
reapplyChangesFromDictionary(net.wotonomy.foundation.NSDictionary aDeltaSnapshot)
Applies the changes from the specified snapshot to this object. |
void |
removeObjectFromBothSidesOfRelationshipWithKey(EORelationshipManipulation anObject,
java.lang.String aKey)
As removeObjectFromPropertyWithKey with key, but also performs the reciprocal operation on the other side of the relationship. |
void |
removeObjectFromPropertyWithKey(java.lang.Object anObject,
java.lang.String aKey)
Removes the specified object from the relationship on this object specified by the key. |
static boolean |
shouldUseStoredAccessors()
Specifies whether the implementation of EOKeyValueCoding is permitted to access private accessors. |
net.wotonomy.foundation.NSDictionary |
snapshot()
Returns a snapshot of the current state of this object. |
java.lang.Object |
storedValueForKey(java.lang.String aKey)
Returns the value for the private field that corresponds to the specified property. |
void |
takeStoredValueForKey(java.lang.Object aValue,
java.lang.String aKey)
Sets the the private field that corresponds to the specified property to the specified value. |
void |
takeValueForKey(java.lang.Object aValue,
java.lang.String aKey)
Sets the property to the specified value. |
void |
takeValueForKeyPath(java.lang.Object aValue,
java.lang.String aKeyPath)
Sets the value for the specified key path, which is a series of keys delimited by ".", for example: "createTime.year.length". |
void |
takeValuesFromDictionary(java.util.Map aMap)
Takes the keys from the specified map as properties and applies the corresponding values, each of which might be set by calling takeValueForKey. |
net.wotonomy.foundation.NSArray |
toManyRelationshipKeys()
Returns a List of the to-many relationship keys for this object. |
net.wotonomy.foundation.NSArray |
toOneRelationshipKeys()
Returns a List of the to-one relationship keys for this object. |
void |
turnIntoFault(EOFaultHandler aFaultHandler)
Turns this object into a fault using the specified fault handler. |
void |
unableToSetNullForKey(java.lang.String aKey)
Called by takeValueForKey when the type of the specified key is not allowed to be null, as is the case with primitive types. |
void |
updateFromSnapshot(net.wotonomy.foundation.NSDictionary aSnapshot)
Applies the specified snapshot to this object, converting NSNulls to null and calling takeStoredValueForKey for each key in the Map. |
java.lang.String |
userPresentableDescription()
Returns a short, stateful string representation of this object. |
static boolean |
usesDeferredFaultCreation()
Specifies whether deferred faults should be used. |
void |
validateForDelete()
Validates this object for delete. |
void |
validateForInsert()
Validates this object for insertion into the external store. |
void |
validateForSave()
Validates this object for a commit to the external store. |
void |
validateForUpdate()
Validates this object for update to the external store. |
java.lang.Object |
valueForKey(java.lang.String aKey)
Returns the value for the specified property. |
java.lang.Object |
valueForKeyPath(java.lang.String aKeyPath)
Returns the value for the specified key path, which is a series of keys delimited by ".", for example: "createTime.year.length". |
net.wotonomy.foundation.NSDictionary |
valuesForKeys(java.util.List aKeyList)
Returns a Map of the specified keys to their values, each of which might be obtained by calling valueForKey. |
void |
willChange()
This method should be called by each setter method on this object before changes are made to the object's internal state. |
void |
willRead()
Called to completely fire the fault, reading all attributes. |
void |
willRead(java.lang.String aKey)
Called to fire the fault for the specified key. |
java.lang.Object |
willReadRelationship(java.lang.Object anObject)
Returns a fault for the specified deferred fault. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EOCustomObject()
public EOCustomObject(EOEditingContext aContext, EOClassDescription aClassDescription, EOGlobalID aGlobalID)
Method Detail |
---|
public static boolean canAccessFieldsDirectly()
public static boolean shouldUseStoredAccessors()
public static boolean usesDeferredFaultCreation()
public net.wotonomy.foundation.NSArray allPropertyKeys()
allPropertyKeys
in interface EOEnterpriseObject
public net.wotonomy.foundation.NSArray attributeKeys()
attributeKeys
in interface EOEnterpriseObject
public void awakeFromFetch(EOEditingContext anEditingContext)
awakeFromFetch
in interface EOEnterpriseObject
public void awakeFromInsertion(EOEditingContext anEditingContext)
awakeFromInsertion
in interface EOEnterpriseObject
public net.wotonomy.foundation.NSDictionary changesFromSnapshot(net.wotonomy.foundation.NSDictionary snapshot)
changesFromSnapshot
in interface EOEnterpriseObject
public EOClassDescription classDescription()
classDescription
in interface EOEnterpriseObject
public EOClassDescription classDescriptionForDestinationKey(java.lang.String aKey)
classDescriptionForDestinationKey
in interface EOEnterpriseObject
public void clearProperties()
clearProperties
in interface EOEnterpriseObject
public int deleteRuleForRelationshipKey(java.lang.String aRelationshipKey)
deleteRuleForRelationshipKey
in interface EOEnterpriseObject
public EOEditingContext editingContext()
editingContext
in interface EOEnterpriseObject
public java.lang.String entityName()
entityName
in interface EOEnterpriseObject
public java.lang.String eoDescription()
eoDescription
in interface EOEnterpriseObject
public java.lang.String eoShallowDescription()
eoShallowDescription
in interface EOEnterpriseObject
public java.lang.String inverseForRelationshipKey(java.lang.String aRelationshipKey)
inverseForRelationshipKey
in interface EOEnterpriseObject
public boolean isToManyKey(java.lang.String aKey)
isToManyKey
in interface EOEnterpriseObject
public boolean ownsDestinationObjectsForRelationshipKey(java.lang.String aKey)
ownsDestinationObjectsForRelationshipKey
in interface EOEnterpriseObject
public void propagateDeleteWithEditingContext(EOEditingContext aContext)
propagateDeleteWithEditingContext
in interface EOEnterpriseObject
public void reapplyChangesFromDictionary(net.wotonomy.foundation.NSDictionary aDeltaSnapshot)
reapplyChangesFromDictionary
in interface EOEnterpriseObject
changesFromSnapshot(NSDictionary)
public net.wotonomy.foundation.NSDictionary snapshot()
snapshot
in interface EOEnterpriseObject
public net.wotonomy.foundation.NSArray toManyRelationshipKeys()
toManyRelationshipKeys
in interface EOEnterpriseObject
public net.wotonomy.foundation.NSArray toOneRelationshipKeys()
toOneRelationshipKeys
in interface EOEnterpriseObject
public void updateFromSnapshot(net.wotonomy.foundation.NSDictionary aSnapshot)
updateFromSnapshot
in interface EOEnterpriseObject
public java.lang.String userPresentableDescription()
userPresentableDescription
in interface EOEnterpriseObject
public void willChange()
willChange
in interface EOEnterpriseObject
public java.lang.Object valueForKey(java.lang.String aKey)
valueForKey
in interface EOKeyValueCoding
valueForKey
in interface net.wotonomy.foundation.NSKeyValueCoding
public void takeValueForKey(java.lang.Object aValue, java.lang.String aKey)
takeValueForKey
in interface EOKeyValueCoding
takeValueForKey
in interface net.wotonomy.foundation.NSKeyValueCoding
public java.lang.Object storedValueForKey(java.lang.String aKey)
storedValueForKey
in interface EOKeyValueCoding
storedValueForKey
in interface net.wotonomy.foundation.NSKeyValueCoding
public void takeStoredValueForKey(java.lang.Object aValue, java.lang.String aKey)
takeStoredValueForKey
in interface EOKeyValueCoding
takeStoredValueForKey
in interface net.wotonomy.foundation.NSKeyValueCoding
public java.lang.Object handleQueryWithUnboundKey(java.lang.String aKey)
handleQueryWithUnboundKey
in interface EOKeyValueCoding
handleQueryWithUnboundKey
in interface net.wotonomy.foundation.NSKeyValueCoding
public void handleTakeValueForUnboundKey(java.lang.Object aValue, java.lang.String aKey)
handleTakeValueForUnboundKey
in interface EOKeyValueCoding
handleTakeValueForUnboundKey
in interface net.wotonomy.foundation.NSKeyValueCoding
public void unableToSetNullForKey(java.lang.String aKey)
unableToSetNullForKey
in interface EOKeyValueCoding
unableToSetNullForKey
in interface net.wotonomy.foundation.NSKeyValueCoding
public java.lang.Object valueForKeyPath(java.lang.String aKeyPath)
valueForKeyPath
in interface net.wotonomy.foundation.NSKeyValueCodingAdditions
public void takeValueForKeyPath(java.lang.Object aValue, java.lang.String aKeyPath)
takeValueForKeyPath
in interface net.wotonomy.foundation.NSKeyValueCodingAdditions
public net.wotonomy.foundation.NSDictionary valuesForKeys(java.util.List aKeyList)
valuesForKeys
in interface net.wotonomy.foundation.NSKeyValueCodingAdditions
public void takeValuesFromDictionary(java.util.Map aMap)
takeValuesFromDictionary
in interface net.wotonomy.foundation.NSKeyValueCodingAdditions
public void clearFault()
clearFault
in interface EOFaulting
public EOFaultHandler faultHandler()
faultHandler
in interface EOFaulting
public boolean isFault()
isFault
in interface EOFaulting
public void turnIntoFault(EOFaultHandler aFaultHandler)
turnIntoFault
in interface EOFaulting
public void willRead()
willRead
in interface EOFaulting
public void willRead(java.lang.String aKey)
willRead
in interface EOFaulting
public java.lang.Object willReadRelationship(java.lang.Object anObject)
willReadRelationship
in interface EODeferredFaulting
public void addObjectToPropertyWithKey(java.lang.Object anObject, java.lang.String aKey)
addObjectToPropertyWithKey
in interface EORelationshipManipulation
public void removeObjectFromPropertyWithKey(java.lang.Object anObject, java.lang.String aKey)
removeObjectFromPropertyWithKey
in interface EORelationshipManipulation
public void addObjectToBothSidesOfRelationshipWithKey(EORelationshipManipulation anObject, java.lang.String aKey)
addObjectToBothSidesOfRelationshipWithKey
in interface EORelationshipManipulation
public void removeObjectFromBothSidesOfRelationshipWithKey(EORelationshipManipulation anObject, java.lang.String aKey)
removeObjectFromBothSidesOfRelationshipWithKey
in interface EORelationshipManipulation
public void validateForDelete()
validateForDelete
in interface EOValidation
public void validateForInsert()
validateForInsert
in interface EOValidation
public void validateForSave()
validateForSave
in interface EOValidation
public void validateForUpdate()
validateForUpdate
in interface EOValidation
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |