public class HibernateModule extends Object
HibernateCoreModule
with additional
services and configuration specific to Tapestry web application.Constructor and Description |
---|
HibernateModule() |
Modifier and Type | Method and Description |
---|---|
static void |
contributeApplicationStateManager(MappedConfiguration<Class,ApplicationStateContribution> configuration,
boolean entitySessionStatePersistenceStrategyEnabled,
HibernateSessionSource sessionSource)
Contributes
ApplicationStateContribution s for all registered Hibernate entity classes. |
void |
contributeApplicationStatePersistenceStrategySource(MappedConfiguration<String,ApplicationStatePersistenceStrategy> configuration)
Contributes the following strategy:
entity
Stores the id of the entity and reloads from the
Session
|
static void |
contributeFactoryDefaults(MappedConfiguration<String,String> configuration) |
static void |
contributeHibernateEntityPackageManager(Configuration<String> configuration,
String appRootPackage)
Contributes the package "<root>.entities" to the configuration, so that it will be scanned for annotated
entity classes.
|
static void |
contributePersistentFieldManager(MappedConfiguration<String,PersistentFieldStrategy> configuration)
Contributes the following:
entity
Stores the id of the entity and reloads from the
Session
|
static void |
contributeValueEncoderSource(MappedConfiguration<Class,ValueEncoderFactory> configuration,
boolean provideEncoders,
HibernateSessionSource sessionSource,
org.hibernate.Session session,
TypeCoercer typeCoercer,
PropertyAccess propertyAccess,
LoggerSource loggerSource)
Contributes
ValueEncoderFactory s for all registered Hibernate entity classes. |
static void |
provideCommitAfterAnnotationSupport(OrderedConfiguration<ComponentClassTransformWorker2> configuration)
Adds the CommitAfter annotation work, to process the
CommitAfter annotation. |
static void |
provideHibernateDashboardTab(OrderedConfiguration<DashboardTab> configuration) |
static void |
provideInjectableSessionObject(MappedConfiguration<Class,Object> configuration,
org.hibernate.Session session) |
public HibernateModule()
public static void contributeFactoryDefaults(MappedConfiguration<String,String> configuration)
public static void contributeHibernateEntityPackageManager(Configuration<String> configuration, @Symbol(value="tapestry.app-package") String appRootPackage)
@Contribute(value=ServiceOverride.class) public static void provideInjectableSessionObject(MappedConfiguration<Class,Object> configuration, @HibernateCore org.hibernate.Session session)
public static void contributeValueEncoderSource(MappedConfiguration<Class,ValueEncoderFactory> configuration, @Symbol(value="tapestry.hibernate.provide-entity-value-encoders") boolean provideEncoders, HibernateSessionSource sessionSource, org.hibernate.Session session, TypeCoercer typeCoercer, PropertyAccess propertyAccess, LoggerSource loggerSource)
ValueEncoderFactory
s 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.public static void contributePersistentFieldManager(MappedConfiguration<String,PersistentFieldStrategy> configuration)
Session
public void contributeApplicationStatePersistenceStrategySource(MappedConfiguration<String,ApplicationStatePersistenceStrategy> configuration)
Session
public static void contributeApplicationStateManager(MappedConfiguration<Class,ApplicationStateContribution> configuration, @Symbol(value="tapestry.hibernate.entity-session-state-persistence-strategy-enabled") boolean entitySessionStatePersistenceStrategyEnabled, HibernateSessionSource sessionSource)
ApplicationStateContribution
s for all registered Hibernate entity classes.configuration
- Configuration to contributeentitySessionStatePersistenceStrategyEnabled
- indicates if contribution should take placesessionSource
- creates Hibernate session@Contribute(value=ComponentClassTransformWorker2.class) @Primary public static void provideCommitAfterAnnotationSupport(OrderedConfiguration<ComponentClassTransformWorker2> configuration)
CommitAfter
annotation.@Contribute(value=DashboardManager.class) public static void provideHibernateDashboardTab(OrderedConfiguration<DashboardTab> configuration)
5.6.3 - Copyright © 2003-2021 The Apache Software Foundation.