Class MariaDBJPAAnySearchDAO
java.lang.Object
org.apache.syncope.core.persistence.common.dao.AbstractAnySearchDAO
org.apache.syncope.core.persistence.jpa.dao.MariaDBJPAAnySearchDAO
- All Implemented Interfaces:
AnySearchDAO
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final EntityManager
protected final EntityManagerFactory
protected static final String
Fields inherited from class org.apache.syncope.core.persistence.common.dao.AbstractAnySearchDAO
ALWAYS_FALSE_CLAUSE, anyObjectDAO, anyUtilsFactory, dynRealmDAO, entityFactory, groupDAO, LOG, plainSchemaDAO, realmSearchDAO, RELATIONSHIP_FIELDS, userDAO, validator
-
Constructor Summary
ConstructorsConstructorDescriptionMariaDBJPAAnySearchDAO
(RealmSearchDAO realmSearchDAO, DynRealmDAO dynRealmDAO, UserDAO userDAO, GroupDAO groupDAO, AnyObjectDAO anyObjectDAO, PlainSchemaDAO schemaDAO, EntityFactory entityFactory, AnyUtilsFactory anyUtilsFactory, PlainAttrValidationManager validator, EntityManagerFactory entityManagerFactory, EntityManager entityManager) -
Method Summary
Modifier and TypeMethodDescriptionprotected String
anyId
(SearchSupport svs) protected AnySearchNode.Leaf
buildAdminRealmsFilter
(Set<String> realmKeys, SearchSupport svs, List<Object> parameters) protected String
buildCountQuery
(Pair<AnySearchNode, Set<String>> queryInfo, AnySearchNode.Leaf filterNode, List<Object> parameters, SearchSupport svs) protected String
buildFrom
(Set<SearchSupport.SearchView> from, Set<String> plainSchemas, OrderBySupport obs) protected String
buildSearchQuery
(Pair<AnySearchNode, Set<String>> queryInfo, AnySearchNode.Leaf filterNode, List<Object> parameters, SearchSupport svs, List<org.springframework.data.domain.Sort.Order> orderBy) protected String
buildWhere
(List<String> where, AnySearchNode root) protected SearchSupport.SearchView
defaultSV
(SearchSupport svs) protected long
doCount
(Realm base, boolean recursive, Set<String> adminRealms, SearchCond cond, AnyTypeKind kind) doSearch
(Realm base, boolean recursive, Set<String> adminRealms, SearchCond cond, org.springframework.data.domain.Pageable pageable, AnyTypeKind kind) protected AnySearchNode.Leaf
fillAttrQuery
(String column, SearchSupport.SearchView from, PlainAttrValue attrValue, PlainSchema schema, AttrCond cond, boolean not, List<Object> parameters) protected static void
fillWithParameters
(Query query, List<Object> parameters) getAdminRealmsFilter
(Realm base, boolean recursive, Set<String> adminRealms, List<Object> parameters, SearchSupport svs) protected AnySearchNode
getQuery
(AnyCond cond, boolean not, List<Object> parameters, SearchSupport svs) protected AnySearchNode
getQuery
(AnyTypeCond cond, boolean not, List<Object> parameters, SearchSupport svs) protected Pair
<Boolean, AnySearchNode> getQuery
(AttrCond cond, boolean not, Pair<PlainSchema, PlainAttrValue> checked, List<Object> parameters, SearchSupport svs) protected AnySearchNode
getQuery
(AuxClassCond cond, boolean not, List<Object> parameters, SearchSupport svs) protected AnySearchNode
getQuery
(DynRealmCond cond, boolean not, List<Object> parameters, SearchSupport svs) protected AnySearchNode
getQuery
(MemberCond cond, boolean not, List<Object> parameters, SearchSupport svs) protected AnySearchNode
getQuery
(MembershipCond cond, boolean not, List<Object> parameters, SearchSupport svs) protected AnySearchNode
getQuery
(RelationshipCond cond, boolean not, List<Object> parameters, SearchSupport svs) protected AnySearchNode
getQuery
(RelationshipTypeCond cond, boolean not, List<Object> parameters, SearchSupport svs) protected AnySearchNode
getQuery
(ResourceCond cond, boolean not, List<Object> parameters, SearchSupport svs) protected AnySearchNode
getQuery
(RoleCond cond, boolean not, List<Object> parameters, SearchSupport svs) protected Optional
<Pair<AnySearchNode, Set<String>>> getQuery
(SearchCond cond, List<Object> parameters, SearchSupport svs) protected Optional
<AnySearchNode> getQueryForCustomConds
(SearchCond cond, List<Object> parameters, SearchSupport svs, boolean not) protected boolean
isOracle()
protected OrderBySupport
parseOrderBy
(SearchSupport svs, List<org.springframework.data.domain.Sort.Order> orderBy) protected void
parseOrderByForCustom
(SearchSupport svs, org.springframework.data.domain.Sort.Order clause, OrderBySupport.Item item, OrderBySupport obs) protected void
parseOrderByForField
(SearchSupport svs, OrderBySupport.Item item, String fieldName, org.springframework.data.domain.Sort.Order clause) protected void
parseOrderByForPlainSchema
(SearchSupport svs, OrderBySupport obs, OrderBySupport.Item item, org.springframework.data.domain.Sort.Order clause, PlainSchema schema, String fieldName) protected static int
setParameter
(List<Object> parameters, Object parameter) protected static Supplier
<SyncopeClientException> syncopeClientException
(String message) protected void
visitNode
(AnySearchNode node, Map<SearchSupport.SearchView, Boolean> counters, Set<SearchSupport.SearchView> from, List<String> where, SearchSupport svs) Methods inherited from class org.apache.syncope.core.persistence.common.dao.AbstractAnySearchDAO
buildEffectiveCond, buildResult, check, check, check, check, check, count, isPatternMatch, key, search, search, search
-
Field Details
-
SELECT_COLS_FROM_VIEW
- See Also:
-
entityManagerFactory
-
entityManager
-
-
Constructor Details
-
MariaDBJPAAnySearchDAO
public MariaDBJPAAnySearchDAO(RealmSearchDAO realmSearchDAO, DynRealmDAO dynRealmDAO, UserDAO userDAO, GroupDAO groupDAO, AnyObjectDAO anyObjectDAO, PlainSchemaDAO schemaDAO, EntityFactory entityFactory, AnyUtilsFactory anyUtilsFactory, PlainAttrValidationManager validator, EntityManagerFactory entityManagerFactory, EntityManager entityManager)
-
-
Method Details
-
getQuery
protected Pair<Boolean,AnySearchNode> getQuery(AttrCond cond, boolean not, Pair<PlainSchema, PlainAttrValue> checked, List<Object> parameters, SearchSupport svs) -
setParameter
-
fillWithParameters
-
syncopeClientException
-
isOracle
protected boolean isOracle() -
defaultSV
-
anyId
-
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(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(AnyCond cond, boolean not, List<Object> parameters, SearchSupport svs) -
buildAdminRealmsFilter
protected AnySearchNode.Leaf buildAdminRealmsFilter(Set<String> realmKeys, SearchSupport svs, List<Object> parameters) -
getAdminRealmsFilter
-
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
-
buildCountQuery
protected String buildCountQuery(Pair<AnySearchNode, Set<String>> queryInfo, AnySearchNode.Leaf filterNode, List<Object> parameters, SearchSupport svs) -
doCount
protected long 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, org.springframework.data.domain.Sort.Order clause, PlainSchema schema, String fieldName) -
parseOrderByForField
protected void parseOrderByForField(SearchSupport svs, OrderBySupport.Item item, String fieldName, org.springframework.data.domain.Sort.Order clause) -
parseOrderByForCustom
protected void parseOrderByForCustom(SearchSupport svs, org.springframework.data.domain.Sort.Order clause, OrderBySupport.Item item, OrderBySupport obs) -
parseOrderBy
protected OrderBySupport parseOrderBy(SearchSupport svs, List<org.springframework.data.domain.Sort.Order> orderBy) -
buildSearchQuery
protected String buildSearchQuery(Pair<AnySearchNode, Set<String>> queryInfo, AnySearchNode.Leaf filterNode, List<Object> parameters, SearchSupport svs, List<org.springframework.data.domain.Sort.Order> orderBy) -
doSearch
protected <T extends Any> List<T> doSearch(Realm base, boolean recursive, Set<String> adminRealms, SearchCond cond, org.springframework.data.domain.Pageable pageable, AnyTypeKind kind) - Specified by:
doSearch
in classAbstractAnySearchDAO
-