Class JPAConfig

java.lang.Object
org.summerboot.jexpress.boot.config.BootConfig
org.summerboot.jexpress.integration.jpa.JPAConfig
All Implemented Interfaces:
JExpressConfig
Direct Known Subclasses:
JPAHibernateConfig

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

  • Constructor Details

    • JPAConfig

      public JPAConfig()
  • Method Details

    • getSettings

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

      public List<Class<?>> getEntityClasses()
    • 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
      Parameters:
      cfgFile -
      isReal -
      Throws:
      IOException
    • load

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

      protected void scanAnnotation_Entity(String csvPackageNames, Set<String> packageSet)
    • loadCustomizedConfigs

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

      protected abstract void buildEntityManagerFactory()
    • em

      public abstract jakarta.persistence.EntityManager em()