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 TypeMethodDescriptionlongcount()voidvoiddeleteById(String id) booleanexistsById(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:
savein interfaceHousesDTORepository
-
findById
- Specified by:
findByIdin interfaceHousesDTORepository
-
existsById
- Specified by:
existsByIdin interfaceHousesDTORepository
-
findAll
public org.springframework.data.domain.Page<HouseDTO> findAll(org.springframework.data.domain.Pageable pageable) - Specified by:
findAllin 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:
findAllin 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:
findByPeopleBetweenin 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:
findByBedroomsBetweenin 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:
findByDailyRateBetweenin 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:
countin interfaceHousesDTORepository
-
deleteById
- Specified by:
deleteByIdin interfaceHousesDTORepository
-
deleteAll
public void deleteAll()- Specified by:
deleteAllin interfaceHousesDTORepository
-