Class PGJPAJSONAnySearchDAO
- 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
-
- org.apache.syncope.core.persistence.jpa.dao.PGJPAJSONAnySearchDAO
-
- All Implemented Interfaces:
AnySearchDAO
,DAO<Any<?>>
public class PGJPAJSONAnySearchDAO extends JPAAnySearchDAO
-
-
Field Summary
Fields Modifier and Type Field Description protected static String
ALWAYS_FALSE_ASSERTION
protected static String
POSTGRESQL_REGEX_CHARS
-
Fields inherited from class org.apache.syncope.core.persistence.jpa.dao.JPAAnySearchDAO
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 PGJPAJSONAnySearchDAO(RealmDAO realmDAO, DynRealmDAO dynRealmDAO, UserDAO userDAO, GroupDAO groupDAO, AnyObjectDAO anyObjectDAO, PlainSchemaDAO schemaDAO, EntityFactory entityFactory, AnyUtilsFactory anyUtilsFactory, PlainAttrValidationManager validator)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
buildAdminRealmsFilter(Set<String> realmKeys, SearchSupport svs, List<Object> parameters)
protected void
buildFromAndWhere(StringBuilder queryString, Pair<StringBuilder,Set<String>> queryInfo, String realmsFilter, SearchSupport svs, OrderBySupport obs)
protected int
doCount(Realm base, boolean recursive, Set<String> adminRealms, SearchCond cond, AnyTypeKind kind)
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)
protected static String
escapeForLikeRegex(String input)
protected static String
escapeIfString(String value, boolean isStr)
protected void
fillAttrQuery(StringBuilder query, PlainAttrValue attrValue, PlainSchema schema, AttrCond cond, boolean not, List<Object> parameters, SearchSupport svs)
protected void
fillAttrQuery(AnyUtils anyUtils, StringBuilder query, PlainAttrValue attrValue, PlainSchema schema, AttrCond cond, boolean not, List<Object> parameters, SearchSupport svs)
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 void
parseOrderByForField(SearchSupport svs, OrderBySupport.Item item, String fieldName, OrderByClause clause)
protected void
parseOrderByForPlainSchema(SearchSupport svs, OrderBySupport obs, OrderBySupport.Item item, OrderByClause clause, PlainSchema schema, String fieldName)
protected void
queryOp(StringBuilder query, String op, Pair<StringBuilder,Set<String>> leftInfo, Pair<StringBuilder,Set<String>> rightInfo)
-
Methods inherited from class org.apache.syncope.core.persistence.jpa.dao.JPAAnySearchDAO
buildOrderBy, buildSelect, buildWhere, fillWithParameters, getAdminRealmsFilter, getQuery, getQueryForCustomConds, key, parseOrderBy, parseOrderByForCustom, processOBS, setParameter
-
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
-
ALWAYS_FALSE_ASSERTION
protected static final String ALWAYS_FALSE_ASSERTION
- See Also:
- Constant Field Values
-
POSTGRESQL_REGEX_CHARS
protected static final String POSTGRESQL_REGEX_CHARS
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
PGJPAJSONAnySearchDAO
public PGJPAJSONAnySearchDAO(RealmDAO realmDAO, DynRealmDAO dynRealmDAO, UserDAO userDAO, GroupDAO groupDAO, AnyObjectDAO anyObjectDAO, PlainSchemaDAO schemaDAO, EntityFactory entityFactory, AnyUtilsFactory anyUtilsFactory, PlainAttrValidationManager validator)
-
-
Method Detail
-
parseOrderByForPlainSchema
protected void parseOrderByForPlainSchema(SearchSupport svs, OrderBySupport obs, OrderBySupport.Item item, OrderByClause clause, PlainSchema schema, String fieldName)
- Overrides:
parseOrderByForPlainSchema
in classJPAAnySearchDAO
-
parseOrderByForField
protected void parseOrderByForField(SearchSupport svs, OrderBySupport.Item item, String fieldName, OrderByClause clause)
- Overrides:
parseOrderByForField
in classJPAAnySearchDAO
-
fillAttrQuery
protected void fillAttrQuery(AnyUtils anyUtils, StringBuilder query, PlainAttrValue attrValue, PlainSchema schema, AttrCond cond, boolean not, List<Object> parameters, SearchSupport svs)
-
getQuery
protected String getQuery(AttrCond cond, boolean not, List<Object> parameters, SearchSupport svs)
- Overrides:
getQuery
in classJPAAnySearchDAO
-
getQuery
protected String getQuery(AnyTypeCond cond, boolean not, List<Object> parameters, SearchSupport svs)
- Overrides:
getQuery
in classJPAAnySearchDAO
-
getQuery
protected String getQuery(AuxClassCond cond, boolean not, List<Object> parameters, SearchSupport svs)
- Overrides:
getQuery
in classJPAAnySearchDAO
-
getQuery
protected String getQuery(RoleCond cond, boolean not, List<Object> parameters, SearchSupport svs)
- Overrides:
getQuery
in classJPAAnySearchDAO
-
getQuery
protected String getQuery(PrivilegeCond cond, boolean not, List<Object> parameters, SearchSupport svs)
- Overrides:
getQuery
in classJPAAnySearchDAO
-
getQuery
protected String getQuery(DynRealmCond cond, boolean not, List<Object> parameters, SearchSupport svs)
- Overrides:
getQuery
in classJPAAnySearchDAO
-
getQuery
protected String getQuery(ResourceCond cond, boolean not, List<Object> parameters, SearchSupport svs)
- Overrides:
getQuery
in classJPAAnySearchDAO
-
getQuery
protected String getQuery(MemberCond cond, boolean not, List<Object> parameters, SearchSupport svs)
- Overrides:
getQuery
in classJPAAnySearchDAO
-
getQuery
protected String getQuery(RelationshipTypeCond cond, boolean not, List<Object> parameters, SearchSupport svs)
- Overrides:
getQuery
in classJPAAnySearchDAO
-
getQuery
protected String getQuery(RelationshipCond cond, boolean not, List<Object> parameters, SearchSupport svs)
- Overrides:
getQuery
in classJPAAnySearchDAO
-
getQuery
protected String getQuery(MembershipCond cond, boolean not, List<Object> parameters, SearchSupport svs)
- Overrides:
getQuery
in classJPAAnySearchDAO
-
getQuery
protected String getQuery(AnyCond cond, boolean not, List<Object> parameters, SearchSupport svs)
- Overrides:
getQuery
in classJPAAnySearchDAO
-
buildAdminRealmsFilter
protected String buildAdminRealmsFilter(Set<String> realmKeys, SearchSupport svs, List<Object> parameters)
- Overrides:
buildAdminRealmsFilter
in classJPAAnySearchDAO
-
doCount
protected int doCount(Realm base, boolean recursive, Set<String> adminRealms, SearchCond cond, AnyTypeKind kind)
- Overrides:
doCount
in classJPAAnySearchDAO
-
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)
- Overrides:
doSearch
in classJPAAnySearchDAO
-
queryOp
protected void queryOp(StringBuilder query, String op, Pair<StringBuilder,Set<String>> leftInfo, Pair<StringBuilder,Set<String>> rightInfo)
- Overrides:
queryOp
in classJPAAnySearchDAO
-
fillAttrQuery
protected void fillAttrQuery(StringBuilder query, PlainAttrValue attrValue, PlainSchema schema, AttrCond cond, boolean not, List<Object> parameters, SearchSupport svs)
- Overrides:
fillAttrQuery
in classJPAAnySearchDAO
-
buildFromAndWhere
protected void buildFromAndWhere(StringBuilder queryString, Pair<StringBuilder,Set<String>> queryInfo, String realmsFilter, SearchSupport svs, OrderBySupport obs)
-
-