org.apache.tapestry5.hibernate
Class HibernateModule

java.lang.Object
  extended by org.apache.tapestry5.hibernate.HibernateModule

public class HibernateModule
extends Object

Supplements the services defined by HibernateCoreModule with additional services and configuration specific to Tapestry web application.


Constructor Summary
HibernateModule()
           
 
Method Summary
static void contributeAlias(Configuration<AliasContribution> configuration, org.hibernate.Session session)
           
static void contributeComponentClassTransformWorker(OrderedConfiguration<ComponentClassTransformWorker> configuration)
          Adds the CommitAfter annotation work, to process the CommitAfter annotation.
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 ValueEncoderFactorys for all registered Hibernate entity classes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HibernateModule

public HibernateModule()
Method Detail

contributeFactoryDefaults

public static void contributeFactoryDefaults(MappedConfiguration<String,String> configuration)

contributeHibernateEntityPackageManager

public static void contributeHibernateEntityPackageManager(Configuration<String> configuration,
                                                           @Inject@Symbol(value="tapestry.app-package")
                                                           String appRootPackage)
Contributes the package "<root>.entities" to the configuration, so that it will be scanned for annotated entity classes.


contributeAlias

public static void contributeAlias(Configuration<AliasContribution> configuration,
                                   @HibernateCore
                                   org.hibernate.Session session)

contributeValueEncoderSource

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)
Contributes ValueEncoderFactorys 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.


contributePersistentFieldManager

public static void contributePersistentFieldManager(MappedConfiguration<String,PersistentFieldStrategy> configuration)
Contributes the following:
entity
Stores the id of the entity and reloads from the Session


contributeComponentClassTransformWorker

public static void contributeComponentClassTransformWorker(OrderedConfiguration<ComponentClassTransformWorker> configuration)
Adds the CommitAfter annotation work, to process the CommitAfter annotation.



Copyright © 2006-2009 Apache Software Foundation. All Rights Reserved.