Class SectorRepositoryImpl
- java.lang.Object
-
- org.motechproject.mots.repository.custom.impl.BaseRepositoryImpl
-
- org.motechproject.mots.repository.custom.impl.SectorRepositoryImpl
-
- All Implemented Interfaces:
SectorRepositoryCustom
public class SectorRepositoryImpl extends BaseRepositoryImpl implements SectorRepositoryCustom
-
-
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 SectorRepositoryImpl()
-
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<Sector>
search(java.lang.String sectorName, java.lang.String parentDistrict, org.springframework.data.domain.Pageable pageable)
FindsSector
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<Sector> search(java.lang.String sectorName, java.lang.String parentDistrict, org.springframework.data.domain.Pageable pageable)
FindsSector
s matching all of the provided parameters. If there are no parameters, return all Sectors.- Specified by:
search
in interfaceSectorRepositoryCustom
- Parameters:
pageable
- pagination parameters (page size, page number, sort order)sectorName
- name of sectorparentDistrict
- name ofDistrict
that may belong to a Sector- Returns:
- page with found sectors
-
getPath
protected javax.persistence.criteria.Path getPath(javax.persistence.criteria.Root root, org.springframework.data.domain.Sort.Order order)
- Overrides:
getPath
in classBaseRepositoryImpl
-
-