Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.hibernate.cfg
Class AnnotationConfiguration

    java.lang.Object
      org.hibernate.cfg.Configuration
          org.hibernate.cfg.AnnotationConfiguration

All Implemented Interfaces:
  Serializable

    public class AnnotationConfiguration

extends org.hibernate.cfg.Configuration

Similar to the `Configuration` object but handles EJB3 and Hibernate specific annotations as a metadata facility

Author:
  Emmanuel Bernard
See Also:
  Serialized Form

Field Summary
`static String` | `ARTEFACT`
`static String` | `DEFAULT_PRECEDENCE`

Fields inherited from class org.hibernate.cfg.Configuration
`auxiliaryDatabaseObjects, classes, collections, columnNameBindingPerTable, extendsQueue, filterDefinitions, imports, namedQueries, namedSqlQueries, namingStrategy, propertyReferences, secondPasses, settingsFactory, sqlFunctions, sqlResultSetMappings, tableNameBinding, tables, typeDefs, xmlHelper`

Constructor Summary
`AnnotationConfiguration()`
`AnnotationConfiguration(org.hibernate.cfg.SettingsFactory sf)`

Method Summary
`protected void` | `add(org.dom4j.Document doc)`
`AnnotationConfiguration` | `addAnnotatedClass(Class persistentClass)` Read a mapping from the class annotation metadata (JSR 175).
`AnnotationConfiguration` | `addCacheableFile(File xmlFile)`
`AnnotationConfiguration` | `addCacheableFile(String xmlFile)`
`AnnotationConfiguration` | `addClass(Class persistentClass)`
`AnnotationConfiguration` | `addDirectory(File dir)`
`AnnotationConfiguration` | `addDocument(Document doc)`
`AnnotationConfiguration` | `addFile(File xmlFile)`
`AnnotationConfiguration` | `addFile(String xmlFile)`
`AnnotationConfiguration` | `addInputStream(InputStream xmlInputStream)`
`AnnotationConfiguration` | `addJar(File jar)`
`AnnotationConfiguration` | `addPackage(String packageName)` Read package level metadata
`AnnotationConfiguration` | `addProperties(Properties extraProperties)`
`AnnotationConfiguration` | `addResource(String resourceName)`
`AnnotationConfiguration` | `addResource(String resourceName, ClassLoader classLoader)`
`AnnotationConfiguration` | `addURL(URL url)`
`AnnotationConfiguration` | `addXML(String xml)`
`org.hibernate.SessionFactory` | `buildSessionFactory()`
`AnnotationConfiguration` | `configure()`
`AnnotationConfiguration` | `configure(Document document)`
`AnnotationConfiguration` | `configure(File configFile)`
`AnnotationConfiguration` | `configure(String resource)`
`AnnotationConfiguration` | `configure(URL url)`
`ExtendedMappings` | `createExtendedMappings()`
`protected AnnotationConfiguration` | `doConfigure(org.dom4j.Document doc)`
`protected AnnotationConfiguration` | `doConfigure(InputStream stream, String resourceName)`
`org.hibernate.annotations.common.reflection.ReflectionManager` | `getReflectionManager()`
`AnnotationConfiguration` | `mergeProperties(Properties properties)`
`protected List<org.hibernate.annotations.common.reflection.XClass>` | `orderAndFillHierarchy(List<org.hibernate.annotations.common.reflection.XClass> original)`
`protected void` | `parseMappingElement(org.dom4j.Element subelement, String name)`
`protected void` | `reset()`
`protected void` | `secondPassCompile()`
`AnnotationConfiguration` | `setCacheConcurrencyStrategy(String clazz, String concurrencyStrategy)`
`void` | `setCacheConcurrencyStrategy(String clazz, String concurrencyStrategy, String region, boolean cacheLazyProperty)`
`AnnotationConfiguration` | `setCollectionCacheConcurrencyStrategy(String collectionRole, String concurrencyStrategy)`
`void` | `setCollectionCacheConcurrencyStrategy(String collectionRole, String concurrencyStrategy, String region)`
`AnnotationConfiguration` | `setInterceptor(org.hibernate.Interceptor interceptor)`
`AnnotationConfiguration` | `setNamingStrategy(org.hibernate.cfg.NamingStrategy namingStrategy)`
`void` | `setPrecedence(String precedence)`
`AnnotationConfiguration` | `setProperties(Properties properties)`
`AnnotationConfiguration` | `setProperty(String propertyName, String value)`

Methods inherited from class org.hibernate.cfg.Configuration
`addAuxiliaryDatabaseObject, addFilterDefinition, addSqlFunction, buildMapping, buildMappings, buildSettings, buildSettings, createMappings, findPossibleExtends, generateDropSchemaScript, generateSchemaCreationScript, generateSchemaUpdateScript, getClassMapping, getClassMappings, getCollectionMapping, getCollectionMappings, getConfigurationInputStream, getEntityNotFoundDelegate, getEntityResolver, getEventListeners, getFilterDefinitions, getImports, getInterceptor, getNamedQueries, getNamedSQLQueries, getNamingStrategy, getProperties, getProperty, getSqlFunctions, getSqlResultSetMappings, getTableMappings, secondPassCompileForeignKeys, setCacheConcurrencyStrategy, setEntityNotFoundDelegate, setEntityResolver, setListener, setListeners, setListeners, validateSchema`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### ARTEFACT

    public static final String ARTEFACT

See Also:
  Constant Field Values

### DEFAULT_PRECEDENCE

    public static final String DEFAULT_PRECEDENCE

See Also:
  Constant Field Values

Constructor Detail

### AnnotationConfiguration

    public AnnotationConfiguration()

### AnnotationConfiguration

    public AnnotationConfiguration(org.hibernate.cfg.SettingsFactory sf)

Method Detail

### orderAndFillHierarchy

    protected List<org.hibernate.annotations.common.reflection.XClass> orderAndFillHierarchy(List<org.hibernate.annotations.common.reflection.XClass> original)

### addAnnotatedClass

    public AnnotationConfiguration addAnnotatedClass(Class persistentClass)
                                              throws org.hibernate.MappingException

  Read a mapping from the class annotation metadata (JSR 175).

  Parameters:
    `persistentClass` - the mapped class
  Returns:
    the configuration object
  Throws:
    `org.hibernate.MappingException`

### addPackage

    public AnnotationConfiguration addPackage(String packageName)
                                       throws org.hibernate.MappingException

  Read package level metadata

  Parameters:
    `packageName` - java package name
  Returns:
    the configuration object
  Throws:
    `org.hibernate.MappingException`

### createExtendedMappings

    public ExtendedMappings createExtendedMappings()

### setCacheConcurrencyStrategy

    public void setCacheConcurrencyStrategy(String clazz,
                                            String concurrencyStrategy,
                                            String region,
                                            boolean cacheLazyProperty)
                                     throws org.hibernate.MappingException

  Overrides:
    `setCacheConcurrencyStrategy` in class `org.hibernate.cfg.Configuration`
  Throws:
    `org.hibernate.MappingException`

### setCollectionCacheConcurrencyStrategy

    public void setCollectionCacheConcurrencyStrategy(String collectionRole,
                                                      String concurrencyStrategy,
                                                      String region)
                                               throws org.hibernate.MappingException

  Overrides:
    `setCollectionCacheConcurrencyStrategy` in class `org.hibernate.cfg.Configuration`
  Throws:
    `org.hibernate.MappingException`

### reset

    protected void reset()

  Overrides:
    `reset` in class `org.hibernate.cfg.Configuration`

### secondPassCompile

    protected void secondPassCompile()
                              throws org.hibernate.MappingException

  Overrides:
    `secondPassCompile` in class `org.hibernate.cfg.Configuration`
  Throws:
    `org.hibernate.MappingException`

### parseMappingElement

    protected void parseMappingElement(org.dom4j.Element subelement,
                                       String name)

  Overrides:
    `parseMappingElement` in class `org.hibernate.cfg.Configuration`

### add

    protected void add(org.dom4j.Document doc)
                throws org.hibernate.MappingException

  Overrides:
    `add` in class `org.hibernate.cfg.Configuration`
  Throws:
    `org.hibernate.MappingException`

### setPrecedence

    public void setPrecedence(String precedence)

### addInputStream

    public AnnotationConfiguration addInputStream(InputStream xmlInputStream)
                                           throws org.hibernate.MappingException

  Overrides:
    `addInputStream` in class `org.hibernate.cfg.Configuration`
  Throws:
    `org.hibernate.MappingException`

### buildSessionFactory

    public org.hibernate.SessionFactory buildSessionFactory()
                                                     throws org.hibernate.HibernateException

  Overrides:
    `buildSessionFactory` in class `org.hibernate.cfg.Configuration`
  Throws:
    `org.hibernate.HibernateException`

### addFile

    public AnnotationConfiguration addFile(String xmlFile)
                                    throws org.hibernate.MappingException

  Overrides:
    `addFile` in class `org.hibernate.cfg.Configuration`
  Throws:
    `org.hibernate.MappingException`

### addFile

    public AnnotationConfiguration addFile(File xmlFile)
                                    throws org.hibernate.MappingException

  Overrides:
    `addFile` in class `org.hibernate.cfg.Configuration`
  Throws:
    `org.hibernate.MappingException`

### addCacheableFile

    public AnnotationConfiguration addCacheableFile(File xmlFile)
                                             throws org.hibernate.MappingException

  Overrides:
    `addCacheableFile` in class `org.hibernate.cfg.Configuration`
  Throws:
    `org.hibernate.MappingException`

### addCacheableFile

    public AnnotationConfiguration addCacheableFile(String xmlFile)
                                             throws org.hibernate.MappingException

  Overrides:
    `addCacheableFile` in class `org.hibernate.cfg.Configuration`
  Throws:
    `org.hibernate.MappingException`

### addXML

    public AnnotationConfiguration addXML(String xml)
                                   throws org.hibernate.MappingException

  Overrides:
    `addXML` in class `org.hibernate.cfg.Configuration`
  Throws:
    `org.hibernate.MappingException`

### addURL

    public AnnotationConfiguration addURL(URL url)
                                   throws org.hibernate.MappingException

  Overrides:
    `addURL` in class `org.hibernate.cfg.Configuration`
  Throws:
    `org.hibernate.MappingException`

### addResource

    public AnnotationConfiguration addResource(String resourceName,
                                               ClassLoader classLoader)
                                        throws org.hibernate.MappingException

  Overrides:
    `addResource` in class `org.hibernate.cfg.Configuration`
  Throws:
    `org.hibernate.MappingException`

### addDocument

    public AnnotationConfiguration addDocument(Document doc)
                                        throws org.hibernate.MappingException

  Overrides:
    `addDocument` in class `org.hibernate.cfg.Configuration`
  Throws:
    `org.hibernate.MappingException`

### addResource

    public AnnotationConfiguration addResource(String resourceName)
                                        throws org.hibernate.MappingException

  Overrides:
    `addResource` in class `org.hibernate.cfg.Configuration`
  Throws:
    `org.hibernate.MappingException`

### addClass

    public AnnotationConfiguration addClass(Class persistentClass)
                                     throws org.hibernate.MappingException

  Overrides:
    `addClass` in class `org.hibernate.cfg.Configuration`
  Throws:
    `org.hibernate.MappingException`

### addJar

    public AnnotationConfiguration addJar(File jar)
                                   throws org.hibernate.MappingException

  Overrides:
    `addJar` in class `org.hibernate.cfg.Configuration`
  Throws:
    `org.hibernate.MappingException`

### addDirectory

    public AnnotationConfiguration addDirectory(File dir)
                                         throws org.hibernate.MappingException

  Overrides:
    `addDirectory` in class `org.hibernate.cfg.Configuration`
  Throws:
    `org.hibernate.MappingException`

### setInterceptor

    public AnnotationConfiguration setInterceptor(org.hibernate.Interceptor interceptor)

  Overrides:
    `setInterceptor` in class `org.hibernate.cfg.Configuration`

### setProperties

    public AnnotationConfiguration setProperties(Properties properties)

  Overrides:
    `setProperties` in class `org.hibernate.cfg.Configuration`

### addProperties

    public AnnotationConfiguration addProperties(Properties extraProperties)

  Overrides:
    `addProperties` in class `org.hibernate.cfg.Configuration`

### mergeProperties

    public AnnotationConfiguration mergeProperties(Properties properties)

  Overrides:
    `mergeProperties` in class `org.hibernate.cfg.Configuration`

### setProperty

    public AnnotationConfiguration setProperty(String propertyName,
                                               String value)

  Overrides:
    `setProperty` in class `org.hibernate.cfg.Configuration`

### configure

    public AnnotationConfiguration configure()
                                      throws org.hibernate.HibernateException

  Overrides:
    `configure` in class `org.hibernate.cfg.Configuration`
  Throws:
    `org.hibernate.HibernateException`

### configure

    public AnnotationConfiguration configure(String resource)
                                      throws org.hibernate.HibernateException

  Overrides:
    `configure` in class `org.hibernate.cfg.Configuration`
  Throws:
    `org.hibernate.HibernateException`

### configure

    public AnnotationConfiguration configure(URL url)
                                      throws org.hibernate.HibernateException

  Overrides:
    `configure` in class `org.hibernate.cfg.Configuration`
  Throws:
    `org.hibernate.HibernateException`

### configure

    public AnnotationConfiguration configure(File configFile)
                                      throws org.hibernate.HibernateException

  Overrides:
    `configure` in class `org.hibernate.cfg.Configuration`
  Throws:
    `org.hibernate.HibernateException`

### doConfigure

    protected AnnotationConfiguration doConfigure(InputStream stream,
                                                  String resourceName)
                                           throws org.hibernate.HibernateException

  Overrides:
    `doConfigure` in class `org.hibernate.cfg.Configuration`
  Throws:
    `org.hibernate.HibernateException`

### configure

    public AnnotationConfiguration configure(Document document)
                                      throws org.hibernate.HibernateException

  Overrides:
    `configure` in class `org.hibernate.cfg.Configuration`
  Throws:
    `org.hibernate.HibernateException`

### doConfigure

    protected AnnotationConfiguration doConfigure(org.dom4j.Document doc)
                                           throws org.hibernate.HibernateException

  Overrides:
    `doConfigure` in class `org.hibernate.cfg.Configuration`
  Throws:
    `org.hibernate.HibernateException`

### setCacheConcurrencyStrategy

    public AnnotationConfiguration setCacheConcurrencyStrategy(String clazz,
                                                               String concurrencyStrategy)
                                                        throws org.hibernate.MappingException

  Overrides:
    `setCacheConcurrencyStrategy` in class `org.hibernate.cfg.Configuration`
  Throws:
    `org.hibernate.MappingException`

### setCollectionCacheConcurrencyStrategy

    public AnnotationConfiguration setCollectionCacheConcurrencyStrategy(String collectionRole,
                                                                         String concurrencyStrategy)
                                                                  throws org.hibernate.MappingException

  Overrides:
    `setCollectionCacheConcurrencyStrategy` in class `org.hibernate.cfg.Configuration`
  Throws:
    `org.hibernate.MappingException`

### setNamingStrategy

    public AnnotationConfiguration setNamingStrategy(org.hibernate.cfg.NamingStrategy namingStrategy)

  Overrides:
    `setNamingStrategy` in class `org.hibernate.cfg.Configuration`

### getReflectionManager

    public org.hibernate.annotations.common.reflection.ReflectionManager getReflectionManager()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD