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
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
-
-
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
-
buildAdminRealmsFilter
protected String buildAdminRealmsFilter(Set<String> realmKeys, SearchSupport svs, List<Object> parameters)
-
getAdminRealmsFilter
protected Triple<String,Set<String>,Set<String>> getAdminRealmsFilter(Realm base, boolean recursive, Set<String> adminRealms, SearchSupport svs, List<Object> parameters)
-
doCount
protected int 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, int page, int itemsPerPage, List<OrderByClause> orderBy, AnyTypeKind kind)
- Specified by:
doSearch
in classAbstractAnySearchDAO
-
fillWithParameters
protected void fillWithParameters(javax.persistence.Query query, List<Object> parameters)
-
buildSelect
protected StringBuilder buildSelect(OrderBySupport obs)
-
processOBS
protected void processOBS(SearchSupport svs, OrderBySupport obs, StringBuilder where)
-
buildWhere
protected StringBuilder buildWhere(SearchSupport svs, OrderBySupport obs)
-
buildOrderBy
protected StringBuilder buildOrderBy(OrderBySupport obs)
-
key
protected String key(AttrSchemaType schemaType)
-
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)
-
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
protected String getQuery(RoleCond cond, boolean not, List<Object> parameters, SearchSupport svs)
-
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
protected String getQuery(MemberCond cond, boolean not, List<Object> parameters, SearchSupport svs)
-
fillAttrQuery
protected void fillAttrQuery(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)
-
getQuery
protected String getQuery(AnyCond cond, boolean not, List<Object> parameters, SearchSupport svs)
-
-