Package org.datanucleus.metadata
Class ArrayMetaData
java.lang.Object
org.datanucleus.metadata.MetaData
org.datanucleus.metadata.ContainerMetaData
org.datanucleus.metadata.ArrayMetaData
- All Implemented Interfaces:
Serializable
Representation of the Meta-Data for an Array.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ContainerComponent
Representation of the element of the array.protected boolean
wether this array may contain persistable elementsprivate static final long
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.ArrayMetaData
(ArrayMetaData arrmd) Constructor to create a copy of the passed metadata. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Convenience accessor for the Element ClassMetaData.Accessor for the element implementation types (when element is a reference type).String[]
(package private) void
getReferencedClassMetaData
(List<AbstractClassMetaData> orderedCmds, Set<AbstractClassMetaData> referencedCmds, ClassLoaderResolver clr) Accessor for all AbstractClassMetaData referenced by this array.boolean
Accessor for The dependent-element attribute indicates that the collection's element contains a reference that is to be deleted if the referring instance is deleted.boolean
Accessor for the embedded-element valueboolean
Accessor for the serialized-element tag valueboolean
Returns whether this array may contain persistable elements (as indicated by the user).void
populate
(ClassLoaderResolver clr, ClassLoader primary) Method to populate any defaults, and check the validity of the MetaData.setDependentElement
(boolean dependent) setElementType
(String type) setEmbeddedElement
(boolean embedded) setSerializedElement
(boolean serialized) toString()
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:
-
element
Representation of the element of the array. -
mayContainPersistableElements
protected boolean mayContainPersistableElementswether this array may contain persistable elements
-
-
Constructor Details
-
ArrayMetaData
Constructor to create a copy of the passed metadata.- Parameters:
arrmd
- The metadata to copy
-
ArrayMetaData
public ArrayMetaData()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 in loading any classesprimary
- the primary ClassLoader to use (or null)
-
elementIsPersistent
public boolean elementIsPersistent() -
getElementClassMetaData
Convenience accessor for the Element ClassMetaData.- Parameters:
clr
- ClassLoader resolver (in case we need to initialise it)- Returns:
- element ClassMetaData
-
mayContainPersistableElements
public boolean mayContainPersistableElements()Returns whether this array may contain persistable elements (as indicated by the user). TODO Remove this. The element-type of the array defines such things and this is not the solution- Returns:
- whether this array may contain persistable elements
-
isEmbeddedElement
public boolean isEmbeddedElement()Accessor for the embedded-element value- Returns:
- embedded-element value
-
isSerializedElement
public boolean isSerializedElement()Accessor for the serialized-element tag value- Returns:
- serialized-element tag value
-
isDependentElement
public boolean isDependentElement()Accessor for The dependent-element attribute indicates that the collection's element contains a reference that is to be deleted if the referring instance is deleted.- Returns:
- dependent-element tag value
-
getElementType
Accessor for the element implementation types (when element is a reference type).- Returns:
- element implementation types
-
getElementTypes
-
setElementType
-
setEmbeddedElement
-
setSerializedElement
-
setDependentElement
-
getReferencedClassMetaData
void getReferencedClassMetaData(List<AbstractClassMetaData> orderedCmds, Set<AbstractClassMetaData> referencedCmds, ClassLoaderResolver clr) Accessor for all AbstractClassMetaData referenced by this array.- Parameters:
orderedCmds
- List of ordered AbstractClassMetaData objects (added to).referencedCmds
- Set of all AbstractClassMetaData objects (added to).clr
- the ClassLoaderResolver
-
toString
-