org.apache.jdo.model.jdo
Interface JDOMap

All Superinterfaces:
JDOElement, JDORelationship
All Known Implementing Classes:
JDOMapImplDynamic

public interface JDOMap
extends JDORelationship

A JDOMap instance represents the JDO relationship metadata (the treatment of keys and values) of a map relationship field.

Author:
Michael Bouschen

Field Summary
 
Fields inherited from interface org.apache.jdo.model.jdo.JDORelationship
CARDINALITY_N, CARDINALITY_ONE, CARDINALITY_ZERO
 
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 interface org.apache.jdo.model.jdo.JDORelationship
getDeclaringField, getInverseRelationship, getInverseRelationshipName, getLowerBound, getMappedBy, getRelatedJDOClass, getUpperBound, isJDOArray, isJDOCollection, isJDOMap, isJDOReference, isOwner, setDeclaringField, setInverseRelationship, setLowerBound, setMappedBy, setUpperBound
 
Methods inherited from interface org.apache.jdo.model.jdo.JDOElement
addPropertyChangeListener, addVetoableChangeListener, createJDOExtension, getJDOExtensions, removeJDOExtension, removePropertyChangeListener, removeVetoableChangeListener
 

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.

Returns:
true if the keys are stored as part of this instance; false otherwise

setEmbeddedKey

public void setEmbeddedKey(boolean embeddedKey)
                    throws ModelException
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.

Parameters:
embeddedKey - true if the keys are stored as part of this instance; false otherwise
Throws:
ModelException - if impossible

getKeyType

public JavaType getKeyType()
Get the type representation of the keys for this JDOMap.

Returns:
the type of the keys of this JDOMap

setKeyType

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

Parameters:
keyType - the type representation of the keys
Throws:
ModelException - if impossible

getKeyTypeName

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

Returns:
the key type as string

setKeyTypeName

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

Parameters:
keyTypeName - the name of the key type
Throws:
ModelException - if impossible

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.

Returns:
true if the values are stored as part of this instance; false otherwise

setEmbeddedValue

public void setEmbeddedValue(boolean embeddedValue)
                      throws ModelException
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.

Parameters:
embeddedValue - true if the values are stored as part of this instance; false otherwise
Throws:
ModelException - if impossible

getValueType

public JavaType getValueType()
Get the type representation of the values for this JDOMap.

Returns:
the type of the values of this JDOMap

setValueType

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

Parameters:
valueType - the type representation of the values
Throws:
ModelException - if impossible

getValueTypeName

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

Returns:
the key value as string

setValueTypeName

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

Parameters:
valueTypeName - the name of the value type
Throws:
ModelException - if impossible