Class UserRepositoryImpl
- java.lang.Object
-
- org.motechproject.mots.repository.custom.impl.BaseRepositoryImpl
-
- org.motechproject.mots.repository.custom.impl.UserRepositoryImpl
-
- All Implemented Interfaces:
UserRepositoryCustom
public class UserRepositoryImpl extends BaseRepositoryImpl implements UserRepositoryCustom
-
-
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 UserRepositoryImpl()
-
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<User>
search(java.lang.String username, java.lang.String email, java.lang.String name, java.lang.String role, org.springframework.data.domain.Pageable pageable)
FindsUser
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<User> search(java.lang.String username, java.lang.String email, java.lang.String name, java.lang.String role, org.springframework.data.domain.Pageable pageable)
FindsUser
s matching all of the provided parameters. If there are no parameters, return all Users.- Specified by:
search
in interfaceUserRepositoryCustom
- Parameters:
pageable
- pagination parameters (page size, page number, sort order)name
- name of a userusername
- username of a userrole
- name ofUserRole
email
- email of a user- Returns:
- page with found users
-
getPath
protected javax.persistence.criteria.Path getPath(javax.persistence.criteria.Root root, org.springframework.data.domain.Sort.Order order)
- Overrides:
getPath
in classBaseRepositoryImpl
-
-