Class VillageRepositoryImpl
- java.lang.Object
-
- org.motechproject.mots.repository.custom.impl.BaseRepositoryImpl
-
- org.motechproject.mots.repository.custom.impl.VillageRepositoryImpl
-
- All Implemented Interfaces:
VillageRepositoryCustom
public class VillageRepositoryImpl extends BaseRepositoryImpl implements VillageRepositoryCustom
-
-
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 VillageRepositoryImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected javax.persistence.criteria.Path
getPath(javax.persistence.criteria.Root root, org.springframework.data.domain.Sort.Order order)
org.springframework.data.domain.Page<Village>
search(java.lang.String villageName, java.lang.String parentFacility, java.lang.String sectorName, java.lang.String districtName, org.springframework.data.domain.Pageable pageable)
FindsVillage
s matching all of the provided parameters.-
Methods inherited from class org.motechproject.mots.repository.custom.impl.BaseRepositoryImpl
addSortProperties, getFirstResult, getPageSize, getSortDirection
-
-
-
-
Method Detail
-
search
public org.springframework.data.domain.Page<Village> search(java.lang.String villageName, java.lang.String parentFacility, java.lang.String sectorName, java.lang.String districtName, org.springframework.data.domain.Pageable pageable)
FindsVillage
s matching all of the provided parameters. If there are no parameters, return all Villages.- Specified by:
search
in interfaceVillageRepositoryCustom
- Parameters:
pageable
- pagination parameters (page size, page number, sort order)sectorName
- name ofSector
that may belong to villagedistrictName
- name ofDistrict
that may belong to villagevillageName
- name of villageparentFacility
- name ofFacility
that may belong to village- Returns:
- page with found villages
-
getPath
protected javax.persistence.criteria.Path getPath(javax.persistence.criteria.Root root, org.springframework.data.domain.Sort.Order order)
- Overrides:
getPath
in classBaseRepositoryImpl
-
-