Class HibernateBundle<T extends io.dropwizard.Configuration>

    • Constructor Detail

      • HibernateBundle

        protected HibernateBundle​(Class<?> entity,
                                  Class<?>... entities)
      • HibernateBundle

        protected HibernateBundle​(com.google.common.collect.ImmutableList<Class<?>> entities,
                                  SessionFactoryFactory sessionFactoryFactory)
    • Method Detail

      • initialize

        public final void initialize​(io.dropwizard.setup.Bootstrap<?> bootstrap)
        Specified by:
        initialize in interface io.dropwizard.ConfiguredBundle<T extends io.dropwizard.Configuration>
      • createHibernate5Module

        protected com.fasterxml.jackson.datatype.hibernate5.Hibernate5Module createHibernate5Module()
        Override to configure the Hibernate5Module.
      • name

        protected String name()
        Override to configure the name of the bundle (It's used for the bundle health check and database pool metrics)
      • run

        public final void run​(T configuration,
                              io.dropwizard.setup.Environment environment)
                       throws Exception
        Specified by:
        run in interface io.dropwizard.ConfiguredBundle<T extends io.dropwizard.Configuration>
        Throws:
        Exception
      • isLazyLoadingEnabled

        public boolean isLazyLoadingEnabled()
      • setLazyLoadingEnabled

        public void setLazyLoadingEnabled​(boolean lazyLoadingEnabled)
      • getSessionFactory

        public org.hibernate.SessionFactory getSessionFactory()
      • configure

        protected void configure​(org.hibernate.cfg.Configuration configuration)