public abstract class HibernateBundle<T extends io.dropwizard.Configuration> extends Object implements io.dropwizard.ConfiguredBundle<T>, DatabaseConfiguration<T>
Modifier | Constructor and Description |
---|---|
protected |
HibernateBundle(Class<?> entity,
Class<?>... entities) |
protected |
HibernateBundle(com.google.common.collect.ImmutableList<Class<?>> entities,
SessionFactoryFactory sessionFactoryFactory) |
Modifier and Type | Method and Description |
---|---|
protected void |
configure(org.hibernate.cfg.Configuration configuration) |
protected com.fasterxml.jackson.datatype.hibernate4.Hibernate4Module |
createHibernate4Module()
Override to configure the
Hibernate4Module . |
org.hibernate.SessionFactory |
getSessionFactory() |
void |
initialize(io.dropwizard.setup.Bootstrap<?> bootstrap) |
protected String |
name()
Override to configure the name of the bundle
(It's used for the bundle health check and database pool metrics)
|
void |
run(T configuration,
io.dropwizard.setup.Environment environment) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDataSourceFactory
protected HibernateBundle(com.google.common.collect.ImmutableList<Class<?>> entities, SessionFactoryFactory sessionFactoryFactory)
public final void initialize(io.dropwizard.setup.Bootstrap<?> bootstrap)
initialize
in interface io.dropwizard.ConfiguredBundle<T extends io.dropwizard.Configuration>
protected com.fasterxml.jackson.datatype.hibernate4.Hibernate4Module createHibernate4Module()
Hibernate4Module
.protected String name()
public final void run(T configuration, io.dropwizard.setup.Environment environment) throws Exception
public org.hibernate.SessionFactory getSessionFactory()
protected void configure(org.hibernate.cfg.Configuration configuration)
Copyright © 2015. All rights reserved.