Class BaseJpaDBConfig

java.lang.Object
sk.iway.iwcm.system.spring.BaseJpaDBConfig

public class BaseJpaDBConfig extends Object
Base class for Spring DATA config, you need to extend this class and override entityManagerFactory() and transactionManager() methods http://docs.webjetcms.sk/latest/en/custom-apps/spring-config/
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean
    In your implementation you need to override this method and annotate it with @Bean("basecmsEntityManager")
    org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean
    getEntityManager(String datasource, String[] packagesToScan)
    Base class to setup JPA EntityManager
    org.springframework.transaction.PlatformTransactionManager
    In your implementation you need to override this method and annotate it with @Bean("basecmsTransactionManager")

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • BaseJpaDBConfig

      public BaseJpaDBConfig()
  • Method Details

    • transactionManager

      public org.springframework.transaction.PlatformTransactionManager transactionManager()
      In your implementation you need to override this method and annotate it with @Bean("basecmsTransactionManager")
      Returns:
    • entityManagerFactory

      public org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean entityManagerFactory()
      In your implementation you need to override this method and annotate it with @Bean("basecmsEntityManager")
      Returns:
    • getEntityManager

      public org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean getEntityManager(String datasource, String[] packagesToScan)
      Base class to setup JPA EntityManager
      Parameters:
      datasource -
      packagesToScan -
      Returns: