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.StringCHW_IDprotected static java.lang.StringCHW_NAMEprotected static java.lang.StringDISTRICTprotected static java.lang.StringEMAILprotected javax.persistence.EntityManagerentityManagerprotected static java.lang.StringFACILITYprotected static java.lang.StringGROUPprotected static java.lang.StringINCHARGE_EMAILprotected static java.lang.StringINCHARGE_FULL_NAMEprotected static java.lang.StringINCHARGE_PHONEprotected static java.lang.StringNAMEprotected static java.lang.StringPHONE_NUMBERprotected static java.lang.StringROLESprotected static java.lang.StringSECTORprotected static java.lang.StringSELECTEDprotected static java.lang.StringUSERNAMEprotected static java.lang.StringVILLAGE
-
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 intgetFirstResult(org.springframework.data.domain.Pageable pageable, int pageSize)protected intgetPageSize(org.springframework.data.domain.Pageable pageable)protected javax.persistence.criteria.PathgetPath(javax.persistence.criteria.Root root, org.springframework.data.domain.Sort.Order order)protected static <T> javax.persistence.criteria.OrdergetSortDirection(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)
-
-