Class HibernateModule

java.lang.Object
com.google.inject.AbstractModule
com.peterphi.std.guice.hibernate.module.HibernateModule
All Implemented Interfaces:
com.google.inject.Module

public abstract class HibernateModule extends com.google.inject.AbstractModule
  • Constructor Summary

    Constructors
    Constructor
    Description
    HibernateModule(com.codahale.metrics.MetricRegistry registry, GuiceConfig config)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
     
    protected abstract void
    configure(org.hibernate.cfg.Configuration config)
    Perform any steps necessary to fully configure the Hibernate Configuration provided
    The Configuration will already have been pre-populated with the properties from hibernate.properties
    org.hibernate.cfg.Configuration
    getHibernateConfiguration(GuiceConfig guiceConfig, String propertyFileName, HibernateObservingInterceptor interceptor)
     
    protected void
    registerTypes(org.hibernate.cfg.Configuration config)
     

    Methods inherited from class com.google.inject.AbstractModule

    addError, addError, addError, bind, bind, bind, bindConstant, binder, bindInterceptor, bindListener, bindListener, bindScope, configure, convertToTypes, currentStage, getMembersInjector, getMembersInjector, getProvider, getProvider, install, requestInjection, requestStaticInjection, requireBinding, requireBinding

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • HibernateModule

      public HibernateModule(com.codahale.metrics.MetricRegistry registry, GuiceConfig config)
  • Method Details

    • configure

      protected void configure()
      Overrides:
      configure in class com.google.inject.AbstractModule
    • getHibernateConfiguration

      @Provides public org.hibernate.cfg.Configuration getHibernateConfiguration(GuiceConfig guiceConfig, String propertyFileName, HibernateObservingInterceptor interceptor)
    • registerTypes

      protected void registerTypes(org.hibernate.cfg.Configuration config)
    • configure

      protected abstract void configure(org.hibernate.cfg.Configuration config)
      Perform any steps necessary to fully configure the Hibernate Configuration provided
      The Configuration will already have been pre-populated with the properties from hibernate.properties
      Parameters:
      config -