Class HibernateBundle<T>

    • Field Detail

      • sessionFactory

        protected @Nullable org.hibernate.SessionFactory sessionFactory
      • lazyLoadingEnabled

        protected boolean lazyLoadingEnabled
      • entities

        protected final List<Class<?>> entities
    • Constructor Detail

      • HibernateBundle

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

      • initialize

        public final void initialize​(Bootstrap<?> bootstrap)
        Description copied from interface: ConfiguredBundle
        Initializes the application bootstrap.
        Specified by:
        initialize in interface ConfiguredBundle<T>
        Parameters:
        bootstrap - the application bootstrap
      • 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)
      • 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)