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
Representation of the Meta-Data for a Map.
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ContainerComponent
Representation of the key of the map.protected MapMetaData.MapType
Type of map.private static final long
protected ContainerComponent
Representation of the value of the map.Fields inherited from class org.datanucleus.metadata.ContainerMetaData
allowNulls
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
ConstructorsConstructorDescriptionDefault constructor.MapMetaData
(MapMetaData mapmd) Constructor to create a copy of the passed metadata. -
Method Summary
Modifier and TypeMethodDescriptionConvenience accessor for the Key ClassMetaData.Accessor for the key-type tag value.String[]
(package private) void
getReferencedClassMetaData
(List<AbstractClassMetaData> orderedCmds, Set<AbstractClassMetaData> referencedCmds, ClassLoaderResolver clr) Accessor for all ClassMetaData referenced by this array.Convenience accessor for the Value ClassMetaDataAccessor for the value-type tag value.String[]
boolean
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
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
Accessor for the embedded-key tag value.boolean
Accessor for the embedded-value tag value.boolean
Accessor for the serialized-key tag value.boolean
Accessor for the serialized-value tag value.boolean
void
populate
(ClassLoaderResolver clr, ClassLoader primary) Method to populate any defaults, and check the validity of the MetaData.setDependentKey
(boolean dependent) setDependentValue
(boolean dependent) setEmbeddedKey
(boolean embedded) setEmbeddedValue
(boolean embedded) setKeyType
(String type) setSerializedKey
(boolean serialized) setSerializedValue
(boolean serialized) setValueType
(String type) toString()
boolean
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, setInitialised, setParent, setPopulated, setUsed
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
mapType
Type of map. -
key
Representation of the key of the map. -
value
Representation of the value of the map.
-
-
Constructor Details
-
MapMetaData
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 Details
-
populate
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
-
getKeyClassMetaData
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
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
Accessor for the key-type tag value.- Returns:
- key-type tag value
-
getKeyTypes
-
setKeyType
-
setEmbeddedKey
-
setSerializedKey
-
setDependentKey
-
getValueType
Accessor for the value-type tag value.- Returns:
- value-type tag value
-
getValueTypes
-
setValueType
-
setEmbeddedValue
-
setSerializedValue
-
setDependentValue
-
getReferencedClassMetaData
void getReferencedClassMetaData(List<AbstractClassMetaData> orderedCmds, Set<AbstractClassMetaData> referencedCmds, ClassLoaderResolver clr) Accessor for all ClassMetaData referenced by this array.- Parameters:
orderedCmds
- List of ordered ClassMetaData objects (added to).referencedCmds
- Set of all ClassMetaData objects (added to).clr
- the ClassLoaderResolver
-
toString
-