Interface ProductRepository

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

public interface ProductRepository extends org.springframework.data.jpa.repository.JpaRepository<Product,Long>
A ProductRepository.
Author:
Heiko Scherrer
  • Method Summary

    Modifier and Type
    Method
    Description
     
     
     
    int
     
    int
     
    int
     

    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

    • findBypKey

      Optional<Product> findBypKey(String pKey)
    • findBySku

      Optional<Product> findBySku(String sku)
    • findByLabel

      List<Product> findByLabel(String label)
    • productInUseByPU

      @Query(" select count(pu)\n from PackagingUnit pu\n where pu.product = :product\n") int productInUseByPU(@Param("product") Product product)
    • productInUseByLU

      @Query(" select count(lu)\n from LoadUnit lu\n where lu.product = :product\n") int productInUseByLU(@Param("product") Product product)
    • productInUseByUomRelation

      @Query(" select count(ur)\n from UomRelation ur\n where ur.product = :product\n") int productInUseByUomRelation(@Param("product") Product product)