Class HousesDTORepositoryMapImpl

java.lang.Object
info.ejava.assignments.api.houserenters.svc.houses.HousesDTORepositoryMapImpl
All Implemented Interfaces:
HousesDTORepository

public class HousesDTORepositoryMapImpl extends Object implements HousesDTORepository
  • Field Details

  • Constructor Details

    • HousesDTORepositoryMapImpl

      public HousesDTORepositoryMapImpl()
  • Method Details

    • save

      public HouseDTO save(HouseDTO house)
      Specified by:
      save in interface HousesDTORepository
    • findById

      public Optional<HouseDTO> findById(String id)
      Specified by:
      findById in interface HousesDTORepository
    • existsById

      public boolean existsById(String id)
      Specified by:
      existsById in interface HousesDTORepository
    • findAll

      public org.springframework.data.domain.Page<HouseDTO> findAll(org.springframework.data.domain.Pageable pageable)
      Specified by:
      findAll in interface HousesDTORepository
    • findAll

      public org.springframework.data.domain.Page<HouseDTO> findAll(org.springframework.data.domain.Example<HouseDTO> example, org.springframework.data.domain.Pageable pageable)
      Returns houses that match the provided example prototype.
      Specified by:
      findAll in interface HousesDTORepository
      Parameters:
      example - containing prototype values to match
      pageable - containing offset and limit unless unpaged
      Returns:
      page of matching houses ordered by ID
    • findByPeopleBetween

      public org.springframework.data.domain.Page<HouseDTO> findByPeopleBetween(int minPeople, int maxPeople, org.springframework.data.domain.Pageable pageable)
      Return houses matching the people count.
      Specified by:
      findByPeopleBetween in interface HousesDTORepository
      Parameters:
      minPeople - inclusive
      maxPeople - inclusive
      pageable - with offset and limit unless unpaged
      Returns:
      page of matching houses ordered by ID
    • findByBedroomsBetween

      public org.springframework.data.domain.Page<HouseDTO> findByBedroomsBetween(int minBedrooms, int maxBedrooms, org.springframework.data.domain.Pageable pageable)
      Return houses matching the bedroom count.
      Specified by:
      findByBedroomsBetween in interface HousesDTORepository
      Parameters:
      minBedrooms - inclusive
      maxBedrooms - inclusive
      pageable - with offset and limit unless unpaged
      Returns:
      page of matching houses ordered by ID
    • findByDailyRateBetween

      public org.springframework.data.domain.Page<HouseDTO> findByDailyRateBetween(BigDecimal minDailyRate, BigDecimal maxDailyRate, org.springframework.data.domain.Pageable pageable)
      Return houses matching the dailyRate.
      Specified by:
      findByDailyRateBetween in interface HousesDTORepository
      Parameters:
      minDailyRate - inclusive
      maxDailyRate - inclusive
      pageable - with offset and limit unless unpaged
      Returns:
      page of matching houses ordered by ID
    • find

      protected org.springframework.data.domain.Page<HouseDTO> find(Predicate<HouseDTO> predicate, org.springframework.data.domain.Pageable pageable)
      Return a page of matching houses.
      Parameters:
      predicate - decision whether to include or exclude the candidate house
      pageable - with offset and limit unless unpaged. Client-provided sort is not supported.
      Returns:
      page of matching houses ordered by ID
    • count

      public long count()
      Specified by:
      count in interface HousesDTORepository
    • deleteById

      public void deleteById(String id)
      Specified by:
      deleteById in interface HousesDTORepository
    • deleteAll

      public void deleteAll()
      Specified by:
      deleteAll in interface HousesDTORepository