Configuration@Deprecated public class AnnotationConfiguration extends Configuration
Configuration object but handles EJB3 and Hibernate
 specific annotations as a metadata facility.| Modifier and Type | Class and Description | 
|---|---|
protected class  | 
AnnotationConfiguration.ExtendedMappingsImpl
Deprecated.  
 | 
Configuration.MappingsImpl, Configuration.MetadataSourceQueueARTEFACT_PROCESSING_ORDER, auxiliaryDatabaseObjects, classes, collections, columnNameBindingPerTable, DEFAULT_ARTEFACT_PROCESSING_ORDER, DEFAULT_CACHE_CONCURRENCY_STRATEGY, extendsQueue, fetchProfiles, filterDefinitions, imports, metadataSourceQueue, namedEntityGraphMap, namedProcedureCallMap, namedQueries, namedSqlQueries, propertyReferences, secondPasses, settingsFactory, sqlFunctions, sqlResultSetMappings, tableNameBinding, tables, typeDefs, USE_NEW_ID_GENERATOR_MAPPINGS, xmlHelper| Constructor and Description | 
|---|
AnnotationConfiguration()
Deprecated.  
  | 
| Modifier and Type | Method and Description | 
|---|---|
AnnotationConfiguration | 
addAnnotatedClass(Class annotatedClass)
Deprecated.  
Read metadata from the annotations associated with this class. 
 | 
AnnotationConfiguration | 
addCacheableFile(File xmlFile)
Deprecated.  
Add a cached mapping file. 
 | 
AnnotationConfiguration | 
addCacheableFile(String xmlFile)
Deprecated.  
Add a cacheable mapping file. 
 | 
AnnotationConfiguration | 
addClass(Class persistentClass)
Deprecated.  
Read a mapping as an application resource using the convention that a class
 named foo.bar.Foo is mapped by a file foo/bar/Foo.hbm.xml
 which can be resolved as a classpath resource. 
 | 
AnnotationConfiguration | 
addDirectory(File dir)
Deprecated.  
Read all mapping documents from a directory tree. 
 | 
AnnotationConfiguration | 
addDocument(Document doc)
Deprecated.  
Read mappings from a DOM Document 
 | 
AnnotationConfiguration | 
addFile(File xmlFile)
Deprecated.  
Read mappings from a particular XML file 
 | 
AnnotationConfiguration | 
addFile(String xmlFile)
Deprecated.  
Read mappings from a particular XML file 
 | 
AnnotationConfiguration | 
addJar(File jar)
Deprecated.  
Read all mappings from a jar file
 
 Assumes that any file named *.hbm.xml is a mapping document. 
 | 
AnnotationConfiguration | 
addPackage(String packageName)
Deprecated.  
Read package-level metadata. 
 | 
AnnotationConfiguration | 
addProperties(Properties extraProperties)
Deprecated.  
Add the given properties to ours. 
 | 
AnnotationConfiguration | 
addResource(String resourceName)
Deprecated.  
Read mappings as a application resourceName (i.e. 
 | 
AnnotationConfiguration | 
addResource(String resourceName,
           ClassLoader classLoader)
Deprecated.  
Read mappings as a application resource (i.e. 
 | 
AnnotationConfiguration | 
addURL(URL url)
Deprecated.  
Read mappings from a URL 
 | 
AnnotationConfiguration | 
addXML(String xml)
Deprecated.  
Read mappings from a String 
 | 
AnnotationConfiguration | 
configure()
Deprecated.  
Use the mappings and properties specified in an application resource named hibernate.cfg.xml. 
 | 
AnnotationConfiguration | 
configure(Document document)
Deprecated.  
Use the mappings and properties specified in the given XML document. 
 | 
AnnotationConfiguration | 
configure(File configFile)
Deprecated.  
Use the mappings and properties specified in the given application file. 
 | 
AnnotationConfiguration | 
configure(String resource)
Deprecated.  
Use the mappings and properties specified in the given application resource. 
 | 
AnnotationConfiguration | 
configure(URL url)
Deprecated.  
Use the mappings and properties specified in the given document. 
 | 
ExtendedMappings | 
createExtendedMappings()
Deprecated.  
  | 
protected AnnotationConfiguration | 
doConfigure(org.dom4j.Document doc)
Deprecated.  
Parse a dom4j document conforming to the Hibernate Configuration DTD (hibernate-configuration-3.0.dtd)
 and use its information to configure this  
Configuration's state | 
protected AnnotationConfiguration | 
doConfigure(InputStream stream,
           String resourceName)
Deprecated.  
Configure this configuration's state from the contents of the given input stream. 
 | 
AnnotationConfiguration | 
mergeProperties(Properties properties)
Deprecated.  
Adds the incoming properties to the internal properties structure, as long as the internal structure does not
 already contain an entry for the given key. 
 | 
AnnotationConfiguration | 
setCacheConcurrencyStrategy(String clazz,
                           String concurrencyStrategy)
Deprecated.  
Set up a cache for an entity class 
 | 
AnnotationConfiguration | 
setCacheConcurrencyStrategy(String clazz,
                           String concurrencyStrategy,
                           String region)
Deprecated.  
Set up a cache for an entity class, giving an explicit region name 
 | 
AnnotationConfiguration | 
setCollectionCacheConcurrencyStrategy(String collectionRole,
                                     String concurrencyStrategy)
Deprecated.  
Set up a cache for a collection role 
 | 
AnnotationConfiguration | 
setInterceptor(Interceptor interceptor)
Deprecated.  
Set the current  
Interceptor | 
AnnotationConfiguration | 
setNamingStrategy(NamingStrategy namingStrategy)
Deprecated.  
Set the current naming strategy. 
 | 
AnnotationConfiguration | 
setNamingStrategyDelegator(NamingStrategyDelegator namingStrategyDelegator)
Deprecated.  
Set a current naming strategy delegator. 
 | 
AnnotationConfiguration | 
setProperties(Properties properties)
Deprecated.  
Specify a completely new set of properties 
 | 
AnnotationConfiguration | 
setProperty(String propertyName,
           String value)
Deprecated.  
Set a property value by name 
 | 
add, addAttributeConverter, addAttributeConverter, addAttributeConverter, addAttributeConverter, addAttributeConverter, addAuxiliaryDatabaseObject, addCacheableFileStrictly, addFetchProfile, addFilterDefinition, addInputStream, addSqlFunction, buildMapping, buildMappings, buildSessionFactory, buildSessionFactory, buildSettings, buildSettings, createMappings, findPossibleExtends, generateDropSchemaScript, generateSchemaCreationScript, generateSchemaUpdateScript, generateSchemaUpdateScriptList, getClassMapping, getClassMappings, getCollectionMapping, getCollectionMappings, getConfigurationInputStream, getCurrentTenantIdentifierResolver, getEntityNotFoundDelegate, getEntityResolver, getEntityTuplizerFactory, getFilterDefinitions, getIdentifierGeneratorFactory, getImports, getInterceptor, getJaccPermissionDeclarations, getMappedSuperclassMappings, getMappedSuperclassMappingsCopy, getNamedEntityGraphs, getNamedProcedureCallMap, getNamedQueries, getNamedSQLQueries, getNamingStrategy, getNamingStrategyDelegator, getProperties, getProperty, getReflectionManager, getSessionFactoryObserver, getSqlFunctions, getSqlResultSetMappings, getTableMappings, getTypeResolver, iterateFetchProfiles, iterateGenerators, registerTypeContributor, registerTypeOverride, registerTypeOverride, registerTypeOverride, reset, secondPassCompile, secondPassCompileForeignKeys, setCacheConcurrencyStrategy, setCollectionCacheConcurrencyStrategy, setCurrentTenantIdentifierResolver, setEntityNotFoundDelegate, setEntityResolver, setPrecedence, setSessionFactoryObserver, validateSchemapublic AnnotationConfiguration addAnnotatedClass(Class annotatedClass) throws MappingException
addAnnotatedClass in class ConfigurationannotatedClass - The class containing annotationsMappingExceptionpublic AnnotationConfiguration addPackage(String packageName) throws MappingException
addPackage in class ConfigurationpackageName - java package nameMappingException - in case there is an error in the mapping datapublic ExtendedMappings createExtendedMappings()
public AnnotationConfiguration addFile(String xmlFile) throws MappingException
ConfigurationaddFile in class ConfigurationxmlFile - a path to a fileMappingException - Indicates inability to locate or parse
 the specified mapping file.Configuration.addFile(java.io.File)public AnnotationConfiguration addFile(File xmlFile) throws MappingException
ConfigurationaddFile in class ConfigurationxmlFile - a path to a fileMappingException - Indicates inability to locate the specified mapping file.  Historically this could
 have indicated a problem parsing the XML document, but that is now delayed until after Configuration.buildMappings()public AnnotationConfiguration addCacheableFile(File xmlFile) throws MappingException
ConfigurationaddCacheableFile in class ConfigurationxmlFile - The cacheable mapping file to be added.MappingException - Indicates problems reading the cached file or processing
 the non-cached file.public AnnotationConfiguration addCacheableFile(String xmlFile) throws MappingException
ConfigurationaddCacheableFile in class ConfigurationxmlFile - The name of the file to be added.  This must be in a form
 useable to simply construct a File instance.MappingException - Indicates problems reading the cached file or processing
 the non-cached file.Configuration.addCacheableFile(java.io.File)public AnnotationConfiguration addXML(String xml) throws MappingException
ConfigurationaddXML in class Configurationxml - an XML stringMappingException - Indicates problems parsing the
 given XML stringpublic AnnotationConfiguration addURL(URL url) throws MappingException
ConfigurationaddURL in class Configurationurl - The url for the mapping document to be read.MappingException - Indicates problems reading the URL or processing
 the mapping document.public AnnotationConfiguration addResource(String resourceName, ClassLoader classLoader) throws MappingException
ConfigurationaddResource in class ConfigurationresourceName - The resource nameclassLoader - The class loader to use.MappingException - Indicates problems locating the resource or
 processing the contained mapping document.public AnnotationConfiguration addDocument(Document doc) throws MappingException
ConfigurationaddDocument in class Configurationdoc - The DOM documentMappingException - Indicates problems reading the DOM or processing
 the mapping document.public AnnotationConfiguration addResource(String resourceName) throws MappingException
ConfigurationaddResource in class ConfigurationresourceName - The resource nameMappingException - Indicates problems locating the resource or
 processing the contained mapping document.public AnnotationConfiguration addClass(Class persistentClass) throws MappingException
ConfigurationaddClass in class ConfigurationpersistentClass - The mapped classMappingException - Indicates problems locating the resource or
 processing the contained mapping document.public AnnotationConfiguration addJar(File jar) throws MappingException
ConfigurationaddJar in class Configurationjar - a jar fileMappingException - Indicates problems reading the jar file or
 processing the contained mapping documents.public AnnotationConfiguration addDirectory(File dir) throws MappingException
ConfigurationaddDirectory in class Configurationdir - The directoryMappingException - Indicates problems reading the jar file or
 processing the contained mapping documents.public AnnotationConfiguration setInterceptor(Interceptor interceptor)
ConfigurationInterceptorsetInterceptor in class Configurationinterceptor - The Interceptor to use for the built
 SessionFactory.public AnnotationConfiguration setProperties(Properties properties)
ConfigurationsetProperties in class Configurationproperties - The new set of propertiespublic AnnotationConfiguration addProperties(Properties extraProperties)
ConfigurationaddProperties in class ConfigurationextraProperties - The properties to add.public AnnotationConfiguration mergeProperties(Properties properties)
ConfigurationmergeProperties in class Configurationproperties - The properties to mergepublic AnnotationConfiguration setProperty(String propertyName, String value)
ConfigurationsetProperty in class ConfigurationpropertyName - The name of the property to setvalue - The new property valuepublic AnnotationConfiguration configure() throws HibernateException
Configurationconfigure in class ConfigurationHibernateException - Generally indicates we cannot find hibernate.cfg.xmlConfiguration.configure(String)public AnnotationConfiguration configure(String resource) throws HibernateException
ConfigurationConfiguration.getConfigurationInputStream(java.lang.String)configure in class Configurationresource - The resource to useHibernateException - Generally indicates we cannot find the named resourceConfiguration.doConfigure(java.io.InputStream, String)public AnnotationConfiguration configure(URL url) throws HibernateException
Configurationconfigure in class Configurationurl - URL from which you wish to load the configurationHibernateException - Generally indicates a problem access the urlConfiguration.doConfigure(java.io.InputStream, String)public AnnotationConfiguration configure(File configFile) throws HibernateException
Configurationconfigure in class ConfigurationconfigFile - File from which you wish to load the configurationHibernateException - Generally indicates a problem access the fileConfiguration.doConfigure(java.io.InputStream, String)protected AnnotationConfiguration doConfigure(InputStream stream, String resourceName) throws HibernateException
ConfigurationConfiguration.doConfigure(Document) for further details.doConfigure in class Configurationstream - The input stream from which to readresourceName - The name to use in warning/error messagesHibernateException - Indicates a problem reading the stream contents.public AnnotationConfiguration configure(Document document) throws HibernateException
Configurationconfigure in class Configurationdocument - an XML document from which you wish to load the configurationHibernateException - if there is problem in accessing the file.protected AnnotationConfiguration doConfigure(org.dom4j.Document doc) throws HibernateException
ConfigurationConfiguration's statedoConfigure in class Configurationdoc - The dom4j documentHibernateException - Indicates a problem performing the configuration taskpublic AnnotationConfiguration setCacheConcurrencyStrategy(String clazz, String concurrencyStrategy)
ConfigurationsetCacheConcurrencyStrategy in class Configurationclazz - The name of the entity to which we shoudl associate these cache settingsconcurrencyStrategy - The cache strategy to usepublic AnnotationConfiguration setCacheConcurrencyStrategy(String clazz, String concurrencyStrategy, String region)
ConfigurationsetCacheConcurrencyStrategy in class Configurationclazz - The name of the entity to which we should associate these cache settingsconcurrencyStrategy - The cache strategy to useregion - The name of the cache region to usepublic AnnotationConfiguration setCollectionCacheConcurrencyStrategy(String collectionRole, String concurrencyStrategy) throws MappingException
ConfigurationsetCollectionCacheConcurrencyStrategy in class ConfigurationcollectionRole - The name of the collection to which we should associate these cache settingsconcurrencyStrategy - The cache strategy to useMappingExceptionpublic AnnotationConfiguration setNamingStrategy(NamingStrategy namingStrategy)
ConfigurationLegacyNamingStrategyDelegator
 will be constructed with the specified naming strategy.setNamingStrategy in class ConfigurationnamingStrategy - the NamingStrategy to set; must be non-null.LegacyNamingStrategyDelegator.LegacyNamingStrategyDelegator(NamingStrategy)public AnnotationConfiguration setNamingStrategyDelegator(NamingStrategyDelegator namingStrategyDelegator)
ConfigurationsetNamingStrategyDelegator in class ConfigurationnamingStrategyDelegator - the NamingStrategyDelegator to set;
                                must be non-null; if namingStrategyDelegator is an instance
                                of LegacyNamingStrategyDelegator, then
                                LegacyNamingStrategyDelegator.getNamingStrategy() must be non-null.Copyright © 2001-2015 Red Hat, Inc. All Rights Reserved.