org.apache.jdo.impl.model.jdo.caching
Class JDOReferenceImplCaching

java.lang.Object
  extended by org.apache.jdo.impl.model.jdo.JDOElementImpl
      extended by org.apache.jdo.impl.model.jdo.JDORelationshipImpl
          extended by org.apache.jdo.impl.model.jdo.JDOReferenceImplDynamic
              extended by org.apache.jdo.impl.model.jdo.caching.JDOReferenceImplCaching
All Implemented Interfaces:
JDOElement, JDOReference, JDORelationship

public class JDOReferenceImplCaching
extends JDOReferenceImplDynamic

An instance of this class represents the JDO relationship metadata of a reference relationship field. This caching implementation caches any calulated value to avoid re-calculating it if it is requested again.

Since:
2.0
Version:
2.0
Author:
Michael Bouschen

Field Summary
 
Fields inherited from class org.apache.jdo.impl.model.jdo.JDORelationshipImpl
inverse, mappedBy
 
Fields inherited from interface org.apache.jdo.model.jdo.JDORelationship
CARDINALITY_N, CARDINALITY_ONE, CARDINALITY_ZERO
 
Constructor Summary
JDOReferenceImplCaching()
           
 
Method Summary
 JDORelationship getInverseRelationship()
          Get the inverse JDORelationship in the case of a two-way relationship.
 JDORelationship getMappedBy()
          Get the mappedBy relationship.
 
Methods inherited from class org.apache.jdo.impl.model.jdo.JDOReferenceImplDynamic
getRelatedJavaType, isJDOReference
 
Methods inherited from class org.apache.jdo.impl.model.jdo.JDORelationshipImpl
getDeclaringField, getInverseRelationshipName, getLowerBound, getRelatedJDOClass, getUpperBound, isJDOArray, isJDOCollection, isJDOMap, isOwner, setDeclaringField, setInverseRelationship, setLowerBound, setMappedBy, setUpperBound
 
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.JDORelationship
getDeclaringField, getInverseRelationshipName, getLowerBound, getRelatedJDOClass, getUpperBound, isJDOArray, isJDOCollection, isJDOMap, isOwner, setDeclaringField, setInverseRelationship, setLowerBound, setMappedBy, setUpperBound
 
Methods inherited from interface org.apache.jdo.model.jdo.JDOElement
addPropertyChangeListener, addVetoableChangeListener, createJDOExtension, getJDOExtensions, removeJDOExtension, removePropertyChangeListener, removeVetoableChangeListener
 

Constructor Detail

JDOReferenceImplCaching

public JDOReferenceImplCaching()
Method Detail

getMappedBy

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 returns null if there is no mappedBy relationship set and there is no mappedBy name specified on the declaring field.

Specified by:
getMappedBy in interface JDORelationship
Overrides:
getMappedBy in class JDORelationshipImpl
Returns:
the mappedBy relationship if available; null otherwise.

getInverseRelationship

public JDORelationship getInverseRelationship()
Get the inverse JDORelationship in the case of a two-way relationship.

Specified by:
getInverseRelationship in interface JDORelationship
Overrides:
getInverseRelationship in class JDORelationshipImpl
Returns:
the inverse relationship


Copyright © 2005-2009 Apache Software Foundation. All Rights Reserved.