de.uplanet.lucy.server.usermanager.usecases
Interface IDsSelectFilter


public interface IDsSelectFilter

Version:
$Revision: 56258 $
Default settings on initial or after reset call

Method Summary
 void addFieldFilter(java.lang.String p_strFieldGuid, boolean p_bValue)
          makes a field filter WHERE (FIELD = p_bValue)
 void addFieldFilter(java.lang.String p_strFieldGuid, de.uplanet.jdbc.Date p_dtValue)
          makes a field filter WHERE (FIELD = p_dtValue)
 void addFieldFilter(java.lang.String p_strFieldGuid, double p_dValue)
          makes a field filter WHERE (FIELD = p_iValue)
 void addFieldFilter(java.lang.String p_strFieldGuid, int p_iValue)
          makes a field filter WHERE (FIELD = p_ialue)
 void addFieldFilter(java.lang.String p_strFieldGuid, IValueHolder<?> p_vh)
          makes a field filter WHERE (FIELD = p_vh) (case sensitive)
 void addFieldFilter(java.lang.String p_strFieldGuid, java.lang.Object p_value)
          makes a field filter WHERE (FIELD = p_value) (case sensitive)
 void addFieldFilter(java.lang.String p_strFieldGuid, java.lang.String p_strValue)
          makes a field filter WHERE (FIELD = p_strValue) (case sensitive)
 void addFieldFilterByName(java.lang.String p_strFieldName, boolean p_bValue)
          makes a field filter WHERE (FIELD = p_bValue)
 void addFieldFilterByName(java.lang.String p_strFieldName, de.uplanet.jdbc.Date p_dtValue)
          makes a field filter WHERE (FIELD = p_dtValue)
 void addFieldFilterByName(java.lang.String p_strFieldName, double p_dValue)
          makes a field filter WHERE (FIELD = p_iValue)
 void addFieldFilterByName(java.lang.String p_strFieldName, int p_iValue)
          makes a field filter WHERE (FIELD = p_ialue)
 void addFieldFilterByName(java.lang.String p_strFieldName, IValueHolder<?> p_vh)
          makes a field filter WHERE (FIELD = p_vh) (case sensitive)
 void addFieldFilterByName(java.lang.String p_strFieldName, java.lang.Object p_value)
          makes a field filter WHERE (FIELD = p_value) (case sensitive)
 void addFieldFilterByName(java.lang.String p_strFieldGuid, java.lang.String p_strValue)
          makes a field filter WHERE (FIELD = p_strValue) (case sensitive)
 void addGuidFilter(java.util.List<java.lang.String> p_guids)
          when set only items with one of that guid list is returned
 void addGuidFilter(java.lang.String... p_guids)
          when set only items with one of that guid list is returned
 void addIdFilter(int... p_ids)
          when set only items with one of that guid list is returned
 void addObjectFilter(de.uplanet.lucy.server.usermanager.IDsType p_type, boolean p_bWithDerivedTypes)
          Adds an DS Object filter
 void addRecordFields(java.lang.String... p_fieldGuids)
          adds new record colums, that should be read The guids can found in the constant classes @see DS_OBJECT @see DS_USER @see DS_SET @see DS_GROUP @see DS_ROLE @see DS_DISTLIST @see DS_CONTAINER @see DS_ORGUNIT
 void clearFieldFilter()
          clears all field filters
 void clearGuidFilter()
          removes the guid filter set
 void clearIdFilter()
          clears the id filter set
 void clearObjectFilter()
          Removes a filter object
 java.lang.String getDBFilterString(de.uplanet.jdbc.IDataSourceDescriptor p_desc)
          returns the filter string, that can be used in a sql like clause
 java.util.Map<java.lang.String,IValueHolder<?>> getFieldFilters()
           
 java.lang.String getFilterString()
          returns the filter string
 java.util.Set<java.lang.String> getGuidsFilter()
          returns a set of guids, that will be used for filtering
 java.util.Set<java.lang.Integer> getIDFilter()
          set of ids, that will be used for filtering
 int getLastRecordCount()
          The count of records, from the last select
 int getMaxTreeLevel()
           
 java.util.Set<de.uplanet.lucy.server.usermanager.usecases.DsObjectFilter> getObjectFilter()
          returns a set of DS Object, that will be used for filtering
 de.uplanet.lucy.server.usermanager.usecases.EDsSort getOrder()
          return the sort order
 java.lang.String[] getRecordFields()
           
 int getSelectCount()
           
 int getStartIndex()
           
 boolean isFilterAll()
           
 boolean isOrderAscending()
           
 boolean isSelectFullRecord()
          return true if full record should be read
 IDsSelectFilter makeCopy()
          Makes a copy of current filter object, like clone
 void noOrder()
          no order is used
 void orderByName()
          the select result should be sort by name
 void orderByObject()
          the select result should be sort by Object type (Container, User, Group...)
 void orderByObjectPriorityName()
          the select result should be sort by the priority and by the object type
 void orderByPriority()
          the select result should be sort by the given type priority
 void orderByPriorityName()
          the select result should be sort by the priority and by the name
 void removeFieldFilter(java.lang.String p_strGuid)
          removes a field filter, that was set before
 void removeGuidFilter(java.util.List<java.lang.String> p_guidList)
          removes the given guids from the guid filter
 void removeGuidFilter(java.lang.String... p_guids)
          removes the given guids from the guid filter
 void removeIdFilter(int... p_ids)
          removes the given guids from the guid filter
 void removeObjectFilter(de.uplanet.lucy.server.usermanager.IDsType p_type)
          Removes a filter object
 void reset()
          reset the current filter settings
 void selectDeletedRecords(boolean l_bValue)
          if true, records that marked as deleted are returned too
 void selectDisabledRecords(boolean l_bValue)
          if true, records that marked as disabled are returned too
 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)
 void selectNormalRecord()
          (default) only the id, guid, containerid, typeid and the name field attribute will be returned
 void selectRecordFields(java.lang.String... p_fieldGuids)
          set the record attributes, that should be read
The guids can found in the constant classes DS_CONTAINER DS_USER DS_SET DS_GROUP DS_ROLE DS_DISTLIST DS_CONTAINER DS_ORGUNIT field attributes set before will be replaced with this actual set
 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)
 void setFilterString(java.lang.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.
 void setLastRecordCount(int p_iCount)
          set the records count of the last select
 void setMaxTreeLevel(int p_iMaxLevel)
          Set the maximal count of tree levels should be read (-1 for all).
 void setOrder(de.uplanet.lucy.server.usermanager.usecases.EDsSort p_sort)
          the select result should be sorted by the sort parameter see EDsSort
 void setOrderAscending(boolean p_bAscending)
          set the sort order (ascending or descending)
 void setSelectAll()
          Select all (same as setSelectCount(-1)).
 void setSelectCount(int p_iCount)
           
 void setStartIndex(int p_iIdx)
          can be used for pageing, index of the first record (<= 0 for first record)
 boolean useDeletedRecordFilter()
           
 boolean useDisabledRecordFilter()
           
 

Method Detail

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 l_bValue)
if true, records that marked as deleted are returned too

Parameters:
l_bValue -

selectDisabledRecords

void selectDisabledRecords(boolean l_bValue)
if true, records that marked as disabled are returned too

Parameters:
l_bValue -

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(java.lang.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 -

addRecordFields

void addRecordFields(java.lang.String... p_fieldGuids)
adds new record colums, that should be read The guids can found in the constant classes

isSelectFullRecord

boolean isSelectFullRecord()
return true if full record should be read

Returns:
true/false

getRecordFields

java.lang.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 -
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 -

clearObjectFilter

void clearObjectFilter()
Removes a filter object

Parameters:
p_type -

setFilterString

void setFilterString(java.lang.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

java.util.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

java.lang.String getFilterString()
returns the filter string

Returns:
ste filter string

getDBFilterString

java.lang.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

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 -

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 guid list is returned

Parameters:
p_ids -

removeIdFilter

void removeIdFilter(int... p_ids)
removes the given guids from the guid filter

Parameters:
p_ids -

clearIdFilter

void clearIdFilter()
clears the id filter set


getIDFilter

java.util.Set<java.lang.Integer> getIDFilter()
set of ids, that will be used for filtering

Returns:
set of id filter

addGuidFilter

void addGuidFilter(java.lang.String... p_guids)
when set only items with one of that guid list is returned

Parameters:
p_guids -

addGuidFilter

void addGuidFilter(java.util.List<java.lang.String> p_guids)
when set only items with one of that guid list is returned

Parameters:
p_guids -

removeGuidFilter

void removeGuidFilter(java.lang.String... p_guids)
removes the given guids from the guid filter

Parameters:
p_guids -

removeGuidFilter

void removeGuidFilter(java.util.List<java.lang.String> p_guidList)
removes the given guids from the guid filter

Parameters:
p_guids -

clearGuidFilter

void clearGuidFilter()
removes the guid filter set


getGuidsFilter

java.util.Set<java.lang.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

addFieldFilter

void addFieldFilter(java.lang.String p_strFieldGuid,
                    int p_iValue)
makes a field filter WHERE (FIELD = p_ialue)

Parameters:
p_strFieldGuid -
p_iValue -

addFieldFilter

void addFieldFilter(java.lang.String p_strFieldGuid,
                    boolean p_bValue)
makes a field filter WHERE (FIELD = p_bValue)

Parameters:
p_strFieldGuid -
p_bValue -

addFieldFilter

void addFieldFilter(java.lang.String p_strFieldGuid,
                    double p_dValue)
makes a field filter WHERE (FIELD = p_iValue)

Parameters:
p_strFieldGuid -
p_dValue -

addFieldFilter

void addFieldFilter(java.lang.String p_strFieldGuid,
                    de.uplanet.jdbc.Date p_dtValue)
makes a field filter WHERE (FIELD = p_dtValue)

Parameters:
p_strFieldGuid -
p_dtValue -

addFieldFilter

void addFieldFilter(java.lang.String p_strFieldGuid,
                    java.lang.String p_strValue)
makes a field filter WHERE (FIELD = p_strValue) (case sensitive)

Parameters:
p_strFieldGuid -
p_strValue -

addFieldFilter

void addFieldFilter(java.lang.String p_strFieldGuid,
                    java.lang.Object p_value)
makes a field filter WHERE (FIELD = p_value) (case sensitive)

Parameters:
p_strFieldGuid -
p_strValue -

addFieldFilter

void addFieldFilter(java.lang.String p_strFieldGuid,
                    IValueHolder<?> p_vh)
makes a field filter WHERE (FIELD = p_vh) (case sensitive)

Parameters:
p_strFieldGuid -
p_vh -

addFieldFilterByName

void addFieldFilterByName(java.lang.String p_strFieldName,
                          int p_iValue)
makes a field filter WHERE (FIELD = p_ialue)

Parameters:
p_strFieldName - The unique attribute name.
p_iValue -

addFieldFilterByName

void addFieldFilterByName(java.lang.String p_strFieldName,
                          boolean p_bValue)
makes a field filter WHERE (FIELD = p_bValue)

Parameters:
p_strFieldName - The unique attribute name.
p_bValue -

addFieldFilterByName

void addFieldFilterByName(java.lang.String p_strFieldName,
                          double p_dValue)
makes a field filter WHERE (FIELD = p_iValue)

Parameters:
p_strFieldName - The unique attribute name.
p_dValue -

addFieldFilterByName

void addFieldFilterByName(java.lang.String p_strFieldName,
                          de.uplanet.jdbc.Date p_dtValue)
makes a field filter WHERE (FIELD = p_dtValue)

Parameters:
p_strFieldName - The unique attribute name.
p_dtValue -

addFieldFilterByName

void addFieldFilterByName(java.lang.String p_strFieldGuid,
                          java.lang.String p_strValue)
makes a field filter WHERE (FIELD = p_strValue) (case sensitive)

Parameters:
p_strFieldName - The unique attribute name.
p_strValue -

addFieldFilterByName

void addFieldFilterByName(java.lang.String p_strFieldName,
                          java.lang.Object p_value)
makes a field filter WHERE (FIELD = p_value) (case sensitive)

Parameters:
p_strFieldName - The unique attribute name.
p_strValue -

addFieldFilterByName

void addFieldFilterByName(java.lang.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 -

removeFieldFilter

void removeFieldFilter(java.lang.String p_strGuid)
removes a field filter, that was set before

Parameters:
p_strGuid -

clearFieldFilter

void clearFieldFilter()
clears all field filters


getFieldFilters

java.util.Map<java.lang.String,IValueHolder<?>> getFieldFilters()

setLastRecordCount

void setLastRecordCount(int p_iCount)
set the records count of the last select

Parameters:
p_iCount -

getLastRecordCount

int getLastRecordCount()
The count of records, from the last select

Returns:
record count of the last select


Last updated: 2011-01-27
Copyright 2000-2010 United Planet. All Rights Reserved.