Interface ProductQueryRepository

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

public interface ProductQueryRepository extends org.springframework.data.jpa.repository.JpaRepository<ProductQuery,Long>
Data Access Object for the ProductQuery class
Author:
Dr. Thomas Bassler
  • Method Summary

    Modifier and Type
    Method
    Description
    findUnsatisfiedByProductClass(long productClassId)
    Get all unsatisfied product queries for a given product class

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

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

    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.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

    • findUnsatisfiedByProductClass

      @Query("select pq from ProductQuery pq where pq.requestedProductClass.id = ?1 and pq.isSatisfied = false") List<ProductQuery> findUnsatisfiedByProductClass(long productClassId)
      Get all unsatisfied product queries for a given product class
      Parameters:
      productClassId - the database id of the product class
      Returns:
      a (possibly empty) list of unsatisfied product queries