|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jdo.impl.model.jdo.JDOElementImpl
org.apache.jdo.impl.model.jdo.JDORelationshipImpl
JDORelationship is the super interface for all interfaces representing JDO relationship metadata of a managed field of a persistence capable class.
Field Summary | |
protected JDORelationship |
inverse
Relationship JDORelationship<->JDORelationship. |
protected JDORelationship |
mappedBy
Relationship JDORelationship<->JDORelationship. |
Fields inherited from interface org.apache.jdo.model.jdo.JDORelationship |
CARDINALITY_N, CARDINALITY_ONE, CARDINALITY_ZERO |
Constructor Summary | |
JDORelationshipImpl()
|
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. |
abstract JavaType |
getRelatedJavaType()
Get the type representation of the 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)
Set the inverse JDORelationship in the case of a two-way relationship. |
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 class org.apache.jdo.impl.model.jdo.JDOElementImpl |
addPropertyChangeListener, addVetoableChangeListener, createJDOExtension, firePropertyChange, fireVetoableChange, getJDOExtensions, removeJDOExtension, removePropertyChangeListener, removeVetoableChangeListener |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.jdo.model.jdo.JDOElement |
addPropertyChangeListener, addVetoableChangeListener, createJDOExtension, getJDOExtensions, removeJDOExtension, removePropertyChangeListener, removeVetoableChangeListener |
Field Detail |
protected JDORelationship mappedBy
protected JDORelationship inverse
Constructor Detail |
public JDORelationshipImpl()
Method Detail |
public int getLowerBound()
getLowerBound
in interface JDORelationship
public void setLowerBound(int lowerBound)
setLowerBound
in interface JDORelationship
lowerBound
- an integer indicating the lower cardinality boundpublic int getUpperBound()
getUpperBound
in interface JDORelationship
public void setUpperBound(int upperBound)
setUpperBound
in interface JDORelationship
upperBound
- an integer indicating the upper cardinality boundpublic JDOField getDeclaringField()
getDeclaringField
in interface JDORelationship
null
if the element is not attached to any fieldpublic void setDeclaringField(JDOField declaringField)
setDeclaringField
in interface JDORelationship
declaringField
- the declaring field of this relationship elementpublic JDOClass getRelatedJDOClass()
getRelatedJDOClass
in interface JDORelationship
public JDORelationship getMappedBy()
null
if there is no mappedBy relationship set and there
is no mappedBy name specified on the declaring field.
getMappedBy
in interface JDORelationship
null
otherwise.public void setMappedBy(JDORelationship mappedBy) throws ModelException
setMappedBy
in interface JDORelationship
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.
getInverseRelationshipName
in interface JDORelationship
getInverseRelationship()
public JDORelationship getInverseRelationship()
getInverseRelationship
in interface JDORelationship
public void setInverseRelationship(JDORelationship inverseRelationship) throws ModelException
Warning: this methods casts the existing and the specified inverse relationship instance to JDORelationshipImpl.
setInverseRelationship
in interface JDORelationship
inverseRelationship
- the inverse relationship
ModelException
- if impossiblepublic boolean isOwner()
isOwner
in interface JDORelationship
true
if this side is the owning side;
false
otherwise.public boolean isJDOReference()
true
means this
JDORelationship is a JDOReference instance.
isJDOReference
in interface JDORelationship
true
if this JDORelationship represents a
reference relationship; false
otherwise.public boolean isJDOCollection()
true
means this
JDORelationship is a JDOCollection instance.
isJDOCollection
in interface JDORelationship
true
if this JDORelationship represents a
collection relationship; false
otherwise.public boolean isJDOArray()
true
means this
JDORelationship is a JDOArray instance.
isJDOArray
in interface JDORelationship
true
if this JDORelationship represents an
array relationship; false
otherwise.public boolean isJDOMap()
true
means this
JDORelationship is a JDOMap instance.
isJDOMap
in interface JDORelationship
true
if this JDORelationship represents a
map relationship; false
otherwise.public abstract JavaType getRelatedJavaType()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |