org.apache.jdo.impl.model.jdo
Class JDOMapImplDynamic

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

public class JDOMapImplDynamic
extends JDORelationshipImpl
implements JDOMap

An instance of this class represents the JDO relationship metadata (the treatment of keys and values) of a map relationship field. This dynamic implementation only stores property values explicitly set by setter method.

Since:
1.1
Version:
1.1
Author:
Michael Bouschen

Field Summary
protected  java.lang.Boolean embeddedKey
          Property embeddedKey.
protected  java.lang.Boolean embeddedValue
          Property embeddedValue.
protected  JavaType keyType
          Property keyType.
private  java.lang.String keyTypeName
          Property keyTypeName.
private static I18NHelper msg
          I18N support
protected  JavaType valueType
          Property valueType.
private  java.lang.String valueTypeName
          Property valueTypeName.
 
Fields inherited from class org.apache.jdo.impl.model.jdo.JDORelationshipImpl
 
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
JDOMapImplDynamic()
           
 
Method Summary
 JavaType getKeyType()
          Get the type representation of the keys for this JDOMap.
 java.lang.String getKeyTypeName()
          Get the string representation of the type of the keys for this JDOMap.
 JavaType getValueType()
          Get the type representation of the values for this JDOMap.
 java.lang.String getValueTypeName()
          Get the string representation of the type 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.
 void setEmbeddedKey(boolean embeddedKey)
          Set 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.
 void setEmbeddedValue(boolean embeddedValue)
          Set 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.
 void setKeyType(JavaType keyType)
          Set the type representation of the keys for this JDOMap.
 void setKeyTypeName(java.lang.String keyTypeName)
          Set string representation of the type of the keys for this JDOMap.
 void setValueType(JavaType valueType)
          Set the type representation of the values for this JDOMap.
 void setValueTypeName(java.lang.String valueTypeName)
          Set string representation of the type of the values for this JDOMap.
 
Methods inherited from class org.apache.jdo.impl.model.jdo.JDORelationshipImpl
getDeclaringField, getInverseRelationship, getLowerBound, getUpperBound, setDeclaringField, setInverseRelationship, setLowerBound, 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, getInverseRelationship, getLowerBound, getUpperBound, setDeclaringField, setInverseRelationship, setLowerBound, setUpperBound
 
Methods inherited from interface org.apache.jdo.model.jdo.JDOElement
addPropertyChangeListener, addVetoableChangeListener, createJDOExtension, getJDOExtensions, removeJDOExtension, removePropertyChangeListener, removeVetoableChangeListener
 

Field Detail

embeddedKey

protected java.lang.Boolean embeddedKey
Property embeddedKey.


keyType

protected transient JavaType keyType
Property keyType. No default.


keyTypeName

private java.lang.String keyTypeName
Property keyTypeName. Defaults to java.lang.Object.


embeddedValue

protected java.lang.Boolean embeddedValue
Property embeddedValue.


valueType

protected transient JavaType valueType
Property valueType. No default.


valueTypeName

private java.lang.String valueTypeName
Property valueTypeName. Defaults to java.lang.Object.


msg

private static final I18NHelper msg
I18N support

Constructor Detail

JDOMapImplDynamic

public JDOMapImplDynamic()
Method Detail

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
Returns:
true if the keys are stored as part of this instance; false otherwise

setEmbeddedKey

public void setEmbeddedKey(boolean embeddedKey)
Set 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:
setEmbeddedKey in interface JDOMap
Parameters:
embeddedKey - 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
Returns:
the type of the keys of this JDOMap

setKeyType

public void setKeyType(JavaType keyType)
Set the type representation of the keys for this JDOMap.

Specified by:
setKeyType in interface JDOMap
Parameters:
keyType - the type representation of the keys

getKeyTypeName

public java.lang.String getKeyTypeName()
Get the string representation of the type of the keys for this JDOMap.

Specified by:
getKeyTypeName in interface JDOMap
Returns:
the key type as string

setKeyTypeName

public void setKeyTypeName(java.lang.String keyTypeName)
Set string representation of the type of the keys for this JDOMap.

Specified by:
setKeyTypeName in interface JDOMap
Parameters:
keyTypeName - the name of the key type

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
Returns:
true if the values are stored as part of this instance; false otherwise

setEmbeddedValue

public void setEmbeddedValue(boolean embeddedValue)
Set 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:
setEmbeddedValue in interface JDOMap
Parameters:
embeddedValue - 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
Returns:
the type of the values of this JDOMap

setValueType

public void setValueType(JavaType valueType)
Set the type representation of the values for this JDOMap.

Specified by:
setValueType in interface JDOMap
Parameters:
valueType - the type representation of the values

getValueTypeName

public java.lang.String getValueTypeName()
Get the string representation of the type of the values for this JDOMap.

Specified by:
getValueTypeName in interface JDOMap
Returns:
the key value as string

setValueTypeName

public void setValueTypeName(java.lang.String valueTypeName)
Set string representation of the type of the values for this JDOMap.

Specified by:
setValueTypeName in interface JDOMap
Parameters:
valueTypeName - the name of the value type