Class AbstractAnySearchDAO
- java.lang.Object
-
- org.apache.syncope.core.persistence.jpa.dao.AbstractDAO<Any<?>>
-
- org.apache.syncope.core.persistence.jpa.dao.AbstractAnySearchDAO
-
- All Implemented Interfaces:
AnySearchDAO,DAO<Any<?>>
- Direct Known Subclasses:
ElasticsearchAnySearchDAO,JPAAnySearchDAO,OpenSearchAnySearchDAO
public abstract class AbstractAnySearchDAO extends AbstractDAO<Any<?>> implements AnySearchDAO
-
-
Field Summary
Fields Modifier and Type Field Description protected AnyObjectDAOanyObjectDAOprotected AnyUtilsFactoryanyUtilsFactoryprotected DynRealmDAOdynRealmDAOprotected EntityFactoryentityFactoryprotected GroupDAOgroupDAOprotected PlainSchemaDAOplainSchemaDAOprotected RealmDAOrealmDAOprotected static String[]RELATIONSHIP_FIELDSprotected UserDAOuserDAOprotected PlainAttrValidationManagervalidator-
Fields inherited from class org.apache.syncope.core.persistence.jpa.dao.AbstractDAO
LOG
-
-
Constructor Summary
Constructors Constructor Description AbstractAnySearchDAO(RealmDAO realmDAO, DynRealmDAO dynRealmDAO, UserDAO userDAO, GroupDAO groupDAO, AnyObjectDAO anyObjectDAO, PlainSchemaDAO plainSchemaDAO, EntityFactory entityFactory, AnyUtilsFactory anyUtilsFactory, PlainAttrValidationManager validator)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected static SearchCondbuildEffectiveCond(SearchCond cond, Set<String> dynRealmKeys, Set<String> groupOwners, AnyTypeKind kind)protected <T extends Any<?>>
List<T>buildResult(List<Object> raw, AnyTypeKind kind)protected Triple<PlainSchema,PlainAttrValue,AnyCond>check(AnyCond cond, AnyTypeKind kind)protected Pair<PlainSchema,PlainAttrValue>check(AttrCond cond, AnyTypeKind kind)protected Set<String>check(MemberCond cond)protected List<String>check(MembershipCond cond)protected Set<String>check(RelationshipCond cond)intcount(Realm base, boolean recursive, Set<String> adminRealms, SearchCond cond, AnyTypeKind kind)protected abstract intdoCount(Realm base, boolean recursive, Set<String> adminRealms, SearchCond cond, AnyTypeKind kind)protected abstract <T extends Any<?>>
List<T>doSearch(Realm base, boolean recursive, Set<String> adminRealms, SearchCond searchCondition, int page, int itemsPerPage, List<OrderByClause> orderBy, AnyTypeKind kind)<T extends Any<?>>
List<T>search(SearchCond cond, List<OrderByClause> orderBy, AnyTypeKind kind)<T extends Any<?>>
List<T>search(SearchCond cond, AnyTypeKind kind)<T extends Any<?>>
List<T>search(Realm base, boolean recursive, Set<String> adminRealms, SearchCond cond, int page, int itemsPerPage, List<OrderByClause> orderBy, AnyTypeKind kind)-
Methods inherited from class org.apache.syncope.core.persistence.jpa.dao.AbstractDAO
detach, entityManager, entityManagerFactory, isOracle, refresh
-
-
-
-
Field Detail
-
RELATIONSHIP_FIELDS
protected static final String[] RELATIONSHIP_FIELDS
-
realmDAO
protected final RealmDAO realmDAO
-
dynRealmDAO
protected final DynRealmDAO dynRealmDAO
-
userDAO
protected final UserDAO userDAO
-
groupDAO
protected final GroupDAO groupDAO
-
anyObjectDAO
protected final AnyObjectDAO anyObjectDAO
-
plainSchemaDAO
protected final PlainSchemaDAO plainSchemaDAO
-
entityFactory
protected final EntityFactory entityFactory
-
anyUtilsFactory
protected final AnyUtilsFactory anyUtilsFactory
-
validator
protected final PlainAttrValidationManager validator
-
-
Constructor Detail
-
AbstractAnySearchDAO
public AbstractAnySearchDAO(RealmDAO realmDAO, DynRealmDAO dynRealmDAO, UserDAO userDAO, GroupDAO groupDAO, AnyObjectDAO anyObjectDAO, PlainSchemaDAO plainSchemaDAO, EntityFactory entityFactory, AnyUtilsFactory anyUtilsFactory, PlainAttrValidationManager validator)
-
-
Method Detail
-
buildEffectiveCond
protected static SearchCond buildEffectiveCond(SearchCond cond, Set<String> dynRealmKeys, Set<String> groupOwners, AnyTypeKind kind)
-
doCount
protected abstract int doCount(Realm base, boolean recursive, Set<String> adminRealms, SearchCond cond, AnyTypeKind kind)
-
count
public int count(Realm base, boolean recursive, Set<String> adminRealms, SearchCond cond, AnyTypeKind kind)
- Specified by:
countin interfaceAnySearchDAO- Parameters:
base- Realm to start searching fromrecursive- whether search should recursively include results from child RealmsadminRealms- realms for which the caller owns the proper entitlement(s)cond- the search conditionkind- any object- Returns:
- size of search result
-
search
public <T extends Any<?>> List<T> search(SearchCond cond, AnyTypeKind kind)
- Specified by:
searchin interfaceAnySearchDAO- Type Parameters:
T- any- Parameters:
cond- the search conditionkind- any object- Returns:
- the list of any objects matching the given search condition
-
search
public <T extends Any<?>> List<T> search(SearchCond cond, List<OrderByClause> orderBy, AnyTypeKind kind)
- Specified by:
searchin interfaceAnySearchDAO- Type Parameters:
T- any- Parameters:
cond- the search conditionorderBy- list of ordering clauseskind- any object- Returns:
- the list of any objects matching the given search condition
-
doSearch
protected abstract <T extends Any<?>> List<T> doSearch(Realm base, boolean recursive, Set<String> adminRealms, SearchCond searchCondition, int page, int itemsPerPage, List<OrderByClause> orderBy, AnyTypeKind kind)
-
check
protected Pair<PlainSchema,PlainAttrValue> check(AttrCond cond, AnyTypeKind kind)
-
check
protected Triple<PlainSchema,PlainAttrValue,AnyCond> check(AnyCond cond, AnyTypeKind kind)
-
check
protected List<String> check(MembershipCond cond)
-
check
protected Set<String> check(RelationshipCond cond)
-
check
protected Set<String> check(MemberCond cond)
-
buildResult
protected <T extends Any<?>> List<T> buildResult(List<Object> raw, AnyTypeKind kind)
-
search
public <T extends Any<?>> List<T> search(Realm base, boolean recursive, Set<String> adminRealms, SearchCond cond, int page, int itemsPerPage, List<OrderByClause> orderBy, AnyTypeKind kind)
- Specified by:
searchin interfaceAnySearchDAO- Type Parameters:
T- any- Parameters:
base- Realm to start searching fromrecursive- whether search should recursively include results from child RealmsadminRealms- realms for which the caller owns the proper entitlement(s)cond- the search conditionpage- position of the first result, start from 1itemsPerPage- number of results per pageorderBy- list of ordering clauseskind- any object- Returns:
- the list of any objects matching the given search condition (in the given page)
-
-