Class FacilityRepositoryImpl
- java.lang.Object
-
- org.motechproject.mots.repository.custom.impl.BaseRepositoryImpl
-
- org.motechproject.mots.repository.custom.impl.FacilityRepositoryImpl
-
- All Implemented Interfaces:
FacilityRepositoryCustom
public class FacilityRepositoryImpl extends BaseRepositoryImpl implements FacilityRepositoryCustom
-
-
Field Summary
-
Fields inherited from class org.motechproject.mots.repository.custom.impl.BaseRepositoryImpl
CHW_ID, CHW_NAME, DISTRICT, EMAIL, entityManager, FACILITY, GROUP, INCHARGE_EMAIL, INCHARGE_FULL_NAME, INCHARGE_PHONE, NAME, PHONE_NUMBER, ROLES, SECTOR, SELECTED, USERNAME, VILLAGE
-
-
Constructor Summary
Constructors Constructor Description FacilityRepositoryImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected <T> javax.persistence.criteria.CriteriaQuery<T>
addSortProperties(javax.persistence.criteria.CriteriaQuery<T> query, javax.persistence.criteria.Root root, org.springframework.data.domain.Pageable pageable)
org.springframework.data.domain.Page<Facility>
search(java.lang.String facilityName, java.lang.String inchargeFullName, java.lang.String inchargePhone, java.lang.String inchargeEmail, java.lang.String parentSector, java.lang.String districtName, org.springframework.data.domain.Pageable pageable)
FindsFacility
es matching all of the provided parameters.-
Methods inherited from class org.motechproject.mots.repository.custom.impl.BaseRepositoryImpl
getFirstResult, getPageSize, getPath, getSortDirection
-
-
-
-
Method Detail
-
search
public org.springframework.data.domain.Page<Facility> search(java.lang.String facilityName, java.lang.String inchargeFullName, java.lang.String inchargePhone, java.lang.String inchargeEmail, java.lang.String parentSector, java.lang.String districtName, org.springframework.data.domain.Pageable pageable)
FindsFacility
es matching all of the provided parameters. If there are no parameters, return all Facilities.- Specified by:
search
in interfaceFacilityRepositoryCustom
- Parameters:
pageable
- pagination parameters (page size, page number, sort order)districtName
- name ofDistrict
that may belong to facilityfacilityName
- name of facilityparentSector
- name ofSector
that may belong to facilityinchargePhone
- phone of a person in chargeinchargeFullName
- full name of a person in chargeinchargeEmail
- email of a person in charge- Returns:
- page with found Facilities
-
addSortProperties
protected <T> javax.persistence.criteria.CriteriaQuery<T> addSortProperties(javax.persistence.criteria.CriteriaQuery<T> query, javax.persistence.criteria.Root root, org.springframework.data.domain.Pageable pageable)
- Overrides:
addSortProperties
in classBaseRepositoryImpl
-
-