Save This Page
Home » jdo2-model-2.3-ea-src » org.apache.jdo.impl.model.jdo » [javadoc | source]
org.apache.jdo.impl.model.jdo
abstract public class: JDORelationshipImpl [javadoc | source]
java.lang.Object
   org.apache.jdo.impl.model.jdo.JDOElementImpl
      org.apache.jdo.impl.model.jdo.JDORelationshipImpl

All Implemented Interfaces:
    JDORelationship, JDOElement

Direct Known Subclasses:
    JDOMapImplCaching, JDOArrayImplDynamic, JDOArrayImplCaching, JDOCollectionImplDynamic, JDOMapImplDynamic, JDOReferenceImplDynamic, JDOReferenceImplCaching, JDOCollectionImplCaching

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 mappedBy    Relationship JDORelationship<->JDORelationship. 
protected  JDORelationship inverse    Relationship JDORelationship<->JDORelationship. 
Method from org.apache.jdo.impl.model.jdo.JDORelationshipImpl Summary:
getDeclaringField,   getInverseRelationship,   getInverseRelationshipName,   getLowerBound,   getMappedBy,   getRelatedJDOClass,   getRelatedJavaType,   getUpperBound,   isJDOArray,   isJDOCollection,   isJDOMap,   isJDOReference,   isOwner,   setDeclaringField,   setInverseRelationship,   setLowerBound,   setMappedBy,   setUpperBound
Methods from org.apache.jdo.impl.model.jdo.JDOElementImpl:
addPropertyChangeListener,   addVetoableChangeListener,   createJDOExtension,   firePropertyChange,   fireVetoableChange,   getJDOExtensions,   removeJDOExtension,   removePropertyChangeListener,   removeVetoableChangeListener
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.jdo.impl.model.jdo.JDORelationshipImpl Detail:
 public JDOField getDeclaringField() 
    Get the declaring field of this JDORelationship.
 public JDORelationship getInverseRelationship() 
    Get the inverse JDORelationship in the case of a two-way relationship.
 public String getInverseRelationshipName() 
    Get the relative name of the inverse relationship field for this relationship. In the case of two-way relationships, the two relationships involved are inverses of each other. If this relationship element does not participate in a two-way relationship, this returns 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.
 public int getLowerBound() 
    Get the lower cardinality bound for this relationship element.
 public JDORelationship getMappedBy() 
    Get the mappedBy relationship. If there is no mappedBy relationship set, the method checks the mappedBy name as specified in the declaring field and resolves the relationship. The method return null if there is no mappedBy relationship set and there is no mappedBy name specified on the declaring field.
 public JDOClass getRelatedJDOClass() 
    Get the JDOClass corresponding to the type or element of this relationship.
 abstract public JavaType getRelatedJavaType()
    Get the type representation of the relationship. This will be the JavaType for references, the element type for collections and arrays, and the value type for maps.
 public int getUpperBound() 
    Get the upper cardinality bound for this relationship element.
 public boolean isJDOArray() 
    Determines whether this JDORelationship represents an array relationship or not. A return of true means this JDORelationship is a JDOArray instance.
 public boolean isJDOCollection() 
    Determines whether this JDORelationship represents a collection relationship or not. A return of true means this JDORelationship is a JDOCollection instance.
 public boolean isJDOMap() 
    Determines whether this JDORelationship represents a map relationship or not. A return of true means this JDORelationship is a JDOMap instance.
 public boolean isJDOReference() 
    Determines whether this JDORelationship represents a reference relationship or not. A return of true means this JDORelationship is a JDOReference instance.
 public boolean isOwner() 
    Determines whether this side of a two-way relationship is the owning side.
 public  void setDeclaringField(JDOField declaringField) 
    Set the declaring field of this JDORelationship.
 public  void setInverseRelationship(JDORelationship inverseRelationship) throws ModelException 
    Set the inverse JDORelationship in the case of a two-way relationship. The two relationship elements involved are set as inverses of each other and the old inverse is unset.

    Warning: this methods casts the existing and the specified inverse relationship instance to JDORelationshipImpl.

 public  void setLowerBound(int lowerBound) 
    Set the lower cardinality bound for this relationship element.
 public  void setMappedBy(JDORelationship mappedBy) throws ModelException 
    Set the mappedBy relationship for this relationship. This method automatically updates the mappedBy name of the declaring field of this relationship.
 public  void setUpperBound(int upperBound) 
    Set the upper cardinality bound for this relationship element.