org.apache.jdo.impl.model.jdo
Class JDORelationshipImpl

java.lang.Object
  extended byorg.apache.jdo.impl.model.jdo.JDOElementImpl
      extended byorg.apache.jdo.impl.model.jdo.JDORelationshipImpl
All Implemented Interfaces:
JDOElement, JDORelationship
Direct Known Subclasses:
JDOArrayImplDynamic, JDOCollectionImplDynamic, JDOMapImplDynamic, JDOReferenceImpl

public abstract class JDORelationshipImpl
extends JDOElementImpl
implements JDORelationship

JDORelationship is the super interface for all interfaces representing JDO relationship metadata of a managed field of a persistence capable class.

Author:
Michael Bouschen

Field Summary
private  JDOField declaringField
          Relationship JDOField<->JDORelationship.
private  JDORelationship inverse
          Relationship JDORelationship<->JDORelationship.
private  int lowerBound
          Property lowerBound.
private  int upperBound
          Property upperBound.
 
Fields inherited from class org.apache.jdo.impl.model.jdo.JDOElementImpl
 
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 managed relationship.
 int getLowerBound()
          Get the lower cardinality bound for this relationship element.
 int getUpperBound()
          Get the upper cardinality bound for this relationship element.
 void setDeclaringField(JDOField declaringField)
          Set the declaring field of this JDORelationship.
 void setInverseRelationship(JDORelationship inverseRelationship)
          Set the inverse JDORelationship in the case of a managed relationship.
 void setLowerBound(int lowerBound)
          Set the lower cardinality bound for this relationship element.
 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

lowerBound

private int lowerBound
Property lowerBound. No default.


upperBound

private int upperBound
Property upperBound. No default.


declaringField

private JDOField declaringField
Relationship JDOField<->JDORelationship.


inverse

private JDORelationship inverse
Relationship JDORelationship<->JDORelationship.

Constructor Detail

JDORelationshipImpl

public JDORelationshipImpl()
Method Detail

getLowerBound

public int getLowerBound()
Get the lower cardinality bound for this relationship element.

Specified by:
getLowerBound in interface JDORelationship
Returns:
the lower cardinality bound

setLowerBound

public void setLowerBound(int lowerBound)
Set the lower cardinality bound for this relationship element.

Specified by:
setLowerBound in interface JDORelationship
Parameters:
lowerBound - an integer indicating the lower cardinality bound

getUpperBound

public int getUpperBound()
Get the upper cardinality bound for this relationship element.

Specified by:
getUpperBound in interface JDORelationship
Returns:
the upper cardinality bound

setUpperBound

public void setUpperBound(int upperBound)
Set the upper cardinality bound for this relationship element.

Specified by:
setUpperBound in interface JDORelationship
Parameters:
upperBound - an integer indicating the upper cardinality bound

getDeclaringField

public JDOField getDeclaringField()
Get the declaring field of this JDORelationship.

Specified by:
getDeclaringField in interface JDORelationship
Returns:
the field that owns this JDORelationship, or null if the element is not attached to any field

setDeclaringField

public void setDeclaringField(JDOField declaringField)
Set the declaring field of this JDORelationship.

Specified by:
setDeclaringField in interface JDORelationship
Parameters:
declaringField - the declaring field of this relationship element

getInverseRelationship

public JDORelationship getInverseRelationship()
Get the inverse JDORelationship in the case of a managed relationship.

Specified by:
getInverseRelationship in interface JDORelationship
Returns:
the inverse relationship

setInverseRelationship

public void setInverseRelationship(JDORelationship inverseRelationship)
Set the inverse JDORelationship in the case of a managed relationship.

Specified by:
setInverseRelationship in interface JDORelationship
Parameters:
inverseRelationship - the inverse relationship