Interface OrderRepository

  • All Superinterfaces:
    org.springframework.data.repository.CrudRepository<Order,​Long>, org.springframework.data.jpa.repository.JpaRepository<Order,​Long>, org.springframework.data.repository.PagingAndSortingRepository<Order,​Long>, org.springframework.data.repository.query.QueryByExampleExecutor<Order>, org.springframework.data.repository.Repository<Order,​Long>

    public interface OrderRepository
    extends org.springframework.data.jpa.repository.JpaRepository<Order,​Long>
    The OrderRepository interface gives an Optional Order by when the order was placed.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      List<Order> getAllByBuyerOrderByPlacedDate​(Profile buyer)
      The getAllByBuyerOrderByPlaceDate query list orders placed by the buyer ordered by date.
      List<Order> getAllBySellerOrderByPlacedDate​(Profile seller)
      The getAllBySellerOrderByPlacedDate query lists orders sold by the user, ordered by the date placed.
      • Methods inherited from interface org.springframework.data.repository.CrudRepository

        count, delete, deleteAll, deleteAll, deleteById, existsById, findById, save
      • Methods inherited from interface org.springframework.data.jpa.repository.JpaRepository

        deleteAllInBatch, deleteInBatch, findAll, findAll, findAll, findAll, findAllById, flush, getOne, saveAll, saveAndFlush
      • Methods inherited from interface org.springframework.data.repository.PagingAndSortingRepository

        findAll
      • Methods inherited from interface org.springframework.data.repository.query.QueryByExampleExecutor

        count, exists, findAll, findOne
    • Method Detail

      • getAllByBuyerOrderByPlacedDate

        List<Order> getAllByBuyerOrderByPlacedDate​(Profile buyer)
        The getAllByBuyerOrderByPlaceDate query list orders placed by the buyer ordered by date.
        Parameters:
        buyer - The current Profile logged in.
        Returns:
        The List of Order objects the user placed.
      • getAllBySellerOrderByPlacedDate

        List<Order> getAllBySellerOrderByPlacedDate​(Profile seller)
        The getAllBySellerOrderByPlacedDate query lists orders sold by the user, ordered by the date placed.
        Parameters:
        seller - The current Profile logged in.
        Returns:
        The List of Order objects the user sold.