Class BaseRepositoryImpl
- java.lang.Object
-
- org.motechproject.mots.repository.custom.impl.BaseRepositoryImpl
-
- Direct Known Subclasses:
CommunityHealthWorkerRepositoryImpl
,DistrictRepositoryImpl
,FacilityRepositoryImpl
,RoleRepositoryImpl
,SectorRepositoryImpl
,UserRepositoryImpl
,VillageRepositoryImpl
public abstract class BaseRepositoryImpl extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.String
CHW_ID
protected static java.lang.String
CHW_NAME
protected static java.lang.String
DISTRICT
protected static java.lang.String
EMAIL
protected javax.persistence.EntityManager
entityManager
protected static java.lang.String
FACILITY
protected static java.lang.String
GROUP
protected static java.lang.String
INCHARGE_EMAIL
protected static java.lang.String
INCHARGE_FULL_NAME
protected static java.lang.String
INCHARGE_PHONE
protected static java.lang.String
NAME
protected static java.lang.String
PHONE_NUMBER
protected static java.lang.String
ROLES
protected static java.lang.String
SECTOR
protected static java.lang.String
SELECTED
protected static java.lang.String
USERNAME
protected static java.lang.String
VILLAGE
-
Constructor Summary
Constructors Constructor Description BaseRepositoryImpl()
-
Method Summary
All Methods Static 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)
protected int
getFirstResult(org.springframework.data.domain.Pageable pageable, int pageSize)
protected int
getPageSize(org.springframework.data.domain.Pageable pageable)
protected javax.persistence.criteria.Path
getPath(javax.persistence.criteria.Root root, org.springframework.data.domain.Sort.Order order)
protected static <T> javax.persistence.criteria.Order
getSortDirection(javax.persistence.criteria.CriteriaBuilder builder, org.springframework.data.domain.Sort.Order order, javax.persistence.criteria.Path<T> path)
-
-
-
Field Detail
-
CHW_ID
protected static final java.lang.String CHW_ID
- See Also:
- Constant Field Values
-
INCHARGE_FULL_NAME
protected static final java.lang.String INCHARGE_FULL_NAME
- See Also:
- Constant Field Values
-
INCHARGE_PHONE
protected static final java.lang.String INCHARGE_PHONE
- See Also:
- Constant Field Values
-
INCHARGE_EMAIL
protected static final java.lang.String INCHARGE_EMAIL
- See Also:
- Constant Field Values
-
CHW_NAME
protected static final java.lang.String CHW_NAME
- See Also:
- Constant Field Values
-
PHONE_NUMBER
protected static final java.lang.String PHONE_NUMBER
- See Also:
- Constant Field Values
-
NAME
protected static final java.lang.String NAME
- See Also:
- Constant Field Values
-
FACILITY
protected static final java.lang.String FACILITY
- See Also:
- Constant Field Values
-
SECTOR
protected static final java.lang.String SECTOR
- See Also:
- Constant Field Values
-
DISTRICT
protected static final java.lang.String DISTRICT
- See Also:
- Constant Field Values
-
VILLAGE
protected static final java.lang.String VILLAGE
- See Also:
- Constant Field Values
-
EMAIL
protected static final java.lang.String EMAIL
- See Also:
- Constant Field Values
-
USERNAME
protected static final java.lang.String USERNAME
- See Also:
- Constant Field Values
-
ROLES
protected static final java.lang.String ROLES
- See Also:
- Constant Field Values
-
SELECTED
protected static final java.lang.String SELECTED
- See Also:
- Constant Field Values
-
GROUP
protected static final java.lang.String GROUP
- See Also:
- Constant Field Values
-
entityManager
protected javax.persistence.EntityManager entityManager
-
-
Method Detail
-
getFirstResult
protected int getFirstResult(org.springframework.data.domain.Pageable pageable, int pageSize)
-
getPageSize
protected int getPageSize(org.springframework.data.domain.Pageable pageable)
-
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)
-
getPath
protected javax.persistence.criteria.Path getPath(javax.persistence.criteria.Root root, org.springframework.data.domain.Sort.Order order)
-
getSortDirection
protected static <T> javax.persistence.criteria.Order getSortDirection(javax.persistence.criteria.CriteriaBuilder builder, org.springframework.data.domain.Sort.Order order, javax.persistence.criteria.Path<T> path)
-
-