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
ConstructorDescriptionHibernateModule
(com.codahale.metrics.MetricRegistry registry, GuiceConfig config) -
Method Summary
Modifier and TypeMethodDescriptionprotected 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.propertiesorg.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
-
Constructor Details
-
HibernateModule
-
-
Method Details
-
configure
protected void configure()- Overrides:
configure
in classcom.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
-
-