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
Modifier and TypeFieldDescriptionprotected final EntityManager
protected final EntityManagerFactory
protected static final String
Fields inherited from class org.apache.syncope.core.persistence.common.dao.AbstractAnySearchDAO
anyObjectDAO, anyUtilsFactory, dynRealmDAO, entityFactory, groupDAO, LOG, plainSchemaDAO, realmSearchDAO, RELATIONSHIP_FIELDS, userDAO, validator
-
Constructor Summary
ConstructorDescriptionMariaDBJPAAnySearchDAO
(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
buildAdminRealmsFilter
(Set<String> realmKeys, SearchSupport svs, List<Object> parameters) protected StringBuilder
protected StringBuilder
protected StringBuilder
buildWhere
(SearchSupport svs, OrderBySupport obs) 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 void
fillAttrQuery
(StringBuilder query, PlainAttrValue attrValue, PlainSchema schema, AttrCond cond, boolean not, List<Object> parameters, SearchSupport svs) protected static void
fillWithParameters
(Query query, List<Object> parameters) getAdminRealmsFilter
(Realm base, boolean recursive, Set<String> adminRealms, SearchSupport svs, List<Object> parameters) protected String
getQuery
(AnyCond cond, boolean not, List<Object> parameters, SearchSupport svs) protected String
getQuery
(AnyTypeCond cond, boolean not, List<Object> parameters, SearchSupport svs) protected String
getQuery
(AttrCond cond, boolean not, List<Object> parameters, SearchSupport svs) protected String
getQuery
(AuxClassCond cond, boolean not, List<Object> parameters, SearchSupport svs) protected String
getQuery
(DynRealmCond cond, boolean not, List<Object> parameters, SearchSupport svs) protected String
getQuery
(MemberCond cond, boolean not, List<Object> parameters, SearchSupport svs) protected String
getQuery
(MembershipCond cond, boolean not, List<Object> parameters, SearchSupport svs) protected String
getQuery
(PrivilegeCond cond, boolean not, List<Object> parameters, SearchSupport svs) protected String
getQuery
(RelationshipCond cond, boolean not, List<Object> parameters, SearchSupport svs) protected String
getQuery
(RelationshipTypeCond cond, boolean not, List<Object> parameters, SearchSupport svs) protected String
getQuery
(ResourceCond cond, boolean not, List<Object> parameters, SearchSupport svs) protected String
getQuery
(RoleCond cond, boolean not, List<Object> parameters, SearchSupport svs) protected Pair
<StringBuilder, Set<String>> getQuery
(SearchCond cond, List<Object> parameters, SearchSupport svs) protected void
getQueryForCustomConds
(SearchCond cond, List<Object> parameters, SearchSupport svs, boolean not, StringBuilder query) protected boolean
isOracle()
protected OrderBySupport
parseOrderBy
(SearchSupport svs, Stream<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 void
processOBS
(SearchSupport svs, OrderBySupport obs, StringBuilder where) protected void
queryOp
(StringBuilder query, String op, Pair<StringBuilder, Set<String>> leftInfo, Pair<StringBuilder, Set<String>> rightInfo) protected static int
setParameter
(List<Object> parameters, Object parameter) 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
-
setParameter
-
fillWithParameters
-
isOracle
protected boolean isOracle() -
buildAdminRealmsFilter
-
getAdminRealmsFilter
-
doCount
protected long doCount(Realm base, boolean recursive, Set<String> adminRealms, SearchCond cond, AnyTypeKind kind) - Specified by:
doCount
in classAbstractAnySearchDAO
-
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
-
buildSelect
-
processOBS
-
buildWhere
-
buildOrderBy
-
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, Stream<org.springframework.data.domain.Sort.Order> orderBy) -
getQueryForCustomConds
protected void getQueryForCustomConds(SearchCond cond, List<Object> parameters, SearchSupport svs, boolean not, StringBuilder query) -
queryOp
protected void queryOp(StringBuilder query, String op, Pair<StringBuilder, Set<String>> leftInfo, Pair<StringBuilder, Set<String>> rightInfo) -
getQuery
protected Pair<StringBuilder,Set<String>> getQuery(SearchCond cond, List<Object> parameters, SearchSupport svs) -
getQuery
protected String getQuery(AnyTypeCond cond, boolean not, List<Object> parameters, SearchSupport svs) -
getQuery
protected String getQuery(AuxClassCond cond, boolean not, List<Object> parameters, SearchSupport svs) -
getQuery
protected String getQuery(RelationshipTypeCond cond, boolean not, List<Object> parameters, SearchSupport svs) -
getQuery
protected String getQuery(RelationshipCond cond, boolean not, List<Object> parameters, SearchSupport svs) -
getQuery
protected String getQuery(MembershipCond cond, boolean not, List<Object> parameters, SearchSupport svs) -
getQuery
-
getQuery
protected String getQuery(PrivilegeCond cond, boolean not, List<Object> parameters, SearchSupport svs) -
getQuery
protected String getQuery(DynRealmCond cond, boolean not, List<Object> parameters, SearchSupport svs) -
getQuery
protected String getQuery(ResourceCond cond, boolean not, List<Object> parameters, SearchSupport svs) -
getQuery
-
fillAttrQuery
protected void fillAttrQuery(StringBuilder query, PlainAttrValue attrValue, PlainSchema schema, AttrCond cond, boolean not, List<Object> parameters, SearchSupport svs) -
getQuery
-