Package org.datanucleus.metadata
Class PersistenceFileMetaData
java.lang.Object
org.datanucleus.metadata.MetaData
org.datanucleus.metadata.PersistenceFileMetaData
- All Implemented Interfaces:
Serializable
Representation of a Meta-Data "persistence.xml" file.
Contains a set of "persistence-unit" meta-data.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected String
Filename of the "persistence.xml"protected Set
<PersistenceUnitMetaData> Persistence units defined in this file.private static final long
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 -
Method Summary
Modifier and TypeMethodDescriptionvoid
Method to add a persistence unitAccessor for the filenameint
Accessor for the number of persistence units.getPersistenceUnit
(String name) Accessor for the Meta-Data of a persistence unit with a given name.Accessor for the persistence units in this "persistence.xml" file.void
setFilename
(String filename) Mutator for the filename for this MetaData file.Returns a string representation of the object.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:
-
filename
Filename of the "persistence.xml" -
persistenceUnits
Persistence units defined in this file.
-
-
Constructor Details
-
PersistenceFileMetaData
Constructor.- Parameters:
filename
- The file where this is stored (or null).
-
-
Method Details
-
getFilename
Accessor for the filename- Returns:
- The filename of this MetaData file.
-
getNoOfPersistenceUnits
public int getNoOfPersistenceUnits()Accessor for the number of persistence units.- Returns:
- no of persistence units.
-
getPersistenceUnit
Accessor for the Meta-Data of a persistence unit with a given name.- Parameters:
name
- Name of the persistence unit- Returns:
- Meta-Data for the persistence unit
-
getPersistenceUnits
Accessor for the persistence units in this "persistence.xml" file.- Returns:
- The persistence units
-
setFilename
Mutator for the filename for this MetaData file.- Parameters:
filename
- The filename of this MetaData file.
-
addPersistenceUnit
Method to add a persistence unit- Parameters:
pumd
- The PersistenceUnitMetaData to add.
-
toString
Returns a string representation of the object.- Parameters:
indent
- The indent- Returns:
- a string representation of the object.
-