Interface IDsSelectFilter


public interface IDsSelectFilter
  • Method Details

    • noOrder

      void noOrder()
      no order is used
    • orderByName

      void orderByName()
      the select result should be sort by name
    • orderByObject

      void orderByObject()
      the select result should be sort by Object type (Container, User, Group...)
    • orderByPriority

      void orderByPriority()
      the select result should be sort by the given type priority
    • orderByPriorityName

      void orderByPriorityName()
      the select result should be sort by the priority and by the name
    • orderByObjectPriorityName

      void orderByObjectPriorityName()
      the select result should be sort by the priority and by the object type
    • setOrder

      void setOrder(de.uplanet.lucy.server.usermanager.usecases.EDsSort p_sort)
      the select result should be sorted by the sort parameter see EDsSort
      Parameters:
      p_sort - the sort order
    • selectFullRecord

      void selectFullRecord()
      all Field Attributes will be returned (should used with care, the data size can be much high, e.g. one user record has more than 45 attributes)
    • selectDeletedRecords

      void selectDeletedRecords(boolean p_bValue)
      if true, records that marked as deleted are returned too
      Parameters:
      p_bValue - Select delete records?
    • selectDisabledRecords

      void selectDisabledRecords(boolean p_bValue)
      if true, records that marked as disabled are returned too
      Parameters:
      p_bValue - true, records that marked as disabled are returned, too
    • useDisabledRecordFilter

      boolean useDisabledRecordFilter()
    • useDeletedRecordFilter

      boolean useDeletedRecordFilter()
    • selectNormalRecord

      void selectNormalRecord()
      (default) only the id, guid, containerid, typeid and the name field attribute will be returned
    • selectRecordFields

      void selectRecordFields(String... p_fieldGuids)
      set the record attributes, that should be read
      The guids can found in the constant classes field attributes set before will be replaced with this actual set
      Parameters:
      p_fieldGuids - The field guids to select.
    • addRecordFields

      void addRecordFields(String... p_fieldGuids)
      adds new record colums, that should be read The guids can found in the constant classes
      Parameters:
      p_fieldGuids - The field guids to add.
    • addRecordFields

      void addRecordFields(Collection<String> p_fieldGuids)
      adds new record colums, that should be read The guids can found in the constant classes
      Parameters:
      p_fieldGuids - Adds the field guids.
    • isSelectFullRecord

      boolean isSelectFullRecord()
      return true if full record should be read
      Returns:
      true/false
    • getRecordFields

      String[] getRecordFields()
      Returns:
      array of field attributes, that will be read
    • getOrder

      de.uplanet.lucy.server.usermanager.usecases.EDsSort getOrder()
      return the sort order
      Returns:
      EDsSort
    • setOrderAscending

      void setOrderAscending(boolean p_bAscending)
      set the sort order (ascending or descending)
      Parameters:
      p_bAscending -
    • isOrderAscending

      boolean isOrderAscending()
      Returns:
      true for ascending sort (default)
    • addObjectFilter

      void addObjectFilter(de.uplanet.lucy.server.usermanager.IDsType p_type, boolean p_bWithDerivedTypes)
      Adds an DS Object filter
      Parameters:
      p_type - The filter type @see DsDefaultType
      p_bWithDerivedTypes - when true the derived types returned to. (e.g. Container type is set, than the OrgUnit is returned, too)
    • setFilterAll

      void setFilterAll(boolean p_filterAll)
      true when all filterable field should use Fields with DSATTRIBUTE.BSEARCHHABLE is true or if only the DSOBJECT.STRNAME is used for search (has only an affect, if the filter is used on a specific object type select, e.q. select all from containers, but not select all items contains a container)
      Parameters:
      p_filterAll -
    • isFilterAll

      boolean isFilterAll()
      Returns:
      true if filter all fields
    • removeObjectFilter

      void removeObjectFilter(de.uplanet.lucy.server.usermanager.IDsType p_type)
      Removes a filter object
      Parameters:
      p_type - The object filter to remove @see DsDefaultType
    • clearObjectFilter

      void clearObjectFilter()
      Removes all object filters
    • setFilterString

      void setFilterString(String p_strFilterStr)
      set a filter string, used for textual filtering if filter is used for a select of one specific object type, all searchable fields are used. (DsAttribute.BSEARCHABLE = TRUE) otherwise only the DSOBJECT.STRNAME field is used for filtering.
      Parameters:
      p_strFilterStr - (min length: 3 and SQL like characters are allowed)
    • getObjectFilter

      Set<de.uplanet.lucy.server.usermanager.usecases.DsObjectFilter> getObjectFilter()
      returns a set of DS Object, that will be used for filtering
      Returns:
      set of object filters
    • getFilterString

      String getFilterString()
      returns the filter string
      Returns:
      ste filter string
    • getDBFilterString

      String getDBFilterString(de.uplanet.jdbc.IDataSourceDescriptor p_desc)
      returns the filter string, that can be used in a sql like clause
      Returns:
      ste filter string
    • isDBFilterStringEscaped

      boolean isDBFilterStringEscaped()
    • shouldLikeWithLower

      boolean shouldLikeWithLower()
      Returns:
      like compare in lower case.
    • setShouldLikeWithLower

      void setShouldLikeWithLower(boolean p_bLower)
      Parameters:
      p_bLower - Like compare in lower case?
    • reset

      void reset()
      reset the current filter settings
    • setStartIndex

      void setStartIndex(int p_iIdx)
      can be used for pageing, index of the first record (<= 0 for first record)
      Parameters:
      p_iIdx - The start index.
    • getStartIndex

      int getStartIndex()
      Returns:
      start index < 1 from begin
    • setSelectCount

      void setSelectCount(int p_iCount)
      Parameters:
      p_iCount - maximum count or -1 for all
    • getSelectCount

      int getSelectCount()
      Returns:
      maximum count returned (-1 for all)
    • setSelectAll

      void setSelectAll()
      Select all (same as setSelectCount(-1)).
    • setMaxTreeLevel

      void setMaxTreeLevel(int p_iMaxLevel)
      Set the maximal count of tree levels should be read (-1 for all).
    • getMaxTreeLevel

      int getMaxTreeLevel()
      Returns:
      maximal count of tree level should returned (-1) for all
    • addIdFilter

      void addIdFilter(int... p_ids)
      when set only items with one of that id list is returned
      Parameters:
      p_ids - The id list
    • removeIdFilter

      void removeIdFilter(int... p_ids)
      removes the given ids from the id filter
      Parameters:
      p_ids -
    • clearIdFilter

      void clearIdFilter()
      clears the id filter set
    • getIDFilter

      Set<Integer> getIDFilter()
      set of ids, that will be used for filtering
      Returns:
      set of id filter
    • addGuidFilter

      void addGuidFilter(String... p_guids)
      when set only items with one of that guid list is returned
      Parameters:
      p_guids - The guids to select
    • addGuidFilter

      void addGuidFilter(Collection<String> p_guids)
      when set only items with one of that guid list is returned
      Parameters:
      p_guids - The guids to add
    • removeGuidFilter

      void removeGuidFilter(String... p_guids)
      removes the given guids from the guid filter
      Parameters:
      p_guids - Removes that field guids
    • removeGuidFilter

      void removeGuidFilter(List<String> p_guidList)
      removes the given guids from the guid filter
      Parameters:
      p_guidList - List with field guids to remove
    • clearGuidFilter

      void clearGuidFilter()
      removes the guid filter set
    • getGuidsFilter

      Set<String> getGuidsFilter()
      returns a set of guids, that will be used for filtering
      Returns:
      set of guids
    • makeCopy

      IDsSelectFilter makeCopy()
      Makes a copy of current filter object, like clone
      Returns:
      a deep copy of the current filter object
    • setFieldFilterOrExpression

      void setFieldFilterOrExpression(boolean p_bOrExpression)
      Combines field filters as or expression
      Parameters:
      p_bOrExpression - true for or expression.
    • isFieldFilterOrExpression

      boolean isFieldFilterOrExpression()
      Return if field filters should combined as or expression?
    • addFieldFilter

      void addFieldFilter(String p_strFieldGuid, int p_iValue)
      makes a field filter WHERE (FIELD = p_ialue)
      Parameters:
      p_strFieldGuid - The field guid
      p_iValue - The compare value
    • addFieldFilter

      void addFieldFilter(String p_strFieldGuid, boolean p_bValue)
      makes a field filter WHERE (FIELD = p_bValue)
      Parameters:
      p_strFieldGuid - The field guid
      p_bValue - The compare value
    • addFieldFilter

      void addFieldFilter(String p_strFieldGuid, double p_dValue)
      makes a field filter WHERE (FIELD = p_iValue)
      Parameters:
      p_strFieldGuid - The field guid
      p_dValue - The compare value
    • addFieldFilter

      void addFieldFilter(String p_strFieldGuid, Date p_dtValue)
      makes a field filter WHERE (FIELD = p_dtValue)
      Parameters:
      p_strFieldGuid - The field guid
      p_dtValue - The compare value
    • addFieldFilter

      void addFieldFilter(String p_strFieldGuid, String p_strValue)
      makes a field filter WHERE (FIELD = p_strValue) (case sensitive)
      Parameters:
      p_strFieldGuid - The field guid
      p_strValue - The compare value
    • addFieldFilter

      void addFieldFilter(String p_strFieldGuid, Object p_value)
      makes a field filter WHERE (FIELD = p_value) (case sensitive)
      Parameters:
      p_strFieldGuid - The field guid
      p_value - The compare value
    • addFieldFilter

      void addFieldFilter(String p_strFieldGuid, IValueHolder<?> p_vh)
      makes a field filter WHERE (FIELD = p_vh) (case sensitive)
      Parameters:
      p_strFieldGuid - The field guid
      p_vh - A value holder with the compare value
    • addFieldFilter

      void addFieldFilter(String p_strFieldGuid, de.uplanet.lucy.server.usermanager.usecases.DsFieldFilter p_fieldFilter)
      makes a field filter
      Parameters:
      p_strFieldGuid - The field guid
      p_fieldFilter - The field filter with the compare value(s)
    • addFieldFilterByName

      void addFieldFilterByName(String p_strFieldName, int p_iValue)
      makes a field filter WHERE (FIELD = p_ialue)
      Parameters:
      p_strFieldName - The unique attribute name.
      p_iValue - The compare value
    • addFieldFilterByName

      void addFieldFilterByName(String p_strFieldName, boolean p_bValue)
      makes a field filter WHERE (FIELD = p_bValue)
      Parameters:
      p_strFieldName - The unique attribute name.
      p_bValue - The compare value
    • addFieldFilterByName

      void addFieldFilterByName(String p_strFieldName, double p_dValue)
      makes a field filter WHERE (FIELD = p_iValue)
      Parameters:
      p_strFieldName - The unique attribute name.
      p_dValue - The compare value
    • addFieldFilterByName

      void addFieldFilterByName(String p_strFieldName, Date p_dtValue)
      makes a field filter WHERE (FIELD = p_dtValue)
      Parameters:
      p_strFieldName - The unique attribute name.
      p_dtValue - The compare value
    • addFieldFilterByName

      void addFieldFilterByName(String p_strFieldName, String p_strValue)
      makes a field filter WHERE (FIELD = p_strValue) (case sensitive)
      Parameters:
      p_strFieldName - The unique attribute name.
      p_strValue - The compare value
    • addFieldFilterByName

      void addFieldFilterByName(String p_strFieldName, Object p_value)
      makes a field filter WHERE (FIELD = p_value) (case sensitive)
      Parameters:
      p_strFieldName - The unique attribute name.
      p_value - The compare value
    • addFieldFilterByName

      void addFieldFilterByName(String p_strFieldName, IValueHolder<?> p_vh)
      makes a field filter WHERE (FIELD = p_vh) (case sensitive)
      Parameters:
      p_strFieldName - The unique attribute name.
      p_vh - The value holder used for compare
    • removeFieldFilter

      void removeFieldFilter(String p_strGuid)
      removes a field filter, that was set before
      Parameters:
      p_strGuid - The field guid
    • clearFieldFilter

      void clearFieldFilter()
      clears all field filters
    • getFieldFilters

      Map<String,de.uplanet.lucy.server.usermanager.usecases.DsFieldFilter> getFieldFilters()
      Returns:
      Unmodifiable map of field filters
    • setLastRecordCount

      void setLastRecordCount(int p_iCount)
      set the records count of the last select
      Parameters:
      p_iCount - The last record count
    • getLastRecordCount

      int getLastRecordCount()
      The count of records, from the last select.
      Returns:
      The record count of the last select.
    • setSelectIterator

      void setSelectIterator(IDsSelectIterator p_iter)
      Sets a iterator used for select.
      Parameters:
      p_iter - The iterator, could be null
    • getSelectIterator

      IDsSelectIterator getSelectIterator()
      Returns:
      The iterator used for select, could be null;
    • needsRecordCount

      boolean needsRecordCount()
      Returns:
      Returns true if SELECT COUNT(*) statement should called, otherwise false
    • setNeedsRecordCount

      void setNeedsRecordCount(boolean p_bRecordCount)
      Parameters:
      p_bRecordCount - true if the record count is needed otherwise false.