|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
JDORelationship is the super interface for all interfaces representing JDO relationship metadata of a managed field of a persistence-capable class.
Field Summary | |
static int |
CARDINALITY_N
Constant representing the cardinality n used for lower and upper bounds. |
static int |
CARDINALITY_ONE
Constant representing the cardinality one used for lower and upper bounds. |
static int |
CARDINALITY_ZERO
Constant representing the cardinality zero used for lower and upper bounds. |
Method Summary | |
JDOField |
getDeclaringField()
Get the declaring field of this JDORelationship. |
JDORelationship |
getInverseRelationship()
Get the inverse JDORelationship in the case of a two-way relationship. |
java.lang.String |
getInverseRelationshipName()
Get the relative name of the inverse relationship field for this relationship. |
int |
getLowerBound()
Get the lower cardinality bound for this relationship element. |
JDORelationship |
getMappedBy()
Get the mappedBy relationship. |
JDOClass |
getRelatedJDOClass()
Get the JDOClass corresponding to the type or element of this relationship. |
int |
getUpperBound()
Get the upper cardinality bound for this relationship element. |
boolean |
isJDOArray()
Determines whether this JDORelationship represents an array relationship or not. |
boolean |
isJDOCollection()
Determines whether this JDORelationship represents a collection relationship or not. |
boolean |
isJDOMap()
Determines whether this JDORelationship represents a map relationship or not. |
boolean |
isJDOReference()
Determines whether this JDORelationship represents a reference relationship or not. |
boolean |
isOwner()
Determines whether this side of a two-way relationship is the owning side. |
void |
setDeclaringField(JDOField declaringField)
Set the declaring field of this JDORelationship. |
void |
setInverseRelationship(JDORelationship inverseRelationship)
Deprecated. - call setMappedBy instead |
void |
setLowerBound(int lowerBound)
Set the lower cardinality bound for this relationship element. |
void |
setMappedBy(JDORelationship mappedBy)
Set the mappedBy relationship for this relationship. |
void |
setUpperBound(int upperBound)
Set the upper cardinality bound for this relationship element. |
Methods inherited from interface org.apache.jdo.model.jdo.JDOElement |
addPropertyChangeListener, addVetoableChangeListener, createJDOExtension, getJDOExtensions, removeJDOExtension, removePropertyChangeListener, removeVetoableChangeListener |
Field Detail |
public static final int CARDINALITY_ZERO
public static final int CARDINALITY_ONE
public static final int CARDINALITY_N
Method Detail |
public int getLowerBound()
public void setLowerBound(int lowerBound) throws ModelException
lowerBound
- an integer indicating the lower cardinality bound
ModelException
- if impossiblepublic int getUpperBound()
public void setUpperBound(int upperBound) throws ModelException
upperBound
- an integer indicating the upper cardinality bound
ModelException
- if impossiblepublic JDOField getDeclaringField()
null
if the element is not attached to any fieldpublic void setDeclaringField(JDOField declaringField) throws ModelException
declaringField
- the declaring field of this relationship element
ModelException
- if impossiblepublic JDOClass getRelatedJDOClass()
public JDORelationship getMappedBy()
null
if there is no mappedBy relationship set and there
is no mappedBy name specified on the declaring field.
null
otherwise.public void setMappedBy(JDORelationship mappedBy) throws ModelException
mappedBy
- the mappedBy relationship.
ModelException
- if impossiblepublic java.lang.String getInverseRelationshipName()
null
. Note that it is possible to have
this method return a value, but because of the combination of
related class and lookup, there may be no corresponding
JDORelationship which can be found.
getInverseRelationship()
public JDORelationship getInverseRelationship()
public void setInverseRelationship(JDORelationship inverseRelationship) throws ModelException
inverseRelationship
- the inverse relationship
ModelException
- if impossiblepublic boolean isOwner()
true
if this side is the owning side;
false
otherwise.public boolean isJDOReference()
true
means this
JDORelationship is a JDOReference instance.
true
if this JDORelationship represents a
reference relationship; false
otherwise.public boolean isJDOCollection()
true
means this
JDORelationship is a JDOCollection instance.
true
if this JDORelationship represents a
collection relationship; false
otherwise.public boolean isJDOArray()
true
means this
JDORelationship is a JDOArray instance.
true
if this JDORelationship represents an
array relationship; false
otherwise.public boolean isJDOMap()
true
means this
JDORelationship is a JDOMap instance.
true
if this JDORelationship represents a
map relationship; false
otherwise.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |