|
WebObjects 5.2.3 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.webobjects.eodistribution.client.EORelationship
An EORelationship describes an association between two entities. The two entities can be in the same model or two different models as long as they are in the same model group. The assocation can be to-one or to-many, and is directional: no inverse is implied, however an inverse relationship may exist.
A relationship belongs to the 'source' entity, and is in many ways like
an attribute (of the source object), its value being the related EOEnterpriseObject
(or null
) in the case of a to-one relationship, and an NSArray of
EOEnterpriseObjects (possibly empty) in the case of a to-many relationship.
Nested Class Summary |
Nested classes inherited from class com.webobjects.foundation.NSCoding |
NSCoding.Support |
Constructor Summary | |
EORelationship()
The constructor for EORelationship. |
Method Summary | |
Class |
classForCoder()
Returns the class that will be used by NSCoders to later re-create this object. |
static Object |
decodeObject(NSCoder coder)
Re-creates (decodes) an object of this class from the values stored in a NSCoder . |
int |
deleteRule()
Returns an integer constant specifiying the delete rule. |
String |
destinationName()
Returns the name of destination entity. |
void |
encodeWithCoder(NSCoder coder)
Encodes this object (its defining values) into the specified NSCoder . |
String |
inverseName()
Returns the name of the inverse relationship. |
boolean |
isMandatory()
Returns whether this relationship is mandatory, meaning there has to be (at least) one destination object, it cannot be null . |
boolean |
isToMany()
Returns whether this relationship is to-many, meaning its value is a (possibly empty) array of enterprise objects. |
String |
name()
Returns the name of this relationship. |
boolean |
ownsDestination()
Returns whether the related object(s) is (are) owned by the source object of this relationship. |
boolean |
propagatesPrimaryKey()
Returns whether the primary key of the source object is propagated to the destination object(s) of this relationship, so that these will have the same primary key. |
String |
toString()
Returns a readable String representation off this relationship's definitions. |
Object |
validateValue(Object value)
Validates value by performing several checks to see
whether value would be an acceptable value for the relationship. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public EORelationship()
Method Detail |
public Class classForCoder()
classForCoder
in interface NSCoding
public static Object decodeObject(NSCoder coder)
NSCoder
.
coder
- the coder with the encoded defining valuespublic int deleteRule()
EOClassDescription
public String destinationName()
public void encodeWithCoder(NSCoder coder)
NSCoder
.
encodeWithCoder
in interface NSCoding
coder
- the coder used to store the encoded definitionsNSCoder
public String inverseName()
public boolean isMandatory()
null
.
true
if the relationship is mandatory; false
otherwisepublic boolean isToMany()
null
.
true
if the relationship is to-many; false
otherwisepublic String name()
public boolean ownsDestination()
true
if the source object 'owns' the destination object(s); false
otherwisepublic boolean propagatesPrimaryKey()
true
if the primary key is propagated to the destination object(s); false
otherwisepublic String toString()
public Object validateValue(Object value) throws NSValidation.ValidationException
value
by performing several checks to see
whether value
would be an acceptable value for the relationship.
However, it currently will only check the 'mandatory' requirement, if set,
to verify that value
contains one object (or an array with at least one e lement)
value
- the object to be validated
value
, the converted value, or null
NSValidation.ValidationException
- if validation fails
|
Last updated Thu Oct 21 15:04:16 PDT 2004. | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |