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 extendedBaseIdentityS- 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.LogLOG
-
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.PredicatebooleanEquals(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.PredicatebuildPredicate(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)intcount(S sb)counts the entities based on the searchBeanprotected javax.persistence.criteria.PredicatedateBetween(javax.persistence.criteria.Path<Date> path, Date from, Date to, javax.persistence.criteria.CriteriaBuilder cb)voidevict()voidevict(String key)voidevict(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 StringgetPKfieldName()protected abstract AbstractKeyEntityRepository<T,String>getRepository()protected org.springframework.data.domain.SortgetSort(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 booleanisCaseInSensitiveDatabase()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 booleanisOracle()booleanisValidSearchBean(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.PredicateobjectEquals(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.PredicatestringEquals(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:FindBeansRepositoryCustomuse find(S searchBean, Pageable pageable)- Specified by:
findin interfaceFindBeansRepositoryCustom<T extends KeyEntity,S extends AbstractSearchBean>- Returns:
-
isValidSearchBean
public boolean isValidSearchBean(S sb)
- Specified by:
isValidSearchBeanin 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:
findin interfaceFindBeansRepositoryCustom<T extends KeyEntity,S extends AbstractSearchBean>
-
count
public int count(S sb)
Description copied from interface:FindBeansRepositoryCustomcounts the entities based on the searchBean- Specified by:
countin 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)
-
-