public interface JDORelationship extends JDOElement
| Modifier and Type | Field and Description |
|---|---|
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.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
addPropertyChangeListener, addVetoableChangeListener, createJDOExtension, getJDOExtensions, removeJDOExtension, removePropertyChangeListener, removeVetoableChangeListenerstatic final int CARDINALITY_ZERO
static final int CARDINALITY_ONE
static final int CARDINALITY_N
int getLowerBound()
void setLowerBound(int lowerBound)
throws ModelException
lowerBound - an integer indicating the lower cardinality boundModelException - if impossibleint getUpperBound()
void setUpperBound(int upperBound)
throws ModelException
upperBound - an integer indicating the upper cardinality boundModelException - if impossibleJDOField getDeclaringField()
null
if the element is not attached to any fieldvoid setDeclaringField(JDOField declaringField) throws ModelException
declaringField - the declaring field of this relationship elementModelException - if impossibleJDOClass getRelatedJDOClass()
JDORelationship getMappedBy()
null if there is no mappedBy relationship set and there
is no mappedBy name specified on the declaring field.null
otherwise.void setMappedBy(JDORelationship mappedBy) throws ModelException
mappedBy - the mappedBy relationship.ModelException - if impossiblejava.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()JDORelationship getInverseRelationship()
void setInverseRelationship(JDORelationship inverseRelationship) throws ModelException
inverseRelationship - the inverse relationshipModelException - if impossibleboolean isOwner()
true if this side is the owning side;
false otherwise.boolean isJDOReference()
true means this
JDORelationship is a JDOReference instance.true if this JDORelationship represents a
reference relationship; false otherwise.boolean isJDOCollection()
true means this
JDORelationship is a JDOCollection instance.true if this JDORelationship represents a
collection relationship; false otherwise.boolean isJDOArray()
true means this
JDORelationship is a JDOArray instance.true if this JDORelationship represents an
array relationship; false otherwise.boolean isJDOMap()
true means this
JDORelationship is a JDOMap instance.true if this JDORelationship represents a
map relationship; false otherwise.Copyright © 2005-2012 Apache Software Foundation. All Rights Reserved.