org.apache.jdo.impl.model.jdo.caching
Class JDOMapImplCaching
java.lang.Object
org.apache.jdo.impl.model.jdo.JDOElementImpl
org.apache.jdo.impl.model.jdo.JDORelationshipImpl
org.apache.jdo.impl.model.jdo.JDOMapImplDynamic
org.apache.jdo.impl.model.jdo.caching.JDOMapImplCaching
- All Implemented Interfaces:
- JDOElement, JDOMap, JDORelationship
- public class JDOMapImplCaching
- extends JDOMapImplDynamic
An instance of this class represents the JDO relationship metadata
(the treatment of keys and values) of a map relationship field.
This caching implementation caches any calulated value to avoid
re-calculating it if it is requested again.
- Since:
- 1.1
- Version:
- 2.0
- Author:
- Michael Bouschen
Method Summary |
JDORelationship |
getInverseRelationship()
Get the inverse JDORelationship in the case of a two-way relationship. |
JavaType |
getKeyType()
Get the type representation of the keys for this JDOMap. |
JDORelationship |
getMappedBy()
Get the mappedBy relationship. |
JavaType |
getValueType()
Get the type representation of the values for this JDOMap. |
boolean |
isEmbeddedKey()
Determines whether the keys of the map should be stored if possible as
part of the instance instead of as their own instances in the datastore. |
boolean |
isEmbeddedValue()
Determines whether the values of the map should be stored if possible as
part of the instance instead of as their own instances in the datastore. |
Methods inherited from class org.apache.jdo.impl.model.jdo.JDORelationshipImpl |
getDeclaringField, getInverseRelationshipName, getLowerBound, getRelatedJDOClass, getUpperBound, isJDOArray, isJDOCollection, isJDOReference, isOwner, setDeclaringField, setInverseRelationship, setLowerBound, setMappedBy, setUpperBound |
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, isJDOReference, isOwner, setDeclaringField, setInverseRelationship, setLowerBound, setMappedBy, setUpperBound |
JDOMapImplCaching
public JDOMapImplCaching()
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
isEmbeddedKey
public boolean isEmbeddedKey()
- Determines whether the keys of the map should be stored if possible as
part of the instance instead of as their own instances in the datastore.
- Specified by:
isEmbeddedKey
in interface JDOMap
- Overrides:
isEmbeddedKey
in class JDOMapImplDynamic
- Returns:
true
if the keys are stored as part of this instance;
false
otherwise
getKeyType
public JavaType getKeyType()
- Get the type representation of the keys for this JDOMap.
- Specified by:
getKeyType
in interface JDOMap
- Overrides:
getKeyType
in class JDOMapImplDynamic
- Returns:
- the type of the keys of this JDOMap
isEmbeddedValue
public boolean isEmbeddedValue()
- Determines whether the values of the map should be stored if possible as
part of the instance instead of as their own instances in the datastore.
- Specified by:
isEmbeddedValue
in interface JDOMap
- Overrides:
isEmbeddedValue
in class JDOMapImplDynamic
- Returns:
true
if the values are stored as part of this
instance; false
otherwise
getValueType
public JavaType getValueType()
- Get the type representation of the values for this JDOMap.
- Specified by:
getValueType
in interface JDOMap
- Overrides:
getValueType
in class JDOMapImplDynamic
- Returns:
- the type of the values of this JDOMap
Copyright © 2005 Apache Software Foundation. All Rights Reserved.