Class VectorJpaConfig

java.lang.Object
sk.iway.iwcm.rag.vectorjpa.VectorJpaConfig

@EnableTransactionManagement @EnableJpaRepositories(entityManagerFactoryRef="ragEntityManager", transactionManagerRef="ragTransactionManager", basePackages="sk.iway.iwcm.rag.vectorjpa") public class VectorJpaConfig extends Object
JPA configuration for RAG entities. Uses an explicitly configured rag_jpa datasource or the primary datasource. The vector backend and JPA dialect are detected from JDBC metadata. Registered only by VectorSpringConfig in its isolated persistence context; deliberately has no component stereotype to avoid discovery by the main application.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean
    Create the JPA EntityManagerFactory for RAG entities.
    static String
    Returns the datasource name for supported RAG vector operations.
    static boolean
    Check if a supported and enabled RAG vector store is available.
    org.springframework.transaction.PlatformTransactionManager
    transactionManager(jakarta.persistence.EntityManagerFactory entityManagerFactory)
    Create the JPA transaction manager for RAG entities.

    Methods inherited from class java.lang.Object

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

    • VectorJpaConfig

      public VectorJpaConfig()
  • Method Details

    • transactionManager

      @Bean("ragTransactionManager") public org.springframework.transaction.PlatformTransactionManager transactionManager(@Qualifier("ragEntityManager") jakarta.persistence.EntityManagerFactory entityManagerFactory)
      Create the JPA transaction manager for RAG entities.
    • entityManagerFactory

      @Bean("ragEntityManager") public org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean entityManagerFactory()
      Create the JPA EntityManagerFactory for RAG entities. Uses the RAG datasource selected by VectorStoreDataSourceResolver.
    • getRagDataSourceName

      public static String getRagDataSourceName()
      Returns the datasource name for supported RAG vector operations.
      Returns:
      datasource name, or null when the selected datasource is unsupported
    • isRagAvailable

      public static boolean isRagAvailable()
      Check if a supported and enabled RAG vector store is available.