|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.wotonomy.control.EOClassDescription
public class EOClassDescription
EOClassDescription provides meta-information about a class
and is used to customize certain behaviors within wotonomy
and specifically within editing contexts and object stores.
The default implementation works for most well-formed java beans,
but you will want to create your own subclass most typically
to customize the toOne and toMany relationships for your
class to ensure that an entire graph of objects is not
persisted in order to perist a single object.
The easiest way to register your subclass is to create it
in the same package as the class it describes but with
a "ClassDesc" suffix. For example, "my.package.MyEntity"
would be described by "my.package.MyEntityClassDesc".
Note that while the interface is the same, the implementation
of this class differs substantially from the specification
in order to be more useful for java classes.
Field Summary | |
---|---|
static java.lang.String |
ClassDescriptionNeededForClassNotification
Notification fired when a class description has been requested for a class. |
static java.lang.String |
ClassDescriptionNeededForEntityNameNotification
Notification fired when a class description has been requested for an entity name. |
static int |
DeleteRuleCascade
A delete rule specifying that object(s) referenced by this object should also be deleted when this object is deleted. |
static int |
DeleteRuleDeny
A delete rule specicying that this object should not be allowed to be deleted if it references any object(s). |
static int |
DeleteRuleNoAction
A delete rule specifying that no action be taken when this object is deleted. |
static int |
DeleteRuleNullify
A delete rule specifying that object(s) that reference this object should have those references set to null when this object is deleted. |
protected java.lang.Class |
theClass
|
Constructor Summary | |
---|---|
|
EOClassDescription()
|
protected |
EOClassDescription(java.lang.Class aClass)
Constructor may only be called by subclasses. |
Method Summary | |
---|---|
net.wotonomy.foundation.NSArray |
attributeKeys()
Returns a List of all the attributes for this class. |
void |
awakeObjectFromFetch(java.lang.Object object,
EOEditingContext anEditingContext)
This method is called when the specified object has been fetched into the specified editing context. |
void |
awakeObjectFromInsertion(java.lang.Object object,
EOEditingContext anEditingContext)
This method is called when the specified object has been inserted into the specified editing context. |
static EOClassDescription |
classDescriptionForClass(java.lang.Class aClass)
Returns the class description that corresponds to the specified class. |
EOClassDescription |
classDescriptionForDestinationKey(java.lang.String detailKey)
Returns the class decription for the object referenced by the specified relationship key, or null if the class description cannot be determined for that key. |
static EOClassDescription |
classDescriptionForEntityName(java.lang.String aName)
Returns the class description that corresponds to the specified entity name. |
java.lang.Object |
createInstanceWithEditingContext(EOEditingContext anEditingContext,
EOGlobalID globalID)
Creates a new instance of the class represented by this class description, registering it with the specified editing context and global id. |
int |
deleteRuleForRelationshipKey(java.lang.String relationshipKey)
Returns the delete rule to be used for the specified relationship key. |
java.lang.String |
displayNameForKey(java.lang.String key)
Returns a human-readable title for the specified key. |
java.lang.String |
entityName()
Returns a human-readable title for the class of objects that this class description represents. |
EOFetchSpecification |
fetchSpecificationNamed(java.lang.String aString)
Returns the fetch specification associated with this class description that corresponds to the specified name, or null if not found. |
java.lang.Class |
getDescribedClass()
Returns the Java Class that this description describes. |
static void |
invalidateClassDescriptionCache()
Clears all cached class descriptions so that new requests for class descriptions will be re-loaded on-demand. |
java.lang.String |
inverseForRelationshipKey(java.lang.String relationshipKey)
Returns the relationship key by which the object at the other end of the specified relationship key refers to this object, or null if not found. |
boolean |
ownsDestinationObjectsForRelationshipKey(java.lang.String relationshipKey)
|
void |
propagateDeleteForObject(java.lang.Object object,
EOEditingContext anEditingContext)
Called when this object has been deleted from the specified editing context. |
static void |
registerClassDescription(EOClassDescription description,
java.lang.Class aClass)
Registers the specified class descriptiong for the specified class. |
net.wotonomy.foundation.NSArray |
toManyRelationshipKeys()
Returns a List of the "to many" relationships for this class. |
net.wotonomy.foundation.NSArray |
toOneRelationshipKeys()
Returns a List of the "to one" relationships for this class. |
java.lang.String |
userPresentableDescriptionForObject(java.lang.Object anObject)
Returns a human-readable description of the specified object that should not exceed 60 characters. |
void |
validateObjectForDelete(java.lang.Object object)
Verifies that the specified object may be deleted. |
void |
validateObjectForSave(java.lang.Object object)
Verifies that the specified object may be saved. |
java.lang.Object |
validateValueForKey(java.lang.Object value,
java.lang.String key)
Validates the specified value for the specified key on this this class. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int DeleteRuleNullify
public static final int DeleteRuleCascade
public static final int DeleteRuleDeny
public static final int DeleteRuleNoAction
public static final java.lang.String ClassDescriptionNeededForClassNotification
public static final java.lang.String ClassDescriptionNeededForEntityNameNotification
protected java.lang.Class theClass
Constructor Detail |
---|
public EOClassDescription()
protected EOClassDescription(java.lang.Class aClass)
Method Detail |
---|
public static EOClassDescription classDescriptionForClass(java.lang.Class aClass)
public static EOClassDescription classDescriptionForEntityName(java.lang.String aName)
public static void invalidateClassDescriptionCache()
public static void registerClassDescription(EOClassDescription description, java.lang.Class aClass)
public net.wotonomy.foundation.NSArray attributeKeys()
public void awakeObjectFromFetch(java.lang.Object object, EOEditingContext anEditingContext)
public void awakeObjectFromInsertion(java.lang.Object object, EOEditingContext anEditingContext)
public EOClassDescription classDescriptionForDestinationKey(java.lang.String detailKey)
public java.lang.Object createInstanceWithEditingContext(EOEditingContext anEditingContext, EOGlobalID globalID)
public int deleteRuleForRelationshipKey(java.lang.String relationshipKey)
public java.lang.String displayNameForKey(java.lang.String key)
public java.lang.String entityName()
public EOFetchSpecification fetchSpecificationNamed(java.lang.String aString)
public java.lang.String inverseForRelationshipKey(java.lang.String relationshipKey)
public boolean ownsDestinationObjectsForRelationshipKey(java.lang.String relationshipKey)
public void propagateDeleteForObject(java.lang.Object object, EOEditingContext anEditingContext)
public net.wotonomy.foundation.NSArray toManyRelationshipKeys()
public net.wotonomy.foundation.NSArray toOneRelationshipKeys()
public java.lang.String userPresentableDescriptionForObject(java.lang.Object anObject)
public void validateObjectForDelete(java.lang.Object object)
public void validateObjectForSave(java.lang.Object object)
public java.lang.Object validateValueForKey(java.lang.Object value, java.lang.String key)
public java.lang.Class getDescribedClass()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |