Class HousesDTORepositoryMapImpl
java.lang.Object
info.ejava.assignments.api.houserenters.svc.houses.HousesDTORepositoryMapImpl
- All Implemented Interfaces:
HousesDTORepository
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlong
count()
void
void
deleteById
(String id) boolean
existsById
(String id) protected org.springframework.data.domain.Page
<HouseDTO> Return a page of matching houses.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.org.springframework.data.domain.Page
<HouseDTO> findAll
(org.springframework.data.domain.Pageable pageable) org.springframework.data.domain.Page
<HouseDTO> findByBedroomsBetween
(int minBedrooms, int maxBedrooms, org.springframework.data.domain.Pageable pageable) Return houses matching the bedroom count.org.springframework.data.domain.Page
<HouseDTO> findByDailyRateBetween
(BigDecimal minDailyRate, BigDecimal maxDailyRate, org.springframework.data.domain.Pageable pageable) Return houses matching the dailyRate.org.springframework.data.domain.Page
<HouseDTO> findByPeopleBetween
(int minPeople, int maxPeople, org.springframework.data.domain.Pageable pageable) Return houses matching the people count.
-
Field Details
-
ID
-
houses
-
-
Constructor Details
-
HousesDTORepositoryMapImpl
public HousesDTORepositoryMapImpl()
-
-
Method Details
-
save
- Specified by:
save
in interfaceHousesDTORepository
-
findById
- Specified by:
findById
in interfaceHousesDTORepository
-
existsById
- Specified by:
existsById
in interfaceHousesDTORepository
-
findAll
public org.springframework.data.domain.Page<HouseDTO> findAll(org.springframework.data.domain.Pageable pageable) - Specified by:
findAll
in interfaceHousesDTORepository
-
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 interfaceHousesDTORepository
- Parameters:
example
- containing prototype values to matchpageable
- 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 interfaceHousesDTORepository
- Parameters:
minPeople
- inclusivemaxPeople
- inclusivepageable
- 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 interfaceHousesDTORepository
- Parameters:
minBedrooms
- inclusivemaxBedrooms
- inclusivepageable
- 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 interfaceHousesDTORepository
- Parameters:
minDailyRate
- inclusivemaxDailyRate
- inclusivepageable
- 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 housepageable
- 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 interfaceHousesDTORepository
-
deleteById
- Specified by:
deleteById
in interfaceHousesDTORepository
-
deleteAll
public void deleteAll()- Specified by:
deleteAll
in interfaceHousesDTORepository
-