Interface CategoryRepository

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

@Repository public interface CategoryRepository extends org.springframework.data.repository.PagingAndSortingRepository<Category,UUID>, org.springframework.data.jpa.repository.JpaRepository<Category,UUID>
Repository interface for managing Category entities with pagination and sorting capabilities.
  • Method Summary

    Modifier and Type
    Method
    Description
    findByIdAndVendorID(UUID id, UUID vendorID)
    Finds a category by its ID and vendor ID.
    findByVendorID(UUID vendorID, org.springframework.data.domain.PageRequest pageable)
    Finds a list of categories by the given vendor ID with pagination.

    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

    • findByVendorID

      List<Category> findByVendorID(UUID vendorID, org.springframework.data.domain.PageRequest pageable)
      Finds a list of categories by the given vendor ID with pagination.
      Parameters:
      vendorID - the UUID of the vendor
      pageable - the PageRequest object containing pagination information
      Returns:
      a list of categories associated with the specified vendor ID
    • findByIdAndVendorID

      Optional<Category> findByIdAndVendorID(UUID id, UUID vendorID)
      Finds a category by its ID and vendor ID.
      Parameters:
      id - the UUID of the category
      vendorID - the UUID of the vendor
      Returns:
      an Optional containing the found category, or empty if not found