Package org.datanucleus.metadata
Class MapMetaData
- java.lang.Object
-
- org.datanucleus.metadata.MetaData
-
- org.datanucleus.metadata.ContainerMetaData
-
- org.datanucleus.metadata.MapMetaData
-
- All Implemented Interfaces:
Serializable
public class MapMetaData extends ContainerMetaData
Representation of the Meta-Data for a Map.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMapMetaData.MapType
-
Field Summary
Fields Modifier and Type Field Description protected org.datanucleus.metadata.ContainerComponentkeyRepresentation of the key of the map.protected MapMetaData.MapTypemapTypeType of map.protected org.datanucleus.metadata.ContainerComponentvalueRepresentation of the value of the map.-
Fields inherited from class org.datanucleus.metadata.MetaData
EXTENSION_CLASS_CREATETIMESTAMP, EXTENSION_CLASS_CREATETIMESTAMP_COLUMN_NAME, EXTENSION_CLASS_CREATEUSER, EXTENSION_CLASS_CREATEUSER_COLUMN_LENGTH, EXTENSION_CLASS_CREATEUSER_COLUMN_NAME, EXTENSION_CLASS_MULTITENANCY_COLUMN_LENGTH, EXTENSION_CLASS_MULTITENANCY_COLUMN_NAME, EXTENSION_CLASS_MULTITENANCY_JDBC_TYPE, EXTENSION_CLASS_MULTITENANT, EXTENSION_CLASS_READ_ONLY, EXTENSION_CLASS_SOFTDELETE, EXTENSION_CLASS_SOFTDELETE_COLUMN_NAME, EXTENSION_CLASS_UPDATETIMESTAMP, EXTENSION_CLASS_UPDATETIMESTAMP_COLUMN_NAME, EXTENSION_CLASS_UPDATEUSER, EXTENSION_CLASS_UPDATEUSER_COLUMN_LENGTH, EXTENSION_CLASS_UPDATEUSER_COLUMN_NAME, EXTENSION_CLASS_VERSION_FIELD_NAME, EXTENSION_CLASS_VIEW_DEFINITION, EXTENSION_CLASS_VIEW_IMPORTS, EXTENSION_INDEX_COLUMN_ORDERING, EXTENSION_MEMBER_CACHEABLE, EXTENSION_MEMBER_CALENDAR_ONE_COLUMN, EXTENSION_MEMBER_CASCADE_ATTACH, EXTENSION_MEMBER_CASCADE_DETACH, EXTENSION_MEMBER_CASCADE_PERSIST, EXTENSION_MEMBER_CASCADE_REFRESH, EXTENSION_MEMBER_COMPARATOR_NAME, EXTENSION_MEMBER_CONTAINER_ALLOW_NULLS, EXTENSION_MEMBER_CREATE_TIMESTAMP, EXTENSION_MEMBER_CREATE_USER, EXTENSION_MEMBER_ENUM_VALUE_GETTER, EXTENSION_MEMBER_IMPLEMENTATION_CLASSES, EXTENSION_MEMBER_INSERTABLE, EXTENSION_MEMBER_KEY_IMPLEMENTATION_CLASSES, EXTENSION_MEMBER_LIST_ORDERING, EXTENSION_MEMBER_RELATION_DISCRIM_COLUMN, EXTENSION_MEMBER_RELATION_DISCRIM_PK, EXTENSION_MEMBER_RELATION_DISCRIM_VALUE, EXTENSION_MEMBER_STRATEGY_WHEN_NOTNULL, EXTENSION_MEMBER_TYPE_CONVERTER_DISABLED, EXTENSION_MEMBER_TYPE_CONVERTER_NAME, EXTENSION_MEMBER_UPDATE_TIMESTAMP, EXTENSION_MEMBER_UPDATE_USER, EXTENSION_MEMBER_UPDATEABLE, EXTENSION_MEMBER_VALUE_IMPLEMENTATION_CLASSES, EXTENSION_VERSION_NUMBER_INITIAL_VALUE, extensions, metaDataState, parent, VENDOR_NAME
-
-
Constructor Summary
Constructors Constructor Description MapMetaData()Default constructor.MapMetaData(MapMetaData mapmd)Constructor to create a copy of the passed metadata.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AbstractClassMetaDatagetKeyClassMetaData(ClassLoaderResolver clr)Convenience accessor for the Key ClassMetaData.StringgetKeyType()Accessor for the key-type tag value.String[]getKeyTypes()MapMetaData.MapTypegetMapType()AbstractClassMetaDatagetValueClassMetaData(ClassLoaderResolver clr)Convenience accessor for the Value ClassMetaDataStringgetValueType()Accessor for the value-type tag value.String[]getValueTypes()booleanisDependentKey()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.booleanisDependentValue()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.booleanisEmbeddedKey()Accessor for the embedded-key tag value.booleanisEmbeddedValue()Accessor for the embedded-value tag value.booleanisSerializedKey()Accessor for the serialized-key tag value.booleanisSerializedValue()Accessor for the serialized-value tag value.booleankeyIsPersistent()voidpopulate(ClassLoaderResolver clr, ClassLoader primary)Method to populate any defaults, and check the validity of the MetaData.MapMetaDatasetDependentKey(boolean dependent)MapMetaDatasetDependentValue(boolean dependent)MapMetaDatasetEmbeddedKey(boolean embedded)MapMetaDatasetEmbeddedValue(boolean embedded)MapMetaDatasetKeyType(String type)MapMetaDatasetSerializedKey(boolean serialized)MapMetaDatasetSerializedValue(boolean serialized)MapMetaDatasetValueType(String type)StringtoString()booleanvalueIsPersistent()-
Methods inherited from class org.datanucleus.metadata.ContainerMetaData
allowNulls, getMemberMetaData, getMemberName, populate
-
Methods inherited from class org.datanucleus.metadata.MetaData
addExtension, addExtensions, getExtensions, getMetaDataManager, getNoOfExtensions, getParent, getValueForExtension, getValuesForExtension, hasExtension, initialise, isInitialised, isPopulated, isUsed, removeExtension, setExtensions, setParent
-
-
-
-
Field Detail
-
mapType
protected MapMetaData.MapType mapType
Type of map.
-
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(MapMetaData mapmd)
Constructor to create a copy of the passed metadata.- Parameters:
mapmd- The metadata to copy
-
MapMetaData
public MapMetaData()
Default constructor. Set the fields using setters, before populate().
-
-
Method Detail
-
populate
public void populate(ClassLoaderResolver clr, ClassLoader primary)
Method to populate any defaults, and check the validity of the MetaData.- Parameters:
clr- ClassLoaderResolver to use for loading any key/value typesprimary- the primary ClassLoader to use (or null)
-
getMapType
public MapMetaData.MapType getMapType()
-
getKeyClassMetaData
public AbstractClassMetaData getKeyClassMetaData(ClassLoaderResolver clr)
Convenience accessor for the Key ClassMetaData.- Parameters:
clr- ClassLoader resolver (in case we need to initialise it)- Returns:
- key ClassMetaData
-
keyIsPersistent
public boolean keyIsPersistent()
-
getValueClassMetaData
public AbstractClassMetaData getValueClassMetaData(ClassLoaderResolver clr)
Convenience accessor for the Value ClassMetaData- Parameters:
clr- ClassLoader resolver (in case we need to initialise it)- Returns:
- value ClassMetaData
-
valueIsPersistent
public boolean valueIsPersistent()
-
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
-
getKeyType
public String getKeyType()
Accessor for the key-type tag value.- Returns:
- key-type tag value
-
getKeyTypes
public String[] getKeyTypes()
-
setKeyType
public MapMetaData setKeyType(String type)
-
setEmbeddedKey
public MapMetaData setEmbeddedKey(boolean embedded)
-
setSerializedKey
public MapMetaData setSerializedKey(boolean serialized)
-
setDependentKey
public MapMetaData setDependentKey(boolean dependent)
-
getValueType
public String getValueType()
Accessor for the value-type tag value.- Returns:
- value-type tag value
-
getValueTypes
public String[] getValueTypes()
-
setValueType
public MapMetaData setValueType(String type)
-
setEmbeddedValue
public MapMetaData setEmbeddedValue(boolean embedded)
-
setSerializedValue
public MapMetaData setSerializedValue(boolean serialized)
-
setDependentValue
public MapMetaData setDependentValue(boolean dependent)
-
-