Interface IndexQueueRepository

All Superinterfaces:
org.springframework.data.repository.CrudRepository<IndexQueueEntity,Long>, DomainIdRepository<IndexQueueEntity,Long>, org.springframework.data.jpa.repository.JpaRepository<IndexQueueEntity,Long>, org.springframework.data.jpa.repository.JpaSpecificationExecutor<IndexQueueEntity>, org.springframework.data.repository.ListCrudRepository<IndexQueueEntity,Long>, org.springframework.data.repository.ListPagingAndSortingRepository<IndexQueueEntity,Long>, org.springframework.data.repository.PagingAndSortingRepository<IndexQueueEntity,Long>, org.springframework.data.repository.query.QueryByExampleExecutor<IndexQueueEntity>, org.springframework.data.repository.Repository<IndexQueueEntity,Long>

@Repository public interface IndexQueueRepository extends DomainIdRepository<IndexQueueEntity,Long>
Spring Data repository for IndexQueueEntity. Provides methods to query, insert, and delete RAG indexing queue entries.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.springframework.data.jpa.repository.JpaSpecificationExecutor

    org.springframework.data.jpa.repository.JpaSpecificationExecutor.SpecificationFluentQuery<T extends Object>
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    deleteByEntityTypeAndEntityId(RagEntityType entityType, Long entityId, Integer domainId)
    Deletes pending actions for one source in the specified accounting domain.
    void
    deleteByEntityTypeAndEntityId(RagEntityType entityType, List<Long> entityIds, Integer domainId)
    Deletes pending actions for selected sources in the specified accounting domain.
    Finds pending source actions across submitting domains by logical path prefix.
    Returns entity IDs queued for the specified action in one accounting domain.
    Returns the highest queue ID for establishing a processing snapshot.
    Returns the next stable queue batch within a cron run's initial ID snapshot.
     

    Methods inherited from interface org.springframework.data.repository.CrudRepository

    count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findById, save

    Methods inherited from interface sk.iway.iwcm.system.datatable.spring.DomainIdRepository

    findAllByDomainId, findAllByDomainId, findAllByIdInAndDomainId, findFirstByIdAndDomainId

    Methods inherited from interface org.springframework.data.jpa.repository.JpaRepository

    deleteAllByIdInBatch, deleteAllInBatch, deleteAllInBatch, deleteInBatch, findAll, findAll, flush, getById, getOne, getReferenceById, saveAllAndFlush, saveAndFlush

    Methods inherited from interface org.springframework.data.jpa.repository.JpaSpecificationExecutor

    count, count, delete, delete, exists, exists, findAll, findAll, findAll, findAll, findAll, findBy, findBy, findOne, findOne, update

    Methods inherited from interface org.springframework.data.repository.ListCrudRepository

    findAll, findAllById, saveAll

    Methods inherited from interface org.springframework.data.repository.ListPagingAndSortingRepository

    findAll

    Methods inherited from interface org.springframework.data.repository.PagingAndSortingRepository

    findAll

    Methods inherited from interface org.springframework.data.repository.query.QueryByExampleExecutor

    count, exists, findAll, findBy, findOne
  • Method Details

    • findTop500ByOrderByCreateDateAsc

      List<IndexQueueEntity> findTop500ByOrderByCreateDateAsc()
    • findMaxId

      @Query("SELECT MAX(q.id) FROM IndexQueueEntity q") Long findMaxId()
      Returns the highest queue ID for establishing a processing snapshot.
      Returns:
      highest current queue ID, or null for an empty queue
    • findTop500ByIdGreaterThanAndIdLessThanEqualOrderByIdAsc

      List<IndexQueueEntity> findTop500ByIdGreaterThanAndIdLessThanEqualOrderByIdAsc(Long afterId, Long maxId)
      Returns the next stable queue batch within a cron run's initial ID snapshot. The cursor ensures failed or undeletable rows are attempted only once per run, while later rows from the same snapshot can still be processed.
      Parameters:
      afterId - last queue ID attempted in the current run
      maxId - highest queue ID included in the current run
      Returns:
      up to 500 subsequent queue rows
    • deleteByEntityTypeAndEntityId

      @Modifying @Transactional @Query("DELETE FROM IndexQueueEntity q WHERE q.entityType = :entityType AND q.entityId = :entityId AND q.domainId = :domainId") void deleteByEntityTypeAndEntityId(@Param("entityType") RagEntityType entityType, @Param("entityId") Long entityId, @Param("domainId") Integer domainId)
      Deletes pending actions for one source in the specified accounting domain.
      Parameters:
      entityType - source entity type
      entityId - source identifier
      domainId - accounting domain whose entries are removed
    • deleteByEntityTypeAndEntityId

      @Modifying @Transactional @Query("DELETE FROM IndexQueueEntity q WHERE q.entityType = :entityType AND q.entityId IN :entityIds AND q.domainId = :domainId") void deleteByEntityTypeAndEntityId(@Param("entityType") RagEntityType entityType, @Param("entityIds") List<Long> entityIds, @Param("domainId") Integer domainId)
      Deletes pending actions for selected sources in the specified accounting domain.
      Parameters:
      entityType - source entity type
      entityIds - source identifiers
      domainId - accounting domain whose entries are removed
    • findExistingEntityIds

      @Query("SELECT q.entityId FROM IndexQueueEntity q WHERE q.entityType = :entityType AND q.action = :action AND q.domainId = :domainId") List<Long> findExistingEntityIds(@Param("entityType") RagEntityType entityType, @Param("action") RagIndexAction action, @Param("domainId") Integer domainId)
      Returns entity IDs queued for the specified action in one accounting domain.
      Parameters:
      entityType - source entity type
      action - queued action
      domainId - accounting domain to filter by
      Returns:
      matching queued entity IDs
    • findByEntityTypeAndSourcePathStartingWith

      List<IndexQueueEntity> findByEntityTypeAndSourcePathStartingWith(RagEntityType entityType, String sourcePath)
      Finds pending source actions across submitting domains by logical path prefix.
      Parameters:
      entityType - source entity type
      sourcePath - logical path prefix, normally the root followed by a slash
      Returns:
      matching queue entries from all domains