Interface ProductRepository
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<Product,
,UUID> org.springframework.data.jpa.repository.JpaRepository<Product,
,UUID> org.springframework.data.repository.ListCrudRepository<Product,
,UUID> org.springframework.data.repository.ListPagingAndSortingRepository<Product,
,UUID> org.springframework.data.repository.PagingAndSortingRepository<Product,
,UUID> org.springframework.data.repository.query.QueryByExampleExecutor<Product>
,org.springframework.data.repository.Repository<Product,
UUID>
@Repository
public interface ProductRepository
extends org.springframework.data.repository.PagingAndSortingRepository<Product,UUID>, org.springframework.data.jpa.repository.JpaRepository<Product,UUID>
Repository interface for managing Product entities.
-
Method Summary
Modifier and TypeMethodDescriptionfindAllByCategoryIdAndVendorID
(UUID categoryId, UUID vendorID, org.springframework.data.domain.PageRequest pageRequest) Finds all Product records associated with a specific category ID and vendor ID.findAllByVendorID
(UUID vendorID, org.springframework.data.domain.PageRequest pageRequest) Finds all Product records associated with a specific vendor ID.Finds a Product by its ID with a pessimistic write lock.Methods inherited from interface org.springframework.data.repository.CrudRepository
count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, 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
-
findAllByVendorID
List<Product> findAllByVendorID(UUID vendorID, org.springframework.data.domain.PageRequest pageRequest) Finds all Product records associated with a specific vendor ID.- Parameters:
vendorID
- the UUID of the vendorpageRequest
- pagination information- Returns:
- a list of Product records
-
findAllByCategoryIdAndVendorID
List<Product> findAllByCategoryIdAndVendorID(UUID categoryId, UUID vendorID, org.springframework.data.domain.PageRequest pageRequest) Finds all Product records associated with a specific category ID and vendor ID.- Parameters:
categoryId
- the UUID of the categoryvendorID
- the UUID of the vendorpageRequest
- pagination information- Returns:
- a list of Product records
-
findById
Finds a Product by its ID with a pessimistic write lock.
-