Package org.openiam.esb.repository.impl
Class AbstractKeyEntityRepositoryImpl<T extends KeyEntity,S extends AbstractSearchBean>
- java.lang.Object
-
- org.openiam.esb.repository.impl.AbstractKeyEntityRepositoryImpl<T,S>
-
- Type Parameters:
T
- entity class extendedBaseIdentity
S
- search bean class extendedSearchBean
- All Implemented Interfaces:
FindBeansRepositoryCustom<T,S>
- Direct Known Subclasses:
AbstractKeyNameEntityRepositoryImpl
,AdaptiveRiskRepositoryImpl
,AddressRepositoryImpl
,ApproverAssociationRepositoryImpl
,BatchTaskScheduleRepositoryImpl
,EmailAddressRepositoryImpl
,IdentityQuestionRepositoryImpl
,IdentityRepositoryImpl
,LanguageMappingRepositoryImpl
,LanguageRepositoryImpl
,LocationRepositoryImpl
,LoginAttributeRepositoryImpl
,LoginRepositoryImpl
,MetadataTemplateTypeRepositoryImpl
,OAuthTokenRepositoryImpl
,PasswordDictionaryRepositoryImpl
,PhoneRepositoryImpl
,PropertyValueRepositoryImpl
,ResourceTypeRepositoryImpl
,SourceAdapterConfigServiceImpl
,URIPatternRepositoryImpl
,UserIdentityAnswerRepositoryImpl
,UserRepositoryImpl
public abstract class AbstractKeyEntityRepositoryImpl<T extends KeyEntity,S extends AbstractSearchBean> extends Object implements FindBeansRepositoryCustom<T,S>
Generic abstract repository for entities.
-
-
Field Summary
Fields Modifier and Type Field Description protected org.apache.commons.logging.Log
LOG
-
Constructor Summary
Constructors Constructor Description AbstractKeyEntityRepositoryImpl()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected org.springframework.data.jpa.domain.Specification<T>
between(String propertyName, Date from, Date to)
protected org.springframework.data.jpa.domain.Specification<T>
between(Function<javax.persistence.criteria.Root<T>,javax.persistence.criteria.Path<Date>> rootQualifier, Date from, Date to)
protected org.springframework.data.jpa.domain.Specification<T>
booleanEquals(String propertyName, Boolean value)
protected org.springframework.data.jpa.domain.Specification<T>
booleanEquals(Function<javax.persistence.criteria.Root<T>,javax.persistence.criteria.Path<Boolean>> path, Boolean value)
protected javax.persistence.criteria.Predicate
booleanEquals(javax.persistence.criteria.Path<Boolean> path, Boolean value, javax.persistence.criteria.Root<T> root, javax.persistence.criteria.CriteriaQuery<?> query, javax.persistence.criteria.CriteriaBuilder cb)
protected javax.persistence.criteria.Predicate
buildPredicate(javax.persistence.criteria.Path<String> path, SearchParam param, javax.persistence.criteria.Root<T> root, javax.persistence.criteria.CriteriaQuery<?> query, javax.persistence.criteria.CriteriaBuilder cb, boolean caseSensitive)
protected org.springframework.data.jpa.domain.Specification<T>
buildSpecification(String propertyName, DateSearchParam param)
protected org.springframework.data.jpa.domain.Specification<T>
buildSpecification(String propertyName, SearchParam param)
protected org.springframework.data.jpa.domain.Specification<T>
buildSpecification(String propertyName, SearchParam param, boolean caseSensitive)
protected org.springframework.data.jpa.domain.Specification<T>
buildSpecifications(S searchBean)
int
count(S sb)
counts the entities based on the searchBeanprotected javax.persistence.criteria.Predicate
dateBetween(javax.persistence.criteria.Path<Date> path, Date from, Date to, javax.persistence.criteria.CriteriaBuilder cb)
void
evict()
void
evict(String key)
void
evict(T entity)
List<T>
find(S sb)
use find(S searchBean, Pageable pageable)org.springframework.data.domain.Page<T>
find(S sb, org.springframework.data.domain.Pageable pageable)
org.springframework.data.domain.Page<T>
findByIdIn(Collection<String> ids, org.springframework.data.domain.Pageable page)
protected org.springframework.data.jpa.domain.Specification<T>
ge(String propertyName, Date value)
protected abstract Class<T>
getEntityClass()
protected String
getPKfieldName()
protected abstract AbstractKeyEntityRepository<T,String>
getRepository()
protected org.springframework.data.domain.Sort
getSort(S searchBean)
protected <T extends Comparable>
javax.persistence.criteria.PredicategreaterThan(javax.persistence.criteria.Path<T> path, T value, javax.persistence.criteria.CriteriaBuilder cb)
protected <T extends Comparable>
javax.persistence.criteria.PredicategreaterThanOrEquals(javax.persistence.criteria.Path<T> path, T value, javax.persistence.criteria.CriteriaBuilder cb)
protected org.springframework.data.jpa.domain.Specification<T>
gt(String propertyName, Date value)
protected org.springframework.data.jpa.domain.Specification<T>
idSpecification(Collection<String> ids)
protected org.springframework.data.jpa.domain.Specification<T>
idSpecification(S searchBean)
protected org.springframework.data.jpa.domain.Specification<T>
in(String fieldName, Collection<?> values)
protected org.springframework.data.jpa.domain.Specification<T>
in(Function<javax.persistence.criteria.Root<T>,javax.persistence.criteria.Path<String>> rootQualifier, Collection<?> values)
protected boolean
isCaseInSensitiveDatabase()
protected org.springframework.data.jpa.domain.Specification<T>
isEmpty(String propertyName)
protected org.springframework.data.jpa.domain.Specification<T>
isNotEmpty(String propertyName)
protected org.springframework.data.jpa.domain.Specification<T>
isNull(String propertyName)
protected boolean
isOracle()
boolean
isValidSearchBean(S sb)
protected org.springframework.data.jpa.domain.Specification<T>
le(String propertyName, Date value)
protected <T extends Comparable>
javax.persistence.criteria.PredicatelessThan(javax.persistence.criteria.Path<T> path, T value, javax.persistence.criteria.CriteriaBuilder cb)
protected <T extends Comparable>
javax.persistence.criteria.PredicatelessThanOrEquals(javax.persistence.criteria.Path<T> path, T value, javax.persistence.criteria.CriteriaBuilder cb)
protected org.springframework.data.jpa.domain.Specification<T>
lt(String propertyName, Date value)
protected org.springframework.data.jpa.domain.Specification<T>
notIn(Function<javax.persistence.criteria.Root<T>,javax.persistence.criteria.Path<String>> rootQualifier, Collection<?> values)
protected <T extends Comparable>
javax.persistence.criteria.PredicateobjectBetween(javax.persistence.criteria.Path<T> path, T from, T to, javax.persistence.criteria.CriteriaBuilder cb)
protected org.springframework.data.jpa.domain.Specification<T>
objectEquals(String propertyName, Object value)
protected javax.persistence.criteria.Predicate
objectEquals(javax.persistence.criteria.Path<String> path, Object value, javax.persistence.criteria.CriteriaBuilder cb)
protected org.springframework.data.jpa.domain.Specification<T>
stringEquals(String propertyName, String value)
protected org.springframework.data.jpa.domain.Specification<T>
stringEquals(Function<javax.persistence.criteria.Root<T>,javax.persistence.criteria.Path<String>> rootQualifier, String value)
protected javax.persistence.criteria.Predicate
stringEquals(javax.persistence.criteria.Path<String> path, String value, javax.persistence.criteria.Root<T> root, javax.persistence.criteria.CriteriaQuery<?> query, javax.persistence.criteria.CriteriaBuilder cb)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.openiam.esb.repository.custom.FindBeansRepositoryCustom
find, getByExample, getByExample
-
-
-
-
Method Detail
-
findByIdIn
public org.springframework.data.domain.Page<T> findByIdIn(Collection<String> ids, org.springframework.data.domain.Pageable page)
-
buildSpecifications
protected org.springframework.data.jpa.domain.Specification<T> buildSpecifications(S searchBean)
-
idSpecification
protected org.springframework.data.jpa.domain.Specification<T> idSpecification(S searchBean)
-
idSpecification
protected org.springframework.data.jpa.domain.Specification<T> idSpecification(Collection<String> ids)
-
isCaseInSensitiveDatabase
protected final boolean isCaseInSensitiveDatabase()
-
isOracle
protected final boolean isOracle()
-
buildSpecification
protected org.springframework.data.jpa.domain.Specification<T> buildSpecification(String propertyName, SearchParam param, boolean caseSensitive)
-
buildSpecification
protected org.springframework.data.jpa.domain.Specification<T> buildSpecification(String propertyName, SearchParam param)
-
buildSpecification
protected final org.springframework.data.jpa.domain.Specification<T> buildSpecification(String propertyName, DateSearchParam param)
-
buildPredicate
protected final javax.persistence.criteria.Predicate buildPredicate(javax.persistence.criteria.Path<String> path, SearchParam param, javax.persistence.criteria.Root<T> root, javax.persistence.criteria.CriteriaQuery<?> query, javax.persistence.criteria.CriteriaBuilder cb, boolean caseSensitive)
-
stringEquals
protected org.springframework.data.jpa.domain.Specification<T> stringEquals(Function<javax.persistence.criteria.Root<T>,javax.persistence.criteria.Path<String>> rootQualifier, String value)
-
in
protected org.springframework.data.jpa.domain.Specification<T> in(Function<javax.persistence.criteria.Root<T>,javax.persistence.criteria.Path<String>> rootQualifier, Collection<?> values)
-
in
protected org.springframework.data.jpa.domain.Specification<T> in(String fieldName, Collection<?> values)
-
booleanEquals
protected org.springframework.data.jpa.domain.Specification<T> booleanEquals(Function<javax.persistence.criteria.Root<T>,javax.persistence.criteria.Path<Boolean>> path, Boolean value)
-
notIn
protected org.springframework.data.jpa.domain.Specification<T> notIn(Function<javax.persistence.criteria.Root<T>,javax.persistence.criteria.Path<String>> rootQualifier, Collection<?> values)
-
objectEquals
protected org.springframework.data.jpa.domain.Specification<T> objectEquals(String propertyName, Object value)
-
stringEquals
protected org.springframework.data.jpa.domain.Specification<T> stringEquals(String propertyName, String value)
-
isEmpty
protected org.springframework.data.jpa.domain.Specification<T> isEmpty(String propertyName)
-
isNotEmpty
protected org.springframework.data.jpa.domain.Specification<T> isNotEmpty(String propertyName)
-
booleanEquals
protected org.springframework.data.jpa.domain.Specification<T> booleanEquals(String propertyName, Boolean value)
-
stringEquals
protected javax.persistence.criteria.Predicate stringEquals(javax.persistence.criteria.Path<String> path, String value, javax.persistence.criteria.Root<T> root, javax.persistence.criteria.CriteriaQuery<?> query, javax.persistence.criteria.CriteriaBuilder cb)
-
booleanEquals
protected javax.persistence.criteria.Predicate booleanEquals(javax.persistence.criteria.Path<Boolean> path, Boolean value, javax.persistence.criteria.Root<T> root, javax.persistence.criteria.CriteriaQuery<?> query, javax.persistence.criteria.CriteriaBuilder cb)
-
objectEquals
protected javax.persistence.criteria.Predicate objectEquals(javax.persistence.criteria.Path<String> path, Object value, javax.persistence.criteria.CriteriaBuilder cb)
-
getPKfieldName
protected String getPKfieldName()
-
between
protected org.springframework.data.jpa.domain.Specification<T> between(String propertyName, Date from, Date to)
-
between
protected org.springframework.data.jpa.domain.Specification<T> between(Function<javax.persistence.criteria.Root<T>,javax.persistence.criteria.Path<Date>> rootQualifier, Date from, Date to)
-
gt
protected org.springframework.data.jpa.domain.Specification<T> gt(String propertyName, Date value)
-
ge
protected org.springframework.data.jpa.domain.Specification<T> ge(String propertyName, Date value)
-
lt
protected org.springframework.data.jpa.domain.Specification<T> lt(String propertyName, Date value)
-
le
protected org.springframework.data.jpa.domain.Specification<T> le(String propertyName, Date value)
-
objectBetween
protected <T extends Comparable> javax.persistence.criteria.Predicate objectBetween(javax.persistence.criteria.Path<T> path, T from, T to, javax.persistence.criteria.CriteriaBuilder cb)
-
greaterThan
protected <T extends Comparable> javax.persistence.criteria.Predicate greaterThan(javax.persistence.criteria.Path<T> path, T value, javax.persistence.criteria.CriteriaBuilder cb)
-
greaterThanOrEquals
protected <T extends Comparable> javax.persistence.criteria.Predicate greaterThanOrEquals(javax.persistence.criteria.Path<T> path, T value, javax.persistence.criteria.CriteriaBuilder cb)
-
lessThan
protected <T extends Comparable> javax.persistence.criteria.Predicate lessThan(javax.persistence.criteria.Path<T> path, T value, javax.persistence.criteria.CriteriaBuilder cb)
-
lessThanOrEquals
protected <T extends Comparable> javax.persistence.criteria.Predicate lessThanOrEquals(javax.persistence.criteria.Path<T> path, T value, javax.persistence.criteria.CriteriaBuilder cb)
-
dateBetween
protected javax.persistence.criteria.Predicate dateBetween(javax.persistence.criteria.Path<Date> path, Date from, Date to, javax.persistence.criteria.CriteriaBuilder cb)
-
getRepository
protected abstract AbstractKeyEntityRepository<T,String> getRepository()
-
find
public List<T> find(S sb)
Description copied from interface:FindBeansRepositoryCustom
use find(S searchBean, Pageable pageable)- Specified by:
find
in interfaceFindBeansRepositoryCustom<T extends KeyEntity,S extends AbstractSearchBean>
- Returns:
-
isValidSearchBean
public boolean isValidSearchBean(S sb)
- Specified by:
isValidSearchBean
in interfaceFindBeansRepositoryCustom<T extends KeyEntity,S extends AbstractSearchBean>
-
find
public org.springframework.data.domain.Page<T> find(S sb, org.springframework.data.domain.Pageable pageable)
- Specified by:
find
in interfaceFindBeansRepositoryCustom<T extends KeyEntity,S extends AbstractSearchBean>
-
count
public int count(S sb)
Description copied from interface:FindBeansRepositoryCustom
counts the entities based on the searchBean- Specified by:
count
in interfaceFindBeansRepositoryCustom<T extends KeyEntity,S extends AbstractSearchBean>
- Returns:
-
evict
public void evict()
-
evict
public void evict(T entity)
-
evict
public void evict(String key)
-
getSort
protected org.springframework.data.domain.Sort getSort(S searchBean)
-
-