Interface IDsSelectFilter
public interface IDsSelectFilter
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddFieldFilter(String p_strFieldGuid, boolean p_bValue) makes a field filter WHERE (FIELD = p_bValue)voidaddFieldFilter(String p_strFieldGuid, double p_dValue) makes a field filter WHERE (FIELD = p_iValue)voidaddFieldFilter(String p_strFieldGuid, int p_iValue) makes a field filter WHERE (FIELD = p_ialue)voidaddFieldFilter(String p_strFieldGuid, IValueHolder<?> p_vh) makes a field filter WHERE (FIELD = p_vh) (case sensitive)voidaddFieldFilter(String p_strFieldGuid, de.uplanet.lucy.server.usermanager.usecases.DsFieldFilter p_fieldFilter) makes a field filtervoidaddFieldFilter(String p_strFieldGuid, Object p_value) makes a field filter WHERE (FIELD = p_value) (case sensitive)voidaddFieldFilter(String p_strFieldGuid, String p_strValue) makes a field filter WHERE (FIELD = p_strValue) (case sensitive)voidaddFieldFilter(String p_strFieldGuid, Date p_dtValue) makes a field filter WHERE (FIELD = p_dtValue)voidaddFieldFilterByName(String p_strFieldName, boolean p_bValue) makes a field filter WHERE (FIELD = p_bValue)voidaddFieldFilterByName(String p_strFieldName, double p_dValue) makes a field filter WHERE (FIELD = p_iValue)voidaddFieldFilterByName(String p_strFieldName, int p_iValue) makes a field filter WHERE (FIELD = p_ialue)voidaddFieldFilterByName(String p_strFieldName, IValueHolder<?> p_vh) makes a field filter WHERE (FIELD = p_vh) (case sensitive)voidaddFieldFilterByName(String p_strFieldName, Object p_value) makes a field filter WHERE (FIELD = p_value) (case sensitive)voidaddFieldFilterByName(String p_strFieldName, String p_strValue) makes a field filter WHERE (FIELD = p_strValue) (case sensitive)voidaddFieldFilterByName(String p_strFieldName, Date p_dtValue) makes a field filter WHERE (FIELD = p_dtValue)voidaddGuidFilter(String... p_guids) when set only items with one of that guid list is returnedvoidaddGuidFilter(Collection<String> p_guids) when set only items with one of that guid list is returnedvoidaddIdFilter(int... p_ids) when set only items with one of that id list is returnedvoidaddObjectFilter(de.uplanet.lucy.server.usermanager.IDsType p_type, boolean p_bWithDerivedTypes) Adds an DS Object filtervoidaddRecordFields(String... p_fieldGuids) adds new record colums, that should be read The guids can found in the constant classes @seeDS_OBJECT@seeDS_USER@seeDS_SET@seeDS_GROUP@seeDS_ROLE@seeDS_DISTLIST@seeDS_CONTAINER@seeDS_ORGUNITvoidaddRecordFields(Collection<String> p_fieldGuids) adds new record colums, that should be read The guids can found in the constant classes @seeDS_OBJECT@seeDS_USER@seeDS_SET@seeDS_GROUP@seeDS_ROLE@seeDS_DISTLIST@seeDS_CONTAINER@seeDS_ORGUNITvoidclears all field filtersvoidremoves the guid filter setvoidclears the id filter setvoidRemoves all object filtersgetDBFilterString(de.uplanet.jdbc.IDataSourceDescriptor p_desc) returns the filter string, that can be used in a sql like clausereturns the filter stringreturns a set of guids, that will be used for filteringset of ids, that will be used for filteringintThe count of records, from the last select.intSet<de.uplanet.lucy.server.usermanager.usecases.DsObjectFilter> returns a set of DS Object, that will be used for filteringde.uplanet.lucy.server.usermanager.usecases.EDsSortgetOrder()return the sort orderString[]intintbooleanbooleanReturn if field filters should combined as or expression?booleanbooleanbooleanreturn true if full record should be readmakeCopy()Makes a copy of current filter object, like clonebooleanvoidnoOrder()no order is usedvoidthe select result should be sort by namevoidthe select result should be sort by Object type (Container, User, Group...)voidthe select result should be sort by the priority and by the object typevoidthe select result should be sort by the given type priorityvoidthe select result should be sort by the priority and by the namevoidremoveFieldFilter(String p_strGuid) removes a field filter, that was set beforevoidremoveGuidFilter(String... p_guids) removes the given guids from the guid filtervoidremoveGuidFilter(List<String> p_guidList) removes the given guids from the guid filtervoidremoveIdFilter(int... p_ids) removes the given ids from the id filtervoidremoveObjectFilter(de.uplanet.lucy.server.usermanager.IDsType p_type) Removes a filter objectvoidreset()reset the current filter settingsvoidselectDeletedRecords(boolean p_bValue) if true, records that marked as deleted are returned toovoidselectDisabledRecords(boolean p_bValue) if true, records that marked as disabled are returned toovoidall Field Attributes will be returned (should used with care, the data size can be much high, e.g.void(default) only the id, guid, containerid, typeid and the name field attribute will be returnedvoidselectRecordFields(String... p_fieldGuids) set the record attributes, that should be read
The guids can found in the constant classesDS_CONTAINERDS_USERDS_SETDS_GROUPDS_ROLEDS_DISTLISTDS_CONTAINERDS_ORGUNITfield attributes set before will be replaced with this actual setvoidsetFieldFilterOrExpression(boolean p_bOrExpression) Combines field filters as or expressionvoidsetFilterAll(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.voidsetFilterString(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.voidsetLastRecordCount(int p_iCount) set the records count of the last selectvoidsetMaxTreeLevel(int p_iMaxLevel) Set the maximal count of tree levels should be read (-1for all).voidsetNeedsRecordCount(boolean p_bRecordCount) voidsetOrder(de.uplanet.lucy.server.usermanager.usecases.EDsSort p_sort) the select result should be sorted by the sort parameter seeEDsSortvoidsetOrderAscending(boolean p_bAscending) set the sort order (ascending or descending)voidSelect all (same assetSelectCount(-1)).voidsetSelectCount(int p_iCount) voidsetSelectIterator(IDsSelectIterator p_iter) Sets a iterator used for select.voidsetShouldLikeWithLower(boolean p_bLower) voidsetStartIndex(int p_iIdx) can be used for pageing, index of the first record (<= 0 for first record)booleanbooleanboolean
-
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 seeEDsSort- 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
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
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
- @see
DS_CONTAINER- @see
DS_ORGUNIT
- @see
- @see
- Parameters:
p_fieldGuids- The field guids to add.
- @see
-
addRecordFields
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
- @see
DS_CONTAINER- @see
DS_ORGUNIT
- @see
- @see
- Parameters:
p_fieldGuids- Adds the field guids.
- @see
-
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 @seeDsDefaultTypep_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 @seeDsDefaultType
-
clearObjectFilter
void clearObjectFilter()Removes all object filters -
setFilterString
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
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-1for all
-
getSelectCount
int getSelectCount()- Returns:
- maximum count returned (
-1for all)
-
setSelectAll
void setSelectAll()Select all (same assetSelectCount(-1)). -
setMaxTreeLevel
void setMaxTreeLevel(int p_iMaxLevel) Set the maximal count of tree levels should be read (-1for 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 of ids, that will be used for filtering- Returns:
- set of id filter
-
addGuidFilter
when set only items with one of that guid list is returned- Parameters:
p_guids- The guids to select
-
addGuidFilter
when set only items with one of that guid list is returned- Parameters:
p_guids- The guids to add
-
removeGuidFilter
removes the given guids from the guid filter- Parameters:
p_guids- Removes that field guids
-
removeGuidFilter
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
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-truefor or expression.
-
isFieldFilterOrExpression
boolean isFieldFilterOrExpression()Return if field filters should combined as or expression? -
addFieldFilter
makes a field filter WHERE (FIELD = p_ialue)- Parameters:
p_strFieldGuid- The field guidp_iValue- The compare value
-
addFieldFilter
makes a field filter WHERE (FIELD = p_bValue)- Parameters:
p_strFieldGuid- The field guidp_bValue- The compare value
-
addFieldFilter
makes a field filter WHERE (FIELD = p_iValue)- Parameters:
p_strFieldGuid- The field guidp_dValue- The compare value
-
addFieldFilter
makes a field filter WHERE (FIELD = p_dtValue)- Parameters:
p_strFieldGuid- The field guidp_dtValue- The compare value
-
addFieldFilter
makes a field filter WHERE (FIELD = p_strValue) (case sensitive)- Parameters:
p_strFieldGuid- The field guidp_strValue- The compare value
-
addFieldFilter
makes a field filter WHERE (FIELD = p_value) (case sensitive)- Parameters:
p_strFieldGuid- The field guidp_value- The compare value
-
addFieldFilter
makes a field filter WHERE (FIELD = p_vh) (case sensitive)- Parameters:
p_strFieldGuid- The field guidp_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 guidp_fieldFilter- The field filter with the compare value(s)
-
addFieldFilterByName
makes a field filter WHERE (FIELD = p_ialue)- Parameters:
p_strFieldName- The unique attribute name.p_iValue- The compare value
-
addFieldFilterByName
makes a field filter WHERE (FIELD = p_bValue)- Parameters:
p_strFieldName- The unique attribute name.p_bValue- The compare value
-
addFieldFilterByName
makes a field filter WHERE (FIELD = p_iValue)- Parameters:
p_strFieldName- The unique attribute name.p_dValue- The compare value
-
addFieldFilterByName
makes a field filter WHERE (FIELD = p_dtValue)- Parameters:
p_strFieldName- The unique attribute name.p_dtValue- The compare value
-
addFieldFilterByName
makes a field filter WHERE (FIELD = p_strValue) (case sensitive)- Parameters:
p_strFieldName- The unique attribute name.p_strValue- The compare value
-
addFieldFilterByName
makes a field filter WHERE (FIELD = p_value) (case sensitive)- Parameters:
p_strFieldName- The unique attribute name.p_value- The compare value
-
addFieldFilterByName
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
removes a field filter, that was set before- Parameters:
p_strGuid- The field guid
-
clearFieldFilter
void clearFieldFilter()clears all field filters -
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
Sets a iterator used for select.- Parameters:
p_iter- The iterator, could benull
-
getSelectIterator
IDsSelectIterator getSelectIterator()- Returns:
- The iterator used for select, could be null;
-
needsRecordCount
boolean needsRecordCount()- Returns:
- Returns
trueif SELECT COUNT(*) statement should called, otherwisefalse
-
setNeedsRecordCount
void setNeedsRecordCount(boolean p_bRecordCount) - Parameters:
p_bRecordCount-trueif the record count is needed otherwisefalse.
-