Class AbstractAnySearchDAO

java.lang.Object
org.apache.syncope.core.persistence.common.dao.AbstractSearchDAO
org.apache.syncope.core.persistence.common.dao.AbstractAnySearchDAO
All Implemented Interfaces:
AnySearchDAO
Direct Known Subclasses:
ElasticsearchAnySearchDAO, MySQLJPAAnySearchDAO, Neo4jAnySearchDAO, OpenSearchAnySearchDAO, OracleJPAAnySearchDAO, PGJPAAnySearchDAO

public abstract class AbstractAnySearchDAO extends AbstractSearchDAO implements AnySearchDAO
  • Field Details

    • LOG

      protected static final Logger LOG
    • RELATIONSHIP_FIELDS

      protected static final Set<String> RELATIONSHIP_FIELDS
    • realmSearchDAO

      protected final RealmSearchDAO realmSearchDAO
    • dynRealmDAO

      protected final DynRealmDAO dynRealmDAO
    • userDAO

      protected final UserDAO userDAO
    • groupDAO

      protected final GroupDAO groupDAO
    • anyObjectDAO

      protected final AnyObjectDAO anyObjectDAO
    • anyUtilsFactory

      protected final AnyUtilsFactory anyUtilsFactory
  • Constructor Details

  • Method Details

    • buildEffectiveCond

      protected static SearchCond buildEffectiveCond(SearchCond cond, Set<String> dynRealmKeys, Set<String> groupOwners, AnyTypeKind kind)
    • findByDerAttrValue

      @Transactional(readOnly=true) public <A extends Any> List<A> findByDerAttrValue(String expression, String value, boolean ignoreCaseMatch, AnyTypeKind anyTypeKind)
      Description copied from interface: AnySearchDAO
      Find any objects by derived attribute value. This method could fail if one or more string literals contained into the derived attribute value provided derive from identifier (schema key) replacement. When you are going to specify a derived attribute expression you must be quite sure that string literals used to build the expression cannot be found into the attribute values used to replace attribute schema keys used as identifiers.
      Specified by:
      findByDerAttrValue in interface AnySearchDAO
      Type Parameters:
      A - any
      Parameters:
      expression - JEXL expression
      value - derived attribute value
      ignoreCaseMatch - whether comparison for string values should take case into account or not
      anyTypeKind - any type kind
      Returns:
      list of any objects
    • doCount

      protected abstract long doCount(Realm base, boolean recursive, Set<String> adminRealms, SearchCond cond, AnyTypeKind kind)
    • count

      public long count(Realm base, boolean recursive, Set<String> adminRealms, SearchCond cond, AnyTypeKind kind)
      Specified by:
      count in interface AnySearchDAO
      Parameters:
      base - Realm to start searching from
      recursive - whether search should recursively include results from child Realms
      adminRealms - realms for which the caller owns the proper entitlement(s)
      cond - the search condition
      kind - any type kind
      Returns:
      size of search result
    • search

      public <T extends Any> List<T> search(SearchCond cond, AnyTypeKind kind)
      Specified by:
      search in interface AnySearchDAO
      Type Parameters:
      T - any
      Parameters:
      cond - the search condition
      kind - any object
      Returns:
      the list of any objects matching the given search condition
    • search

      public <T extends Any> List<T> search(SearchCond cond, List<org.springframework.data.domain.Sort.Order> orderBy, AnyTypeKind kind)
      Specified by:
      search in interface AnySearchDAO
      Type Parameters:
      T - any
      Parameters:
      cond - the search condition
      orderBy - list of ordering clauses
      kind - any type kind
      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, org.springframework.data.domain.Pageable pageable, AnyTypeKind kind)
    • isPatternMatch

      protected boolean isPatternMatch(String clause)
    • 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, org.springframework.data.domain.Pageable pageable, AnyTypeKind kind)
      Specified by:
      search in interface AnySearchDAO
      Type Parameters:
      T - any
      Parameters:
      base - Realm to start searching from
      recursive - whether search should recursively include results from child Realms
      adminRealms - realms for which the caller owns the proper entitlement(s)
      cond - the search condition
      pageable - paging information
      kind - any type kind
      Returns:
      the list of any objects matching the given search condition (in the given page)