org.datanucleus.metadata
Class MapMetaData

java.lang.Object
  extended by org.datanucleus.metadata.MetaData
      extended by org.datanucleus.metadata.ContainerMetaData
          extended by org.datanucleus.metadata.MapMetaData
All Implemented Interfaces:
java.io.Serializable

public class MapMetaData
extends ContainerMetaData

Representation of the Meta-Data for a Map.

See Also:
Serialized Form

Field Summary
protected  org.datanucleus.metadata.ContainerComponent key
          Representation of the key of the map.
protected  org.datanucleus.metadata.ContainerComponent value
          Representation of the value of the map.
 
Fields inherited from class org.datanucleus.metadata.MetaData
extensions, LOCALISER, METADATA_CREATED_STATE, METADATA_INITIALISED_STATE, METADATA_POPULATED_STATE, METADATA_USED_STATE, metaDataState, parent, VENDOR_NAME, VENDOR_NAME_OLD
 
Constructor Summary
MapMetaData(AbstractMemberMetaData parent, MapMetaData mapmd)
          Constructor to create a copy of the passed metadata using the passed parent.
MapMetaData(AbstractMemberMetaData parent, java.lang.String keyType, java.lang.String embeddedKey, java.lang.String dependentKey, java.lang.String serializedKey, java.lang.String valueType, java.lang.String embeddedValue, java.lang.String dependentValue, java.lang.String serializedValue)
          Constructor.
 
Method Summary
 AbstractClassMetaData getKeyClassMetaData()
          Accessor for the Key ClassMetaData
 java.lang.String getKeyType()
          Accessor for the key-type tag value.
 AbstractClassMetaData getValueClassMetaData()
          Accessor for the Value ClassMetaData
 java.lang.String getValueType()
          Accessor for the value-type tag value.
 boolean isDependentKey()
          Accessor for the dependent-key attribute indicates that the map's key contains references that are to be deleted if the referring instance is deleted.
 boolean isDependentValue()
          Accessor for the dependent-value attribute indicates that the map's value contains references that are to be deleted if the referring instance is deleted.
 boolean isEmbeddedKey()
          Accessor for the embedded-key tag value.
 boolean isEmbeddedValue()
          Accessor for the embedded-value tag value.
 boolean isSerializedKey()
          Accessor for the serialized-key tag value.
 boolean isSerializedValue()
          Accessor for the serialized-value tag value.
 boolean keyIsPersistent()
           
 void populate(ClassLoaderResolver clr, java.lang.ClassLoader primary)
          Method to populate any defaults, and check the validity of the MetaData.
 java.lang.String toString(java.lang.String prefix, java.lang.String indent)
          Returns a string representation of the object.
 boolean valueIsPersistent()
           
 
Methods inherited from class org.datanucleus.metadata.ContainerMetaData
getFieldName, getMemberMetaData, getMetaDataManager
 
Methods inherited from class org.datanucleus.metadata.MetaData
addExtension, addExtension, getExtensions, getNoOfExtensions, getParent, getValueForExtension, getValuesForExtension, hasExtension, initialise, isInitialised, isPopulated, isUsed, removeExtension, setInitialised, setParent, setPopulated, setUsed, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

key

protected org.datanucleus.metadata.ContainerComponent key
Representation of the key of the map.


value

protected org.datanucleus.metadata.ContainerComponent value
Representation of the value of the map.

Constructor Detail

MapMetaData

public MapMetaData(AbstractMemberMetaData parent,
                   MapMetaData mapmd)
Constructor to create a copy of the passed metadata using the passed parent.

Parameters:
parent - The parent
mapmd - The metadata to copy

MapMetaData

public MapMetaData(AbstractMemberMetaData parent,
                   java.lang.String keyType,
                   java.lang.String embeddedKey,
                   java.lang.String dependentKey,
                   java.lang.String serializedKey,
                   java.lang.String valueType,
                   java.lang.String embeddedValue,
                   java.lang.String dependentValue,
                   java.lang.String serializedValue)
Constructor.

Parameters:
parent - parent Field
keyType - key-type tag value
embeddedKey - embedded-key tag value
dependentKey - dependent-key tag value
serializedKey - serialized-key tag value
valueType - value-type tag value
embeddedValue - embedded-value tag value
dependentValue - dependent-value tag value
serializedValue - serialized-value tag value
Method Detail

populate

public void populate(ClassLoaderResolver clr,
                     java.lang.ClassLoader primary)
Method to populate any defaults, and check the validity of the MetaData.

Parameters:
clr - ClassLoaderResolver to use for loading any key/value types
primary - the primary ClassLoader to use (or null)

getKeyType

public java.lang.String getKeyType()
Accessor for the key-type tag value. May be comma-separated if several key types are possible.

Returns:
key-type tag value

keyIsPersistent

public boolean keyIsPersistent()

getKeyClassMetaData

public AbstractClassMetaData getKeyClassMetaData()
Accessor for the Key ClassMetaData

Returns:
key ClassMetaData

getValueType

public java.lang.String getValueType()
Accessor for the value-type tag value. May be comma-separated if several value types are possible.

Returns:
value-type tag value

valueIsPersistent

public boolean valueIsPersistent()

getValueClassMetaData

public AbstractClassMetaData getValueClassMetaData()
Accessor for the Value ClassMetaData

Returns:
value ClassMetaData

isEmbeddedKey

public boolean isEmbeddedKey()
Accessor for the embedded-key tag value.

Returns:
embedded-key tag value

isEmbeddedValue

public boolean isEmbeddedValue()
Accessor for the embedded-value tag value.

Returns:
embedded-value tag value

isSerializedKey

public boolean isSerializedKey()
Accessor for the serialized-key tag value.

Returns:
serialized-key tag value

isSerializedValue

public boolean isSerializedValue()
Accessor for the serialized-value tag value.

Returns:
serialized-value tag value

isDependentKey

public boolean isDependentKey()
Accessor for the dependent-key attribute indicates that the map's key contains references that are to be deleted if the referring instance is deleted.

Returns:
dependent-key tag value

isDependentValue

public boolean isDependentValue()
Accessor for the dependent-value attribute indicates that the map's value contains references that are to be deleted if the referring instance is deleted.

Returns:
dependent-value tag value

toString

public java.lang.String toString(java.lang.String prefix,
                                 java.lang.String indent)
Returns a string representation of the object.

Overrides:
toString in class MetaData
Parameters:
prefix - prefix string
indent - indent string
Returns:
a string representation of the object.


Copyright © 2009. All Rights Reserved.