Top Description Inners Fields Constructors Methods
org.hibernate.cfg

public Class AnnotationConfiguration

extends Configuration
Class Inheritance
Annotations
@Deprecated
Imports
java.io.File, .InputStream, java.net.URL, java.util.ArrayList, .HashMap, .List, .Map, .Properties, javax.persistence.Embeddable, .Entity, .MappedSuperclass, .MapsId, org.dom4j.Document, org.slf4j.Logger, .LoggerFactory, org.hibernate.AnnotationException, .DuplicateMappingException, .HibernateException, .Interceptor, .MappingException, org.hibernate.annotations.AnyMetaDef, org.hibernate.annotations.common.reflection.ReflectionManager, .XClass, org.hibernate.engine.NamedQueryDefinition, .NamedSQLQueryDefinition, .ResultSetMappingDefinition, org.hibernate.mapping.IdGenerator, .Join, .PersistentClass, .Table, org.hibernate.persister.PersisterClassProvider, org.hibernate.util.CollectionHelper

Deprecated

All functionality has been moved to Configuration

Similar to the Configuration object but handles EJB3 and Hibernate specific annotations as a metadata facility.
Authors
Emmanuel Bernard, Hardy Ferentschik

Nested and Inner Type Summary

Modifier and TypeClass and Description
protected class

Field Summary

Modifier and TypeField and Description
private Logger
Inherited from org.hibernate.cfg.Configuration:
ARTEFACT_PROCESSING_ORDERauxiliaryDatabaseObjectsclassescollectionscolumnNameBindingPerTableDEFAULT_ARTEFACT_PROCESSING_ORDERDEFAULT_CACHE_CONCURRENCY_STRATEGYextendsQueuefetchProfilesfilterDefinitionsimportsmetadataSourceQueuenamedQueriesnamedSqlQueriesnamingStrategynormalizerpropertyReferencessecondPassessettingsFactorysqlFunctionssqlResultSetMappingstableNameBindingtablestypeDefsUSE_NEW_ID_GENERATOR_MAPPINGSxmlHelper

Constructor Summary

AccessConstructor and Description
public
public

Method Summary

Modifier and TypeMethod and Description
public AnnotationConfiguration
addAnnotatedClass(Class<T>
The class containing annotations
annotatedClass
)

Overrides org.hibernate.cfg.Configuration.addAnnotatedClass.

Deprecated as a consequence of AnnotationConfiguration being deprecated.
Read metadata from the annotations associated with this class.
public AnnotationConfiguration
addCacheableFile(File
The cacheable mapping file to be added.
xmlFile
)

Overrides org.hibernate.cfg.Configuration.addCacheableFile.

Deprecated as a consequence of AnnotationConfiguration being deprecated.
Add a cached mapping file.
public AnnotationConfiguration
addCacheableFile(String
The name of the file to be added. This must be in a form useable to simply construct a java.io.File instance.
xmlFile
)

Overrides org.hibernate.cfg.Configuration.addCacheableFile.

Deprecated as a consequence of AnnotationConfiguration being deprecated.
Add a cacheable mapping file.
public AnnotationConfiguration
addClass(Class<T>
The mapped class
persistentClass
)

Overrides org.hibernate.cfg.Configuration.addClass.

Deprecated as a consequence of AnnotationConfiguration being 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.
public AnnotationConfiguration
addDirectory(File
The directory
dir
)

Overrides org.hibernate.cfg.Configuration.addDirectory.

Deprecated as a consequence of AnnotationConfiguration being deprecated.
Read all mapping documents from a directory tree.
public AnnotationConfiguration
addDocument(Document
The DOM document
doc
)

Overrides org.hibernate.cfg.Configuration.addDocument.

Deprecated as a consequence of AnnotationConfiguration being deprecated.
Read mappings from a DOM Document
public AnnotationConfiguration
addFile(String
a path to a file
xmlFile
)

Overrides org.hibernate.cfg.Configuration.addFile.

Deprecated as a consequence of AnnotationConfiguration being deprecated.
Read mappings from a particular XML file
public AnnotationConfiguration
addFile(File
a path to a file
xmlFile
)

Overrides org.hibernate.cfg.Configuration.addFile.

Deprecated as a consequence of AnnotationConfiguration being deprecated.
Read mappings from a particular XML file
public AnnotationConfiguration
addJar(File
a jar file
jar
)

Overrides org.hibernate.cfg.Configuration.addJar.

Deprecated as a consequence of AnnotationConfiguration being deprecated.
Read all mappings from a jar file

Assumes that any file named *.hbm.xml is a mapping document.

public AnnotationConfiguration
addPackage(String
java package name
packageName
)

Overrides org.hibernate.cfg.Configuration.addPackage.

Deprecated as a consequence of AnnotationConfiguration being deprecated.
Read package-level metadata.
public AnnotationConfiguration
addProperties(Properties
The properties to add.
extraProperties
)

Overrides org.hibernate.cfg.Configuration.addProperties.

Deprecated as a consequence of AnnotationConfiguration being deprecated.
Add the given properties to ours.
public AnnotationConfiguration
addResource(String
The resource name
resourceName
,
ClassLoader
The class loader to use.
classLoader
)

Overrides org.hibernate.cfg.Configuration.addResource.

Deprecated as a consequence of AnnotationConfiguration being deprecated.
Read mappings as a application resource (i.e. classpath lookup).
public AnnotationConfiguration
addResource(String
The resource name
resourceName
)

Overrides org.hibernate.cfg.Configuration.addResource.

Deprecated as a consequence of AnnotationConfiguration being deprecated.
Read mappings as a application resourceName (i.e. classpath lookup) trying different class loaders.
public AnnotationConfiguration
addURL(URL
The url for the mapping document to be read.
url
)

Overrides org.hibernate.cfg.Configuration.addURL.

Deprecated as a consequence of AnnotationConfiguration being deprecated.
Read mappings from a URL
public AnnotationConfiguration
addXML(String
an XML string
xml
)

Overrides org.hibernate.cfg.Configuration.addXML.

Deprecated as a consequence of AnnotationConfiguration being deprecated.
Read mappings from a String
public AnnotationConfiguration
configure()

Overrides org.hibernate.cfg.Configuration.configure.

Deprecated as a consequence of AnnotationConfiguration being deprecated.
Use the mappings and properties specified in an application resource named hibernate.cfg.xml.
public AnnotationConfiguration
configure(String
The resource to use
resource
)

Overrides org.hibernate.cfg.Configuration.configure.

Deprecated as a consequence of AnnotationConfiguration being deprecated.
Use the mappings and properties specified in the given application resource.
public AnnotationConfiguration
configure(URL
URL from which you wish to load the configuration
url
)

Overrides org.hibernate.cfg.Configuration.configure.

Deprecated as a consequence of AnnotationConfiguration being deprecated.
Use the mappings and properties specified in the given document.
public AnnotationConfiguration
configure(File
File from which you wish to load the configuration
configFile
)

Overrides org.hibernate.cfg.Configuration.configure.

Deprecated as a consequence of AnnotationConfiguration being deprecated.
Use the mappings and properties specified in the given application file.
public AnnotationConfiguration
configure(Document
an XML document from which you wish to load the configuration
document
)

Overrides org.hibernate.cfg.Configuration.configure.

Deprecated as a consequence of AnnotationConfiguration being deprecated.
Use the mappings and properties specified in the given XML document.
public ExtendedMappings
createExtendedMappings()

Deprecated as a consequence of ExtendedMappings being deprecated.
protected AnnotationConfiguration
doConfigure(InputStream
The input stream from which to read
stream
,
String
The name to use in warning/error messages
resourceName
)

Overrides org.hibernate.cfg.Configuration.doConfigure.

Deprecated as a consequence of AnnotationConfiguration being deprecated.
Configure this configuration's state from the contents of the given input stream.
protected AnnotationConfiguration
doConfigure(Document
The dom4j document
doc
)

Overrides org.hibernate.cfg.Configuration.doConfigure.

Deprecated as a consequence of AnnotationConfiguration being 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
public AnnotationConfiguration
mergeProperties(Properties
The properties to merge
properties
)

Overrides org.hibernate.cfg.Configuration.mergeProperties.

Deprecated as a consequence of AnnotationConfiguration being 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.
public AnnotationConfiguration
setCacheConcurrencyStrategy(String
The name of the entity to which we shoudl associate these cache settings
clazz
,
String
The cache strategy to use
concurrencyStrategy
)

Overrides org.hibernate.cfg.Configuration.setCacheConcurrencyStrategy.

Deprecated as a consequence of AnnotationConfiguration being deprecated.
Set up a cache for an entity class
public AnnotationConfiguration
setCacheConcurrencyStrategy(String
The name of the entity to which we should associate these cache settings
clazz
,
String
The cache strategy to use
concurrencyStrategy
,
String
The name of the cache region to use
region
)

Overrides org.hibernate.cfg.Configuration.setCacheConcurrencyStrategy.

Deprecated as a consequence of AnnotationConfiguration being deprecated.
Set up a cache for an entity class, giving an explicit region name
public AnnotationConfiguration
setCollectionCacheConcurrencyStrategy(String
The name of the collection to which we should associate these cache settings
collectionRole
,
String
The cache strategy to use
concurrencyStrategy
)

Overrides org.hibernate.cfg.Configuration.setCollectionCacheConcurrencyStrategy.

Deprecated as a consequence of AnnotationConfiguration being deprecated.
Set up a cache for a collection role
public AnnotationConfiguration
setInterceptor(Interceptor
The Interceptor to use for the built SessionFactory.
interceptor
)

Overrides org.hibernate.cfg.Configuration.setInterceptor.

Deprecated as a consequence of AnnotationConfiguration being deprecated.
Set the current Interceptor
public AnnotationConfiguration
setNamingStrategy(NamingStrategy
the NamingStrategy to set
namingStrategy
)

Overrides org.hibernate.cfg.Configuration.setNamingStrategy.

Deprecated as a consequence of AnnotationConfiguration being deprecated.
Set a custom naming strategy
public AnnotationConfiguration
setPersisterClassProvider(PersisterClassProvider
implementation
persisterClassProvider
)

Overrides org.hibernate.cfg.Configuration.setPersisterClassProvider.

Deprecated as a consequence of AnnotationConfiguration being deprecated.
Defines a custom persister class provider.
public AnnotationConfiguration
setProperties(Properties
The new set of properties
properties
)

Overrides org.hibernate.cfg.Configuration.setProperties.

Deprecated as a consequence of AnnotationConfiguration being deprecated.
Specify a completely new set of properties
public AnnotationConfiguration
setProperty(String
The name of the property to set
propertyName
,
String
The new property value
value
)

Overrides org.hibernate.cfg.Configuration.setProperty.

Deprecated as a consequence of AnnotationConfiguration being deprecated.
Set a property value by name
Inherited from org.hibernate.cfg.Configuration:
addaddAuxiliaryDatabaseObjectaddCacheableFileStrictlyaddFetchProfileaddFilterDefinitionaddInputStreamaddSqlFunctionbuildMappingbuildMappingsbuildSessionFactorybuildSettingsbuildSettingscreateMappingsfindPossibleExtendsgenerateDropSchemaScriptgenerateSchemaCreationScriptgenerateSchemaUpdateScriptgetClassMappinggetClassMappingsgetCollectionMappinggetCollectionMappingsgetConfigurationInputStreamgetEntityNotFoundDelegategetEntityResolvergetEntityTuplizerFactorygetEventListenersgetFilterDefinitionsgetIdentifierGeneratorFactorygetImportsgetInterceptorgetMappedSuperclassMappingsgetNamedQueriesgetNamedSQLQueriesgetNamingStrategygetPersisterClassProvidergetPropertiesgetPropertygetReflectionManagergetRootClassMappinggetSessionFactoryObservergetSqlFunctionsgetSqlResultSetMappingsgetTableMappingsgetTypeResolveriterateFetchProfilesregisterTypeOverrideregisterTypeOverrideregisterTypeOverrideresetsecondPassCompilesecondPassCompileForeignKeyssetCacheConcurrencyStrategysetCollectionCacheConcurrencyStrategysetEntityNotFoundDelegatesetEntityResolversetListenersetListenersetListenerssetListenerssetPrecedencesetSessionFactoryObservervalidateSchema