Package org.datanucleus.metadata
Class FileMetaData
java.lang.Object
org.datanucleus.metadata.MetaData
org.datanucleus.metadata.FileMetaData
- All Implemented Interfaces:
Serializable
Representation of a Meta-Data file.
Contains a list of package meta-data, together with any named queries and fetch plans etc.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected String
Catalog name for all classes in this fileprotected Collection
<FetchPlanMetaData> Named FetchPlans in this file.protected String
Name of fileprotected List
<EventListenerMetaData> List of event listeners defined for this file.protected List
<PackageMetaData> List of packages in this file (uses List to retain file positioning)protected Collection
<QueryMetaData> Named queries defined in this file.protected Collection
<QueryResultMetaData> List of query result MetaData defined for this file.protected String
Schema name for all classes in this fileprivate static final long
protected Collection
<StoredProcQueryMetaData> Named stored procedures defined in this file.protected MetaDataFileType
Type of file (JDO, ORM, JDOQUERY, etc)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
addListener
(EventListenerMetaData listener) Add a listener class namevoid
addQueryResultMetaData
(QueryResultMetaData resultMetaData) Method to register a query-result MetaData.Utility method to check if the MetaData for a class is contained in this file.Accessor for the metadata of the named fetch plans.Get the event listeners registered against the file.int
Accessor for the number of named fetch plans.int
Accessor for the number of packages.int
Accessor for the number of named queries.int
Accessor for the number of named queries.getPackage
(int i) Accessor for the meta-data of a package.getPackage
(String name) Accessor for the Meta-Data of a package with a given name.Accessor for the metadata of the named queries.Get the query result MetaData.Accessor for the metadata of the named stored procedure queries.getType()
newFetchPlanMetaData
(String name) newPackageMetaData
(String name) Method to create and return a package metadata for the specified package name.newQueryMetaData
(String queryName) Method to create a new QueryMetadata, add it to the registered queries and return it.newQueryResultMetaData
(String name) Method to create a new query result metadata, add it, and return it.newStoredProcQueryMetaData
(String queryName) Method to create a new StoredProcQueryMetadata, add it to the registered queries and return it.setCatalog
(String catalog) setFilename
(String filename) setType
(MetaDataFileType type) 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:
-
type
Type of file (JDO, ORM, JDOQUERY, etc) -
filename
Name of file -
catalog
Catalog name for all classes in this file -
schema
Schema name for all classes in this file -
queries
Named queries defined in this file. -
storedProcs
Named stored procedures defined in this file. -
queryResultMetaData
List of query result MetaData defined for this file. -
fetchPlans
Named FetchPlans in this file. -
packages
List of packages in this file (uses List to retain file positioning) -
listeners
List of event listeners defined for this file.
-
-
Constructor Details
-
FileMetaData
public FileMetaData() -
FileMetaData
-
-
Method Details
-
getFilename
-
setFilename
-
getCatalog
-
setCatalog
-
getSchema
-
setSchema
-
getType
-
setType
-
getNoOfQueries
public int getNoOfQueries()Accessor for the number of named queries.- Returns:
- no of named queries
-
getQueries
Accessor for the metadata of the named queries.- Returns:
- Meta-Data for the named queries.
-
getNoOfStoredProcQueries
public int getNoOfStoredProcQueries()Accessor for the number of named queries.- Returns:
- no of named queries
-
getStoredProcQueries
Accessor for the metadata of the named stored procedure queries.- Returns:
- Meta-Data for the named stored proc queries.
-
getNoOfFetchPlans
public int getNoOfFetchPlans()Accessor for the number of named fetch plans.- Returns:
- no of named fetch plans
-
getFetchPlans
Accessor for the metadata of the named fetch plans.- Returns:
- Meta-Data for the named fetch plans.
-
getNoOfPackages
public int getNoOfPackages()Accessor for the number of packages.- Returns:
- no of packages.
-
getPackage
Accessor for the meta-data of a package.- Parameters:
i
- index number- Returns:
- Meta-Data for a package.
-
getPackage
Accessor for the Meta-Data of a package with a given name.- Parameters:
name
- Name of the package- Returns:
- Meta-Data for the package
-
getClass
Utility method to check if the MetaData for a class is contained in this file.- Parameters:
pkg_name
- Name of packageclass_name
- Name of class- Returns:
- The MetaData for the class
-
newQueryMetaData
Method to create a new QueryMetadata, add it to the registered queries and return it.- Parameters:
queryName
- Name of the query- Returns:
- The Query metadata
-
newStoredProcQueryMetaData
Method to create a new StoredProcQueryMetadata, add it to the registered queries and return it.- Parameters:
queryName
- Name of the query- Returns:
- The Query metadata
-
newFetchPlanMetaData
-
newPackageMetaData
Method to create and return a package metadata for the specified package name.- Parameters:
name
- Name of the package- Returns:
- The PackageMetadata
-
addListener
Add a listener class name- Parameters:
listener
- the listener metadata. Duplicated classes are ignored
-
getListeners
Get the event listeners registered against the file.- Returns:
- the event listeners
-
addQueryResultMetaData
Method to register a query-result MetaData.- Parameters:
resultMetaData
- Query-Result MetaData to register
-
newQueryResultMetaData
Method to create a new query result metadata, add it, and return it.- Parameters:
name
- Name of the result- Returns:
- The query result metadata
-
getQueryResultMetaData
Get the query result MetaData.- Returns:
- Query Result MetaData
-