Class JPAHibernateConfig

java.lang.Object
org.summerboot.jexpress.boot.config.BootConfig
org.summerboot.jexpress.integration.db.JPAHibernateConfig
All Implemented Interfaces:
JExpressConfig

public abstract class JPAHibernateConfig extends BootConfig
Author:
Changski Tie Zheng Zhang 张铁铮, 魏泽北, 杜旺财, 杜富贵
  • Constructor Details

    • JPAHibernateConfig

      protected JPAHibernateConfig()
  • Method Details

    • loadCustomizedConfigs

      protected void loadCustomizedConfigs(File cfgFile, boolean isReal, ConfigUtil helper, Properties props) throws Exception
      Specified by:
      loadCustomizedConfigs in class BootConfig
      Throws:
      Exception
    • load

      public void load(File cfgFile, boolean isReal) throws IOException
      Description copied from class: BootConfig
      Load config settings with @Config, supported Java types:
      
       1. T, K: enum, String, boolean/Boolean, byte/Byte, char/short/Short, int/Integer,
       long/Long, float/Float, double/Double, BigDecimal, URI, URL, Path, File
       2. <T>[] array
       3. Immutable Set<T>
       4. Immutable List<T>
       5. Immutable Map<T, K>
       6. KeyManagerFactory
       7. TrustManagerFactory
       
      Specified by:
      load in interface JExpressConfig
      Overrides:
      load in class BootConfig
      Throws:
      IOException
    • load

      public void load(File cfgFile, String... packages) throws IOException
      Parameters:
      cfgFile -
      packages - in which contains the @Entity classes
      Throws:
      IOException
    • shutdown

      public void shutdown()
    • getSettings

      public Map<String,Object> getSettings()
    • getSessionFactory

      public org.hibernate.SessionFactory getSessionFactory()
    • em

      public jakarta.persistence.EntityManager em()
    • getProperty

      public String getProperty(String key)
    • getEntityClasses

      public List<Class<?>> getEntityClasses()