public abstract class AbstractMetaDataFactory extends Object implements MetaDataFactory
MetaDataFactory that provides default implementations
of many methods.| Modifier and Type | Field and Description |
|---|---|
protected File |
dir |
protected Log |
log |
protected MetaDataRepository |
repos |
protected int |
store |
protected boolean |
strict |
protected Set |
types |
STORE_DEFAULT, STORE_PER_CLASS, STORE_VERBOSEMODE_ALL, MODE_ANN_MAPPING, MODE_MAPPING, MODE_MAPPING_INIT, MODE_META, MODE_NONE, MODE_QUERY| Constructor and Description |
|---|
AbstractMetaDataFactory() |
| Modifier and Type | Method and Description |
|---|---|
void |
addClassExtensionKeys(Collection exts)
Add any extension keys used by this instance to the given set.
|
void |
addFieldExtensionKeys(Collection exts)
Add any extension keys used by this instance to the given set.
|
void |
clear()
Clear any internal caches.
|
boolean |
drop(Class[] cls,
int mode,
ClassLoader envLoader)
Drop the metadata for the given classes in the given mode(s).
|
Set |
getPersistentTypeNames(boolean devpath,
ClassLoader envLoader)
Return all persistent class names, using the metadata locations supplied
in configuration, optionally scanning the classpath.
|
Class |
getQueryScope(String queryName,
ClassLoader loader)
Return the type defining the given query name, if any.
|
Class |
getResultSetMappingScope(String resultSetMappingName,
ClassLoader loader)
Return the type defining the given result set mapping name, if any.
|
ClassArgParser |
newClassArgParser()
Return a properly-configured class arg parser for our expected
metadata format.
|
void |
setRepository(MetaDataRepository repos)
Set the repository to load metadata into.
|
void |
setStoreDirectory(File dir)
Base directory for storing metadata.
|
void |
setStoreMode(int store)
Storage mode.
|
void |
setStrict(boolean strict)
If true, I/O's must exactly obey the mode directives given, and may
not load additional information.
|
void |
setTypes(Set types)
Set of persistent type names supplied by user.
|
void |
setTypes(String types)
Set of semicolon-separated persistent type names supplied by user via
auto-configuration.
|
boolean |
store(ClassMetaData[] metas,
QueryMetaData[] queries,
SequenceMetaData[] seqs,
int mode,
Map<File,String> output)
Store the given metadata.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetDefaults, getManagedClass, getManagedClassName, getMetaModelClassName, isMetaClass, load, loadXMLMetaDataprotected MetaDataRepository repos
protected transient Log log
protected File dir
protected int store
protected boolean strict
protected Set types
public void setTypes(Set types)
public void setTypes(String types)
public void setRepository(MetaDataRepository repos)
MetaDataFactorysetRepository in interface MetaDataFactorypublic void setStoreDirectory(File dir)
MetaDataFactorysetStoreDirectory in interface MetaDataFactorypublic void setStoreMode(int store)
MetaDataFactorysetStoreMode in interface MetaDataFactorypublic void setStrict(boolean strict)
MetaDataFactorysetStrict in interface MetaDataFactorypublic boolean store(ClassMetaData[] metas, QueryMetaData[] queries, SequenceMetaData[] seqs, int mode, Map<File,String> output)
MetaDataFactorystore in interface MetaDataFactorymode - hint about what aspects of the metadata have changedoutput - if non-null, rather than storing metadata directly,
add entries mapping each output destination such
as a File to the planned output for that
destination in string formpublic boolean drop(Class[] cls, int mode, ClassLoader envLoader)
MetaDataFactorydrop in interface MetaDataFactorypublic Set getPersistentTypeNames(boolean devpath, ClassLoader envLoader)
MetaDataFactoryMetaDataRepository.getPersistentTypeNames(boolean, java.lang.ClassLoader) instead.public Class getQueryScope(String queryName, ClassLoader loader)
MetaDataFactorygetQueryScope in interface MetaDataFactorypublic Class getResultSetMappingScope(String resultSetMappingName, ClassLoader loader)
MetaDataFactorygetResultSetMappingScope in interface MetaDataFactorypublic ClassArgParser newClassArgParser()
MetaDataFactorynewClassArgParser in interface MetaDataFactorypublic void clear()
MetaDataFactoryclear in interface MetaDataFactorypublic void addClassExtensionKeys(Collection exts)
MetaDataFactoryaddClassExtensionKeys in interface MetaDataFactorypublic void addFieldExtensionKeys(Collection exts)
MetaDataFactoryaddFieldExtensionKeys in interface MetaDataFactoryCopyright © 2006–2019 Apache Software Foundation. All rights reserved.