public class MetaData extends Object implements Serializable
All MetaData elements are extensible with extensions. We only store the DataNucleus vendor extensions here.
Modifier and Type | Field and Description |
---|---|
static String |
EXTENSION_CLASS_MULTITENANCY_COLUMN_LENGTH
Class : when using multitenancy, defines the length of column used for the mutitenancy discriminator.
|
static String |
EXTENSION_CLASS_MULTITENANCY_COLUMN_NAME
Class : when using multitenancy, defines the column name used for the mutitenancy discriminator.
|
static String |
EXTENSION_CLASS_MULTITENANCY_DISABLE
Class : when using multitenancy, disables its use for this class.
|
static String |
EXTENSION_CLASS_MULTITENANCY_JDBC_TYPE
Class : when using multitenancy, defines the jdbc-type used for the mutitenancy discriminator column.
|
static String |
EXTENSION_CLASS_READ_ONLY
Class : read only.
|
static String |
EXTENSION_CLASS_SOFTDELETE
Class : when the class will use soft deletion (deletion flag column) rather than actually deleting objects.
|
static String |
EXTENSION_CLASS_SOFTDELETE_COLUMN_NAME
Class : when the class will use soft deletion, specifies the column name to use.
|
static String |
EXTENSION_CLASS_VERSION_FIELD_NAME
Class : define the name of a field that will store the version of this class.
|
static String |
EXTENSION_CLASS_VIEW_DEFINITION
Class : definition of VIEW (when mapping to a view).
|
static String |
EXTENSION_CLASS_VIEW_IMPORTS
Class : definition of imports for VIEW (when mapping to a view).
|
static String |
EXTENSION_MEMBER_CACHEABLE
Member : whether the field is (L2) cacheable (for JPA).
|
static String |
EXTENSION_MEMBER_CALENDAR_ONE_COLUMN
Member : when the field is Calendar, signifies that it should be stored as a single column.
|
static String |
EXTENSION_MEMBER_CASCADE_DETACH
Member : whether the field is cascade-detach (for JDO).
|
static String |
EXTENSION_MEMBER_CASCADE_PERSIST
Member : whether the field is cascade-persist (for JDO).
|
static String |
EXTENSION_MEMBER_CASCADE_REFRESH
Member : whether the field is cascade-refresh (for JDO).
|
static String |
EXTENSION_MEMBER_CASCADE_UPDATE
Member : whether the field is cascade-update (for JDO).
|
static String |
EXTENSION_MEMBER_COMPARATOR_NAME
Member : name of comparator class when of SortedSet/SortedMap type.
|
static String |
EXTENSION_MEMBER_CONTAINER_ALLOW_NULLS
Member : whether this member (collection/map/array) should allow null elements/keys/values.
|
static String |
EXTENSION_MEMBER_ENUM_GETTER_BY_VALUE
Member : when field is enum, name of the method to return the enum given the value.
|
static String |
EXTENSION_MEMBER_ENUM_VALUE_GETTER
Member : when field is enum, name of the method to get the "value" of the enum.
|
static String |
EXTENSION_MEMBER_FETCH_FK_ONLY
Member : whether to fetch just the FK (and not populate the related object).
|
static String |
EXTENSION_MEMBER_IMPLEMENTATION_CLASSES
Member : implementation class names, when the member is of a interface/reference type.
|
static String |
EXTENSION_MEMBER_INSERTABLE
Member : whether the field is insertable (for JDO).
|
static String |
EXTENSION_MEMBER_KEY_IMPLEMENTATION_CLASSES
Member : implementation class names, when the member is of a interface/reference type.
|
static String |
EXTENSION_MEMBER_LIST_ORDERING
Member : the ordering clause to use for this List field.
|
static String |
EXTENSION_MEMBER_RELATION_DISCRIM_COLUMN
Member : shared relation, column name for relation discriminator column.
|
static String |
EXTENSION_MEMBER_RELATION_DISCRIM_PK
Member : shared relation, where the relation discriminator column is part of the PK.
|
static String |
EXTENSION_MEMBER_RELATION_DISCRIM_VALUE
Member : shared relation, value for this class for relation discriminator column.
|
static String |
EXTENSION_MEMBER_STRATEGY_WHEN_NOTNULL
Member : when this field has a value generator, only apply it when the field is not set.
|
static String |
EXTENSION_MEMBER_TYPE_CONVERTER_DISABLED |
static String |
EXTENSION_MEMBER_TYPE_CONVERTER_NAME
Member : name of type converter to use.
|
static String |
EXTENSION_MEMBER_UPDATEABLE
Member : whether the field is updateable (for JDO).
|
static String |
EXTENSION_MEMBER_VALUE_IMPLEMENTATION_CLASSES
Member : implementation class names, when the member is of a interface/reference type.
|
static String |
EXTENSION_VERSION_NUMBER_INITIAL_VALUE
Class : initial value to use for this class for versioning (when using version-number strategy).
|
protected Map<String,String> |
extensions
Extensions for this MetaData element.
|
static int |
METADATA_CREATED_STATE
State representing the start state of MetaData, representing the initial values passed in.
|
static int |
METADATA_INITIALISED_STATE
State reflecting that MetaData object has been initialised with any internal info required.
|
static int |
METADATA_POPULATED_STATE
State reflecting that MetaData has been populated with real class definition adding any defaulted info.
|
static int |
METADATA_USED_STATE
State reflecting that MetaData object has been modified with usage information (e.g defaulted column names).
|
protected int |
metaDataState
State of the MetaData.
|
protected MetaData |
parent
Parent MetaData object, allowing hierarchical MetaData structure.
|
static String |
VENDOR_NAME
Vendor name (DataNucleus) used for extensions.
|
Constructor and Description |
---|
MetaData() |
MetaData(MetaData parent)
Constructor.
|
MetaData(MetaData parent,
MetaData copy)
Copy constructor.
|
Modifier and Type | Method and Description |
---|---|
MetaData |
addExtension(String key,
String value) |
MetaData |
addExtensions(Map<String,String> exts) |
Map<String,String> |
getExtensions() |
MetaDataManager |
getMetaDataManager() |
int |
getNoOfExtensions() |
MetaData |
getParent() |
String |
getValueForExtension(String key)
Accessor for the value of a particular extension.
|
String[] |
getValuesForExtension(String key)
Accessor for the value of a particular extension, but splitting it into separate parts.
|
boolean |
hasExtension(String key) |
void |
initialise(ClassLoaderResolver clr) |
boolean |
isInitialised() |
boolean |
isPopulated() |
boolean |
isUsed() |
MetaData |
removeExtension(String key) |
MetaData |
setExtensions(Map<String,String> exts) |
void |
setParent(MetaData md) |
public static final int METADATA_CREATED_STATE
public static final int METADATA_POPULATED_STATE
public static final int METADATA_INITIALISED_STATE
public static final int METADATA_USED_STATE
public static final String VENDOR_NAME
public static final String EXTENSION_CLASS_READ_ONLY
public static final String EXTENSION_CLASS_MULTITENANCY_DISABLE
public static final String EXTENSION_CLASS_MULTITENANCY_COLUMN_NAME
public static final String EXTENSION_CLASS_MULTITENANCY_COLUMN_LENGTH
public static final String EXTENSION_CLASS_MULTITENANCY_JDBC_TYPE
public static final String EXTENSION_CLASS_SOFTDELETE
public static final String EXTENSION_CLASS_SOFTDELETE_COLUMN_NAME
public static final String EXTENSION_CLASS_VERSION_FIELD_NAME
public static final String EXTENSION_VERSION_NUMBER_INITIAL_VALUE
public static final String EXTENSION_MEMBER_TYPE_CONVERTER_NAME
public static final String EXTENSION_MEMBER_TYPE_CONVERTER_DISABLED
public static final String EXTENSION_MEMBER_COMPARATOR_NAME
public static final String EXTENSION_MEMBER_IMPLEMENTATION_CLASSES
public static final String EXTENSION_MEMBER_KEY_IMPLEMENTATION_CLASSES
public static final String EXTENSION_MEMBER_VALUE_IMPLEMENTATION_CLASSES
public static final String EXTENSION_MEMBER_ENUM_VALUE_GETTER
public static final String EXTENSION_MEMBER_ENUM_GETTER_BY_VALUE
public static final String EXTENSION_MEMBER_CALENDAR_ONE_COLUMN
public static final String EXTENSION_MEMBER_INSERTABLE
public static final String EXTENSION_MEMBER_UPDATEABLE
public static final String EXTENSION_MEMBER_CASCADE_PERSIST
public static final String EXTENSION_MEMBER_CASCADE_UPDATE
public static final String EXTENSION_MEMBER_CASCADE_DETACH
public static final String EXTENSION_MEMBER_CASCADE_REFRESH
public static final String EXTENSION_MEMBER_CACHEABLE
public static final String EXTENSION_MEMBER_FETCH_FK_ONLY
public static final String EXTENSION_MEMBER_CONTAINER_ALLOW_NULLS
public static final String EXTENSION_MEMBER_LIST_ORDERING
public static final String EXTENSION_MEMBER_STRATEGY_WHEN_NOTNULL
public static final String EXTENSION_MEMBER_RELATION_DISCRIM_COLUMN
public static final String EXTENSION_MEMBER_RELATION_DISCRIM_VALUE
public static final String EXTENSION_MEMBER_RELATION_DISCRIM_PK
public static final String EXTENSION_CLASS_VIEW_DEFINITION
public static final String EXTENSION_CLASS_VIEW_IMPORTS
protected int metaDataState
protected MetaData parent
public MetaData()
public MetaData(MetaData parent)
parent
- The parent MetaData object.public void initialise(ClassLoaderResolver clr)
public boolean isPopulated()
public boolean isInitialised()
public boolean isUsed()
public MetaDataManager getMetaDataManager()
public void setParent(MetaData md)
public MetaData getParent()
public int getNoOfExtensions()
public boolean hasExtension(String key)
public String getValueForExtension(String key)
key
- The key of the extensionpublic String[] getValuesForExtension(String key)
key
- The key of the extensionCopyright © 2019. All rights reserved.