org.codehaus.groovy.grails.orm.hibernate.cfg
Class GrailsAnnotationConfiguration

java.lang.Object
  extended by org.hibernate.cfg.Configuration
      extended by org.hibernate.cfg.AnnotationConfiguration
          extended by org.codehaus.groovy.grails.orm.hibernate.cfg.GrailsAnnotationConfiguration
All Implemented Interfaces:
Serializable, GrailsDomainConfiguration

public class GrailsAnnotationConfiguration
extends org.hibernate.cfg.AnnotationConfiguration
implements GrailsDomainConfiguration

Allows configuring Grails' hibernate support to work in conjuntion with Hibernate's annotation support

Since:
18-Feb-2006
Author:
Graeme Rocher
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.hibernate.cfg.AnnotationConfiguration
ARTEFACT, 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
GrailsAnnotationConfiguration()
           
 
Method Summary
 GrailsDomainConfiguration addDomainClass(GrailsDomainClass domainClass)
          Adds a domain class to the configuration
 org.hibernate.SessionFactory buildSessionFactory()
           
protected  void secondPassCompile()
          Overrides the default behaviour to including binding of Grails domain classes
 void setGrailsApplication(GrailsApplication application)
          Sets the grails application instance
 
Methods inherited from class org.hibernate.cfg.AnnotationConfiguration
add, addAnnotatedClass, addInputStream, addPackage, createExtendedMappings, getReflectionManager, orderAndFillHierarchy, parseMappingElement, reset, setCacheConcurrencyStrategy, setCollectionCacheConcurrencyStrategy, setPrecedence
 
Methods inherited from class org.hibernate.cfg.Configuration
addAuxiliaryDatabaseObject, addCacheableFile, addCacheableFile, addClass, addDirectory, addDocument, addFile, addFile, addFilterDefinition, addJar, addProperties, addResource, addResource, addSqlFunction, addURL, addXML, buildMapping, buildMappings, buildSettings, buildSettings, configure, configure, configure, configure, configure, createMappings, doConfigure, doConfigure, findPossibleExtends, generateDropSchemaScript, generateSchemaCreationScript, generateSchemaUpdateScript, getClassMapping, getClassMappings, getCollectionMapping, getCollectionMappings, getConfigurationInputStream, getEntityNotFoundDelegate, getEntityResolver, getEventListeners, getFilterDefinitions, getImports, getInterceptor, getNamedQueries, getNamedSQLQueries, getNamingStrategy, getProperties, getProperty, getSessionFactoryObserver, getSqlFunctions, getSqlResultSetMappings, getTableMappings, mergeProperties, secondPassCompileForeignKeys, setCacheConcurrencyStrategy, setCacheConcurrencyStrategy, setCollectionCacheConcurrencyStrategy, setEntityNotFoundDelegate, setEntityResolver, setInterceptor, setListener, setListener, setListeners, setListeners, setNamingStrategy, setProperties, setProperty, setSessionFactoryObserver, validateSchema
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GrailsAnnotationConfiguration

public GrailsAnnotationConfiguration()
Method Detail

addDomainClass

public GrailsDomainConfiguration addDomainClass(GrailsDomainClass domainClass)
Description copied from interface: GrailsDomainConfiguration
Adds a domain class to the configuration

Specified by:
addDomainClass in interface GrailsDomainConfiguration
Returns:
this

setGrailsApplication

public void setGrailsApplication(GrailsApplication application)
Description copied from interface: GrailsDomainConfiguration
Sets the grails application instance

Specified by:
setGrailsApplication in interface GrailsDomainConfiguration
Parameters:
application - The grails application to use or null if none.

buildSessionFactory

public org.hibernate.SessionFactory buildSessionFactory()
                                                 throws org.hibernate.HibernateException
Overrides:
buildSessionFactory in class org.hibernate.cfg.AnnotationConfiguration
Throws:
org.hibernate.HibernateException

secondPassCompile

protected void secondPassCompile()
                          throws org.hibernate.MappingException
Overrides the default behaviour to including binding of Grails domain classes

Overrides:
secondPassCompile in class org.hibernate.cfg.AnnotationConfiguration
Throws:
org.hibernate.MappingException


Copyright (c) 2005-2009 The Grails project