Class HibernateModule
- java.lang.Object
- 
- org.apache.tapestry5.hibernate.web.modules.HibernateModule
 
- 
 public class HibernateModule extends java.lang.Object Supplements the services defined byHibernateCoreModulewith additional services and configuration specific to Tapestry web application.
- 
- 
Constructor SummaryConstructors Constructor Description HibernateModule()
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidcontributeApplicationStateManager(MappedConfiguration<java.lang.Class,ApplicationStateContribution> configuration, boolean entitySessionStatePersistenceStrategyEnabled, HibernateSessionSource sessionSource)ContributesApplicationStateContributions for all registered Hibernate entity classes.voidcontributeApplicationStatePersistenceStrategySource(MappedConfiguration<java.lang.String,ApplicationStatePersistenceStrategy> configuration)Contributes the following strategy: entity Stores the id of the entity and reloads from theSessionstatic voidcontributeFactoryDefaults(MappedConfiguration<java.lang.String,java.lang.String> configuration)static voidcontributeHibernateEntityPackageManager(Configuration<java.lang.String> configuration, java.lang.String appRootPackage)Contributes the package "<root>.entities" to the configuration, so that it will be scanned for annotated entity classes.static voidcontributePersistentFieldManager(MappedConfiguration<java.lang.String,PersistentFieldStrategy> configuration)Contributes the following: entity Stores the id of the entity and reloads from theSessionstatic voidcontributeValueEncoderSource(MappedConfiguration<java.lang.Class,ValueEncoderFactory> configuration, boolean provideEncoders, HibernateSessionSource sessionSource, org.hibernate.Session session, TypeCoercer typeCoercer, PropertyAccess propertyAccess, LoggerSource loggerSource, org.slf4j.Logger logger)ContributesValueEncoderFactorys for all registered Hibernate entity classes.static voidprovideCommitAfterAnnotationSupport(OrderedConfiguration<ComponentClassTransformWorker2> configuration)Adds the CommitAfter annotation work, to process theCommitAfterannotation.static voidprovideHibernateDashboardTab(OrderedConfiguration<DashboardTab> configuration)static voidprovideInjectableSessionObject(MappedConfiguration<java.lang.Class,java.lang.Object> configuration, org.hibernate.Session session)static voidprovideLibraryMapping(Configuration<LibraryMapping> configuration)
 
- 
- 
- 
Constructor Detail- 
HibernateModulepublic HibernateModule() 
 
- 
 - 
Method Detail- 
contributeFactoryDefaultspublic static void contributeFactoryDefaults(MappedConfiguration<java.lang.String,java.lang.String> configuration) 
 - 
contributeHibernateEntityPackageManagerpublic static void contributeHibernateEntityPackageManager(Configuration<java.lang.String> configuration, @Symbol("tapestry.app-package") java.lang.String appRootPackage) Contributes the package "<root>.entities" to the configuration, so that it will be scanned for annotated entity classes.
 - 
provideInjectableSessionObject@Contribute(ServiceOverride.class) public static void provideInjectableSessionObject(MappedConfiguration<java.lang.Class,java.lang.Object> configuration, @HibernateCore org.hibernate.Session session) 
 - 
contributeValueEncoderSourcepublic static void contributeValueEncoderSource(MappedConfiguration<java.lang.Class,ValueEncoderFactory> configuration, @Symbol("tapestry.hibernate.provide-entity-value-encoders") boolean provideEncoders, HibernateSessionSource sessionSource, org.hibernate.Session session, TypeCoercer typeCoercer, PropertyAccess propertyAccess, LoggerSource loggerSource, org.slf4j.Logger logger) ContributesValueEncoderFactorys for all registered Hibernate entity classes. Encoding and decoding are based on the id property value of the entity using type coercion. Hence, if the id can be coerced to a String and back then the entity can be coerced.
 - 
contributePersistentFieldManagerpublic static void contributePersistentFieldManager(MappedConfiguration<java.lang.String,PersistentFieldStrategy> configuration) Contributes the following:- entity
- Stores the id of the entity and reloads from the Session
 
 - 
contributeApplicationStatePersistenceStrategySourcepublic void contributeApplicationStatePersistenceStrategySource(MappedConfiguration<java.lang.String,ApplicationStatePersistenceStrategy> configuration) Contributes the following strategy:- entity
- Stores the id of the entity and reloads from the Session
 
 - 
contributeApplicationStateManagerpublic static void contributeApplicationStateManager(MappedConfiguration<java.lang.Class,ApplicationStateContribution> configuration, @Symbol("tapestry.hibernate.entity-session-state-persistence-strategy-enabled") boolean entitySessionStatePersistenceStrategyEnabled, HibernateSessionSource sessionSource) ContributesApplicationStateContributions for all registered Hibernate entity classes.- Parameters:
- configuration- Configuration to contribute
- entitySessionStatePersistenceStrategyEnabled- indicates if contribution should take place
- sessionSource- creates Hibernate session
 
 - 
provideCommitAfterAnnotationSupport@Contribute(ComponentClassTransformWorker2.class) @Primary public static void provideCommitAfterAnnotationSupport(OrderedConfiguration<ComponentClassTransformWorker2> configuration) Adds the CommitAfter annotation work, to process theCommitAfterannotation.
 - 
provideHibernateDashboardTab@Contribute(DashboardManager.class) public static void provideHibernateDashboardTab(OrderedConfiguration<DashboardTab> configuration) 
 - 
provideLibraryMapping@Contribute(ComponentClassResolver.class) public static void provideLibraryMapping(Configuration<LibraryMapping> configuration) 
 
- 
 
-