Class JPAAnySearchDAO
- java.lang.Object
-
- org.apache.syncope.core.persistence.jpa.dao.AbstractDAO<Any<?>>
-
- org.apache.syncope.core.persistence.jpa.dao.AbstractAnySearchDAO
-
- org.apache.syncope.core.persistence.jpa.dao.JPAAnySearchDAO
-
- All Implemented Interfaces:
AnySearchDAO
,DAO<Any<?>>
- Direct Known Subclasses:
MaJPAJSONAnySearchDAO
,MyJPAJSONAnySearchDAO
,OJPAJSONAnySearchDAO
,PGJPAJSONAnySearchDAO
public class JPAAnySearchDAO extends AbstractAnySearchDAO
Search engine implementation for users, groups and any objects, based on self-updating SQL views.
-
-
Field Summary
Fields Modifier and Type Field Description protected static String
ALWAYS_FALSE_CLAUSE
protected static String
SELECT_COLS_FROM_VIEW
-
Fields inherited from class org.apache.syncope.core.persistence.jpa.dao.AbstractAnySearchDAO
anyObjectDAO, anyUtilsFactory, dynRealmDAO, entityFactory, groupDAO, plainSchemaDAO, realmDAO, RELATIONSHIP_FIELDS, userDAO, validator
-
Fields inherited from class org.apache.syncope.core.persistence.jpa.dao.AbstractDAO
LOG
-
-
Constructor Summary
Constructors Constructor Description JPAAnySearchDAO(RealmDAO realmDAO, DynRealmDAO dynRealmDAO, UserDAO userDAO, GroupDAO groupDAO, AnyObjectDAO anyObjectDAO, PlainSchemaDAO plainSchemaDAO, EntityFactory entityFactory, AnyUtilsFactory anyUtilsFactory, PlainAttrValidationManager validator)
-
Method Summary
-
Methods inherited from class org.apache.syncope.core.persistence.jpa.dao.AbstractAnySearchDAO
buildEffectiveCond, buildResult, check, check, check, check, check, count, search, search, search
-
Methods inherited from class org.apache.syncope.core.persistence.jpa.dao.AbstractDAO
detach, entityManager, entityManagerFactory, isOracle, refresh
-
-
-
-
Field Detail
-
SELECT_COLS_FROM_VIEW
protected static final String SELECT_COLS_FROM_VIEW
- See Also:
- Constant Field Values
-
ALWAYS_FALSE_CLAUSE
protected static final String ALWAYS_FALSE_CLAUSE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
JPAAnySearchDAO
public JPAAnySearchDAO(RealmDAO realmDAO, DynRealmDAO dynRealmDAO, UserDAO userDAO, GroupDAO groupDAO, AnyObjectDAO anyObjectDAO, PlainSchemaDAO plainSchemaDAO, EntityFactory entityFactory, AnyUtilsFactory anyUtilsFactory, PlainAttrValidationManager validator)
-
-
Method Detail
-
fillWithParameters
protected static void fillWithParameters(javax.persistence.Query query, List<Object> parameters)
-
key
protected static String key(AttrSchemaType schemaType)
-
syncopeClientException
protected static Supplier<SyncopeClientException> syncopeClientException(String message)
-
defaultSV
protected SearchSupport.SearchView defaultSV(SearchSupport svs)
-
anyId
protected String anyId(SearchSupport svs)
-
getQueryForCustomConds
protected Optional<AnySearchNode> getQueryForCustomConds(SearchCond cond, List<Object> parameters, SearchSupport svs, boolean not)
-
getQuery
protected Optional<Pair<AnySearchNode,Set<String>>> getQuery(SearchCond cond, List<Object> parameters, SearchSupport svs)
-
getQuery
protected AnySearchNode getQuery(AnyTypeCond cond, boolean not, List<Object> parameters, SearchSupport svs)
-
getQuery
protected AnySearchNode getQuery(AuxClassCond cond, boolean not, List<Object> parameters, SearchSupport svs)
-
getQuery
protected AnySearchNode getQuery(RelationshipTypeCond cond, boolean not, List<Object> parameters, SearchSupport svs)
-
getQuery
protected AnySearchNode getQuery(RelationshipCond cond, boolean not, List<Object> parameters, SearchSupport svs)
-
getQuery
protected AnySearchNode getQuery(MembershipCond cond, boolean not, List<Object> parameters, SearchSupport svs)
-
getQuery
protected AnySearchNode getQuery(RoleCond cond, boolean not, List<Object> parameters, SearchSupport svs)
-
getQuery
protected AnySearchNode getQuery(PrivilegeCond cond, boolean not, List<Object> parameters, SearchSupport svs)
-
getQuery
protected AnySearchNode getQuery(DynRealmCond cond, boolean not, List<Object> parameters, SearchSupport svs)
-
getQuery
protected AnySearchNode getQuery(ResourceCond cond, boolean not, List<Object> parameters, SearchSupport svs)
-
getQuery
protected AnySearchNode getQuery(MemberCond cond, boolean not, List<Object> parameters, SearchSupport svs)
-
fillAttrQuery
protected AnySearchNode.Leaf fillAttrQuery(String column, SearchSupport.SearchView from, PlainAttrValue attrValue, PlainSchema schema, AttrCond cond, boolean not, List<Object> parameters)
-
getQuery
protected AnySearchNode getQuery(AttrCond cond, boolean not, Pair<PlainSchema,PlainAttrValue> checked, List<Object> parameters, SearchSupport svs)
-
getQuery
protected AnySearchNode getQuery(AnyCond cond, boolean not, List<Object> parameters, SearchSupport svs)
-
buildAdminRealmsFilter
protected AnySearchNode.Leaf buildAdminRealmsFilter(Set<String> realmKeys, SearchSupport svs, List<Object> parameters)
-
getAdminRealmsFilter
protected Triple<AnySearchNode.Leaf,Set<String>,Set<String>> getAdminRealmsFilter(Realm base, boolean recursive, Set<String> adminRealms, List<Object> parameters, SearchSupport svs)
-
visitNode
protected void visitNode(AnySearchNode node, Map<SearchSupport.SearchView,Boolean> counters, Set<SearchSupport.SearchView> from, List<String> where, SearchSupport svs)
-
buildFrom
protected String buildFrom(Set<SearchSupport.SearchView> from, Set<String> plainSchemas, OrderBySupport obs)
-
buildWhere
protected String buildWhere(List<String> where, AnySearchNode root)
-
buildCountQuery
protected String buildCountQuery(Pair<AnySearchNode,Set<String>> queryInfo, AnySearchNode.Leaf filterNode, List<Object> parameters, SearchSupport svs)
-
doCount
protected int doCount(Realm base, boolean recursive, Set<String> adminRealms, SearchCond cond, AnyTypeKind kind)
- Specified by:
doCount
in classAbstractAnySearchDAO
-
parseOrderByForPlainSchema
protected void parseOrderByForPlainSchema(SearchSupport svs, OrderBySupport obs, OrderBySupport.Item item, OrderByClause clause, PlainSchema schema, String fieldName)
-
parseOrderByForField
protected void parseOrderByForField(SearchSupport svs, OrderBySupport.Item item, String fieldName, OrderByClause clause)
-
parseOrderByForCustom
protected void parseOrderByForCustom(SearchSupport svs, OrderByClause clause, OrderBySupport.Item item, OrderBySupport obs)
-
parseOrderBy
protected OrderBySupport parseOrderBy(SearchSupport svs, List<OrderByClause> orderBy)
-
buildSearchQuery
protected String buildSearchQuery(Pair<AnySearchNode,Set<String>> queryInfo, AnySearchNode.Leaf filterNode, List<Object> parameters, SearchSupport svs, List<OrderByClause> orderBy)
-
doSearch
protected <T extends Any<?>> List<T> doSearch(Realm base, boolean recursive, Set<String> adminRealms, SearchCond cond, int page, int itemsPerPage, List<OrderByClause> orderBy, AnyTypeKind kind)
- Specified by:
doSearch
in classAbstractAnySearchDAO
-
-