Interface OrderRepository
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<Order,
,UUID> org.springframework.data.jpa.repository.JpaRepository<Order,
,UUID> org.springframework.data.repository.ListCrudRepository<Order,
,UUID> org.springframework.data.repository.ListPagingAndSortingRepository<Order,
,UUID> org.springframework.data.repository.PagingAndSortingRepository<Order,
,UUID> org.springframework.data.repository.query.QueryByExampleExecutor<Order>
,org.springframework.data.repository.Repository<Order,
UUID>
@Repository
public interface OrderRepository
extends org.springframework.data.repository.PagingAndSortingRepository<Order,UUID>, org.springframework.data.jpa.repository.JpaRepository<Order,UUID>
Repository interface for managing Order entities.
-
Method Summary
Modifier and TypeMethodDescriptionfindByUserId
(String userId, org.springframework.data.domain.PageRequest pageRequest) Finds orders by user ID with pagination support.findByVendorId
(UUID vendorId, org.springframework.data.domain.PageRequest pageRequest) Finds orders by vendor ID with pagination support.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
-
findByUserId
Finds orders by user ID with pagination support.- Parameters:
userId
- the ID of the userpageRequest
- the pagination information- Returns:
- a list of orders associated with the specified user ID
-
findByVendorId
Finds orders by vendor ID with pagination support.- Parameters:
vendorId
- the UUID of the vendorpageRequest
- the pagination information- Returns:
- a list of orders associated with the specified vendor ID
-