Class AbstractAnySearchDAO
java.lang.Object
org.apache.syncope.core.persistence.common.dao.AbstractSearchDAO
org.apache.syncope.core.persistence.common.dao.AbstractAnySearchDAO
- All Implemented Interfaces:
AnySearchDAO
- Direct Known Subclasses:
ElasticsearchAnySearchDAO,MySQLJPAAnySearchDAO,Neo4jAnySearchDAO,OpenSearchAnySearchDAO,OracleJPAAnySearchDAO,PGJPAAnySearchDAO
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.syncope.core.persistence.common.dao.AbstractSearchDAO
AbstractSearchDAO.CheckResult<C extends AttrCond> -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final AnyObjectDAOprotected final AnyUtilsFactoryprotected final DynRealmDAOprotected final GroupDAOprotected static final Loggerprotected final RealmSearchDAOprotected final UserDAOFields inherited from class org.apache.syncope.core.persistence.common.dao.AbstractSearchDAO
ALWAYS_FALSE_CLAUSE, entityFactory, LITERAL_COMPARATOR, plainSchemaDAO, validator -
Constructor Summary
ConstructorsConstructorDescriptionAbstractAnySearchDAO(RealmSearchDAO realmSearchDAO, DynRealmDAO dynRealmDAO, UserDAO userDAO, GroupDAO groupDAO, AnyObjectDAO anyObjectDAO, PlainSchemaDAO plainSchemaDAO, EntityFactory entityFactory, AnyUtilsFactory anyUtilsFactory, PlainAttrValidationManager validator) -
Method Summary
Modifier and TypeMethodDescriptionprotected static SearchCondbuildEffectiveCond(SearchCond cond, Set<String> dynRealmKeys, Set<String> groupOwners, AnyTypeKind kind) buildResult(List<Object> raw, AnyTypeKind kind) check(MemberCond cond) check(MembershipCond cond) check(RelationshipCond cond) longcount(Realm base, boolean recursive, Set<String> adminRealms, SearchCond cond, AnyTypeKind kind) protected abstract longdoCount(Realm base, boolean recursive, Set<String> adminRealms, SearchCond cond, AnyTypeKind kind) doSearch(Realm base, boolean recursive, Set<String> adminRealms, SearchCond searchCondition, org.springframework.data.domain.Pageable pageable, AnyTypeKind kind) findByDerAttrValue(String expression, String value, boolean ignoreCaseMatch, AnyTypeKind anyTypeKind) Find any objects by derived attribute value.protected booleanisPatternMatch(String clause) search(SearchCond cond, List<org.springframework.data.domain.Sort.Order> orderBy, AnyTypeKind kind) search(SearchCond cond, AnyTypeKind kind) search(Realm base, boolean recursive, Set<String> adminRealms, SearchCond cond, org.springframework.data.domain.Pageable pageable, AnyTypeKind kind) Methods inherited from class org.apache.syncope.core.persistence.common.dao.AbstractSearchDAO
buildDerAttrValueConditions, check, check, key, split, syncopeClientExceptionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.syncope.core.persistence.api.dao.AnySearchDAO
getAllMatchingCond
-
Field Details
-
LOG
-
RELATIONSHIP_FIELDS
-
realmSearchDAO
-
dynRealmDAO
-
userDAO
-
groupDAO
-
anyObjectDAO
-
anyUtilsFactory
-
-
Constructor Details
-
AbstractAnySearchDAO
public AbstractAnySearchDAO(RealmSearchDAO realmSearchDAO, DynRealmDAO dynRealmDAO, UserDAO userDAO, GroupDAO groupDAO, AnyObjectDAO anyObjectDAO, PlainSchemaDAO plainSchemaDAO, EntityFactory entityFactory, AnyUtilsFactory anyUtilsFactory, PlainAttrValidationManager validator)
-
-
Method Details
-
buildEffectiveCond
protected static SearchCond buildEffectiveCond(SearchCond cond, Set<String> dynRealmKeys, Set<String> groupOwners, AnyTypeKind kind) -
findByDerAttrValue
@Transactional(readOnly=true) public <A extends Any> List<A> findByDerAttrValue(String expression, String value, boolean ignoreCaseMatch, AnyTypeKind anyTypeKind) Description copied from interface:AnySearchDAOFind any objects by derived attribute value. This method could fail if one or more string literals contained into the derived attribute value provided derive from identifier (schema key) replacement. When you are going to specify a derived attribute expression you must be quite sure that string literals used to build the expression cannot be found into the attribute values used to replace attribute schema keys used as identifiers.- Specified by:
findByDerAttrValuein interfaceAnySearchDAO- Type Parameters:
A- any- Parameters:
expression- JEXL expressionvalue- derived attribute valueignoreCaseMatch- whether comparison for string values should take case into account or notanyTypeKind- any type kind- Returns:
- list of any objects
-
doCount
protected abstract long doCount(Realm base, boolean recursive, Set<String> adminRealms, SearchCond cond, AnyTypeKind kind) -
count
public long count(Realm base, boolean recursive, Set<String> adminRealms, SearchCond cond, AnyTypeKind kind) - Specified by:
countin interfaceAnySearchDAO- Parameters:
base- Realm to start searching fromrecursive- whether search should recursively include results from child RealmsadminRealms- realms for which the caller owns the proper entitlement(s)cond- the search conditionkind- any type kind- Returns:
- size of search result
-
search
- Specified by:
searchin interfaceAnySearchDAO- Type Parameters:
T- any- Parameters:
cond- the search conditionkind- any object- Returns:
- the list of any objects matching the given search condition
-
search
public <T extends Any> List<T> search(SearchCond cond, List<org.springframework.data.domain.Sort.Order> orderBy, AnyTypeKind kind) - Specified by:
searchin interfaceAnySearchDAO- Type Parameters:
T- any- Parameters:
cond- the search conditionorderBy- list of ordering clauseskind- any type kind- Returns:
- the list of any objects matching the given search condition
-
doSearch
protected abstract <T extends Any> List<T> doSearch(Realm base, boolean recursive, Set<String> adminRealms, SearchCond searchCondition, org.springframework.data.domain.Pageable pageable, AnyTypeKind kind) -
isPatternMatch
-
check
-
check
-
check
-
buildResult
-
search
public <T extends Any> List<T> search(Realm base, boolean recursive, Set<String> adminRealms, SearchCond cond, org.springframework.data.domain.Pageable pageable, AnyTypeKind kind) - Specified by:
searchin interfaceAnySearchDAO- Type Parameters:
T- any- Parameters:
base- Realm to start searching fromrecursive- whether search should recursively include results from child RealmsadminRealms- realms for which the caller owns the proper entitlement(s)cond- the search conditionpageable- paging informationkind- any type kind- Returns:
- the list of any objects matching the given search condition (in the given page)
-