Class Neo4jAnySearchDAO
java.lang.Object
org.apache.syncope.core.persistence.common.dao.AbstractAnySearchDAO
org.apache.syncope.core.persistence.neo4j.dao.Neo4jAnySearchDAO
- All Implemented Interfaces:
AnySearchDAO
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static final record
protected static final record
-
Field Summary
Modifier and TypeFieldDescriptionprotected static final String
protected final org.springframework.data.neo4j.core.Neo4jClient
protected final org.springframework.data.neo4j.core.Neo4jTemplate
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
ConstructorDescriptionNeo4jAnySearchDAO
(RealmSearchDAO realmSearchDAO, DynRealmDAO dynRealmDAO, UserDAO userDAO, GroupDAO groupDAO, AnyObjectDAO anyObjectDAO, PlainSchemaDAO plainSchemaDAO, EntityFactory entityFactory, AnyUtilsFactory anyUtilsFactory, PlainAttrValidationManager validator, org.springframework.data.neo4j.core.Neo4jTemplate neo4jTemplate, org.springframework.data.neo4j.core.Neo4jClient neo4jClient) -
Method Summary
Modifier and TypeMethodDescriptionprotected static void
appendPlainAttrCond
(org.apache.commons.text.TextStringBuilder query, PlainSchema schema, String cond) protected String
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 static String
escapeIfString
(String value, boolean isStr) protected void
fillAttrQuery
(org.apache.commons.text.TextStringBuilder query, PlainAttrValue attrValue, PlainSchema schema, AttrCond cond, boolean not, Map<String, Object> parameters) protected void
fillAttrQuery
(AnyUtils anyUtils, org.apache.commons.text.TextStringBuilder query, PlainAttrValue attrValue, PlainSchema schema, AttrCond cond, boolean not, Map<String, Object> parameters) protected Neo4jAnySearchDAO.AdminRealmsFilter
getAdminRealmsFilter
(Realm base, boolean recursive, Set<String> adminRealms, Map<String, Object> parameters) protected Pair
<String, PlainSchema> protected String
getQuery
(AnyTypeKind kind, RelationshipCond cond, boolean not, Map<String, Object> parameters) protected String
getQuery
(AnyTypeKind kind, RelationshipTypeCond cond, boolean not, Map<String, Object> parameters) protected String
getQuery
(AnyTypeKind kind, ResourceCond cond, boolean not, Map<String, Object> parameters) protected Neo4jAnySearchDAO.QueryInfo
getQuery
(AnyTypeKind kind, SearchCond cond, Map<String, Object> parameters) protected String
getQuery
(AnyTypeCond cond, boolean not, Map<String, Object> parameters) protected String
getQuery
(AuxClassCond cond, boolean not, Map<String, Object> parameters) protected String
getQuery
(DynRealmCond cond, boolean not, Map<String, Object> parameters) protected String
getQuery
(MemberCond cond, boolean not, Map<String, Object> parameters) protected String
getQuery
(MembershipCond cond, boolean not, Map<String, Object> parameters) protected String
getQuery
(PrivilegeCond cond, boolean not, Map<String, Object> parameters) protected String
protected void
getQueryForCustomConds
(AnyTypeKind kind, SearchCond cond, Map<String, Object> parameters, boolean not, org.apache.commons.text.TextStringBuilder query) protected boolean
isPatternMatch
(String clause) protected void
membershipAttrConds
(org.apache.commons.text.TextStringBuilder query, Neo4jAnySearchDAO.QueryInfo queryInfo, List<String> orderBy, AnyTypeKind kind) parseOrderBy
(AnyTypeKind kind, org.springframework.data.util.Streamable<org.springframework.data.domain.Sort.Order> orderBy) protected void
queryOp
(org.apache.commons.text.TextStringBuilder query, String op, Neo4jAnySearchDAO.QueryInfo leftInfo, Neo4jAnySearchDAO.QueryInfo rightInfo) protected static String
setParameter
(Map<String, Object> parameters, Object parameter) protected void
wrapQuery
(Neo4jAnySearchDAO.QueryInfo queryInfo, org.springframework.data.util.Streamable<org.springframework.data.domain.Sort.Order> orderBy, AnyTypeKind kind, String adminRealmsFilter) Methods inherited from class org.apache.syncope.core.persistence.common.dao.AbstractAnySearchDAO
buildEffectiveCond, buildResult, check, check, check, check, check, count, key, search, search, search
-
Field Details
-
ALWAYS_FALSE_ASSERTION
- See Also:
-
neo4jTemplate
protected final org.springframework.data.neo4j.core.Neo4jTemplate neo4jTemplate -
neo4jClient
protected final org.springframework.data.neo4j.core.Neo4jClient neo4jClient
-
-
Constructor Details
-
Neo4jAnySearchDAO
public Neo4jAnySearchDAO(RealmSearchDAO realmSearchDAO, DynRealmDAO dynRealmDAO, UserDAO userDAO, GroupDAO groupDAO, AnyObjectDAO anyObjectDAO, PlainSchemaDAO plainSchemaDAO, EntityFactory entityFactory, AnyUtilsFactory anyUtilsFactory, PlainAttrValidationManager validator, org.springframework.data.neo4j.core.Neo4jTemplate neo4jTemplate, org.springframework.data.neo4j.core.Neo4jClient neo4jClient)
-
-
Method Details
-
setParameter
-
appendPlainAttrCond
protected static void appendPlainAttrCond(org.apache.commons.text.TextStringBuilder query, PlainSchema schema, String cond) -
escapeIfString
-
isPatternMatch
- Overrides:
isPatternMatch
in classAbstractAnySearchDAO
-
buildAdminRealmsFilter
-
getAdminRealmsFilter
-
getQuery
-
getQuery
-
getQuery
protected String getQuery(AnyTypeKind kind, RelationshipTypeCond cond, boolean not, Map<String, Object> parameters) -
getQuery
protected String getQuery(AnyTypeKind kind, RelationshipCond cond, boolean not, Map<String, Object> parameters) -
getQuery
-
getQuery
-
getQuery
-
getQuery
-
getQuery
-
getQuery
protected String getQuery(AnyTypeKind kind, ResourceCond cond, boolean not, Map<String, Object> parameters) -
fillAttrQuery
protected void fillAttrQuery(AnyUtils anyUtils, org.apache.commons.text.TextStringBuilder query, PlainAttrValue attrValue, PlainSchema schema, AttrCond cond, boolean not, Map<String, Object> parameters) -
fillAttrQuery
protected void fillAttrQuery(org.apache.commons.text.TextStringBuilder query, PlainAttrValue attrValue, PlainSchema schema, AttrCond cond, boolean not, Map<String, Object> parameters) -
getQuery
-
getQuery
protected Pair<String,PlainSchema> getQuery(AnyTypeKind kind, AttrCond cond, boolean not, Map<String, Object> parameters) -
getQueryForCustomConds
protected void getQueryForCustomConds(AnyTypeKind kind, SearchCond cond, Map<String, Object> parameters, boolean not, org.apache.commons.text.TextStringBuilder query) -
queryOp
protected void queryOp(org.apache.commons.text.TextStringBuilder query, String op, Neo4jAnySearchDAO.QueryInfo leftInfo, Neo4jAnySearchDAO.QueryInfo rightInfo) -
getQuery
protected Neo4jAnySearchDAO.QueryInfo getQuery(AnyTypeKind kind, SearchCond cond, Map<String, Object> parameters) -
wrapQuery
protected void wrapQuery(Neo4jAnySearchDAO.QueryInfo queryInfo, org.springframework.data.util.Streamable<org.springframework.data.domain.Sort.Order> orderBy, AnyTypeKind kind, String adminRealmsFilter) -
membershipAttrConds
protected void membershipAttrConds(org.apache.commons.text.TextStringBuilder query, Neo4jAnySearchDAO.QueryInfo queryInfo, List<String> orderBy, AnyTypeKind kind) -
doCount
protected long doCount(Realm base, boolean recursive, Set<String> adminRealms, SearchCond cond, AnyTypeKind kind) - Specified by:
doCount
in classAbstractAnySearchDAO
-
parseOrderBy
protected List<String> parseOrderBy(AnyTypeKind kind, org.springframework.data.util.Streamable<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
-