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.apache.tapestry5.hibernate
Class HibernateModule

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

    public class HibernateModule

extends java.lang.Object

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

Constructor Summary
`HibernateModule()`

Method Summary
`static void` | `contributeApplicationStateManager(MappedConfiguration<java.lang.Class,ApplicationStateContribution> configuration, boolean entitySessionStatePersistenceStrategyEnabled, HibernateSessionSource sessionSource)` Contributes `ApplicationStateContribution`s for all registered Hibernate entity classes.
`void` | `contributeApplicationStatePersistenceStrategySource(MappedConfiguration<java.lang.String,ApplicationStatePersistenceStrategy> configuration)` Contributes the following strategy: entity Stores the id of the entity and reloads from the `Session`
`static void` | `contributeComponentClassResolver(Configuration<LibraryMapping> configuration)` Contribution to the `ComponentClassResolver` service configuration.
`static void` | `contributeFactoryDefaults(MappedConfiguration<java.lang.String,java.lang.String> configuration)`
`static void` | `contributeHibernateEntityPackageManager(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 void` | `contributePersistentFieldManager(MappedConfiguration<java.lang.String,PersistentFieldStrategy> configuration)` Contributes the following: entity Stores the id of the entity and reloads from the `Session`
`static void` | `contributeValueEncoderSource(MappedConfiguration<java.lang.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` | `provideInjectableSessionObject(MappedConfiguration<java.lang.Class,java.lang.Object> configuration, org.hibernate.Session session)`

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<java.lang.String,java.lang.String> configuration)

### contributeHibernateEntityPackageManager

    public static void contributeHibernateEntityPackageManager(Configuration<java.lang.String> configuration,
                                                               @Symbol(value="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(value=ServiceOverride.class)
    public static void provideInjectableSessionObject(MappedConfiguration<java.lang.Class,java.lang.Object> configuration,
                                                                                           @HibernateCore
                                                                                           org.hibernate.Session session)

### contributeValueEncoderSource

    public static void contributeValueEncoderSource(MappedConfiguration<java.lang.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 `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.

### contributePersistentFieldManager

    public static void contributePersistentFieldManager(MappedConfiguration<java.lang.String,PersistentFieldStrategy> configuration)

  Contributes the following:
  entity
    Stores the id of the entity and reloads from the `Session`

### contributeApplicationStatePersistenceStrategySource

    public void contributeApplicationStatePersistenceStrategySource(MappedConfiguration<java.lang.String,ApplicationStatePersistenceStrategy> configuration)

  Contributes the following strategy:
  entity
    Stores the id of the entity and reloads from the `Session`

### contributeApplicationStateManager

    public static void contributeApplicationStateManager(MappedConfiguration<java.lang.Class,ApplicationStateContribution> configuration,
                                                         @Symbol(value="tapestry.hibernate.entity-session-state-persistence-strategy-enabled")
                                                         boolean entitySessionStatePersistenceStrategyEnabled,
                                                         HibernateSessionSource sessionSource)

  Contributes `ApplicationStateContribution`s for all registered Hibernate entity classes.

  Parameters:
    `configuration` - Configuration to contribute
    `entitySessionStatePersistenceStrategyEnabled` - indicates if contribution should take place
    `sessionSource` - creates Hibernate session

### provideCommitAfterAnnotationSupport

    @Contribute(value=ComponentClassTransformWorker2.class)
    @Primary
    public static void provideCommitAfterAnnotationSupport(OrderedConfiguration<ComponentClassTransformWorker2> configuration)

  Adds the CommitAfter annotation work, to process the `CommitAfter` annotation.

### contributeComponentClassResolver

    public static void contributeComponentClassResolver(Configuration<LibraryMapping> configuration)

  Contribution to the `ComponentClassResolver` service configuration.

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

Copyright © 2003-2012 The Apache Software Foundation.