Interface IDsSelectFilter
public interface IDsSelectFilter
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addFieldFilter
(String p_strFieldGuid, boolean p_bValue) makes a field filter WHERE (FIELD = p_bValue)void
addFieldFilter
(String p_strFieldGuid, double p_dValue) makes a field filter WHERE (FIELD = p_iValue)void
addFieldFilter
(String p_strFieldGuid, int p_iValue) makes a field filter WHERE (FIELD = p_ialue)void
addFieldFilter
(String p_strFieldGuid, IValueHolder<?> p_vh) makes a field filter WHERE (FIELD = p_vh) (case sensitive)void
addFieldFilter
(String p_strFieldGuid, de.uplanet.lucy.server.usermanager.usecases.DsFieldFilter p_fieldFilter) makes a field filtervoid
addFieldFilter
(String p_strFieldGuid, Object p_value) makes a field filter WHERE (FIELD = p_value) (case sensitive)void
addFieldFilter
(String p_strFieldGuid, String p_strValue) makes a field filter WHERE (FIELD = p_strValue) (case sensitive)void
addFieldFilter
(String p_strFieldGuid, Date p_dtValue) makes a field filter WHERE (FIELD = p_dtValue)void
addFieldFilterByName
(String p_strFieldName, boolean p_bValue) makes a field filter WHERE (FIELD = p_bValue)void
addFieldFilterByName
(String p_strFieldName, double p_dValue) makes a field filter WHERE (FIELD = p_iValue)void
addFieldFilterByName
(String p_strFieldName, int p_iValue) makes a field filter WHERE (FIELD = p_ialue)void
addFieldFilterByName
(String p_strFieldName, IValueHolder<?> p_vh) makes a field filter WHERE (FIELD = p_vh) (case sensitive)void
addFieldFilterByName
(String p_strFieldName, Object p_value) makes a field filter WHERE (FIELD = p_value) (case sensitive)void
addFieldFilterByName
(String p_strFieldName, String p_strValue) makes a field filter WHERE (FIELD = p_strValue) (case sensitive)void
addFieldFilterByName
(String p_strFieldName, Date p_dtValue) makes a field filter WHERE (FIELD = p_dtValue)void
addGuidFilter
(String... p_guids) when set only items with one of that guid list is returnedvoid
addGuidFilter
(Collection<String> p_guids) when set only items with one of that guid list is returnedvoid
addIdFilter
(int... p_ids) when set only items with one of that id list is returnedvoid
addObjectFilter
(de.uplanet.lucy.server.usermanager.IDsType p_type, boolean p_bWithDerivedTypes) Adds an DS Object filtervoid
addRecordFields
(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_ORGUNIT
void
addRecordFields
(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_ORGUNIT
void
clears all field filtersvoid
removes the guid filter setvoid
clears the id filter setvoid
Removes 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 filteringint
The count of records, from the last select.int
Set
<de.uplanet.lucy.server.usermanager.usecases.DsObjectFilter> returns a set of DS Object, that will be used for filteringde.uplanet.lucy.server.usermanager.usecases.EDsSort
getOrder()
return the sort orderString[]
int
int
boolean
boolean
Return if field filters should combined as or expression?boolean
boolean
boolean
return true if full record should be readmakeCopy()
Makes a copy of current filter object, like cloneboolean
void
noOrder()
no order is usedvoid
the select result should be sort by namevoid
the select result should be sort by Object type (Container, User, Group...)void
the select result should be sort by the priority and by the object typevoid
the select result should be sort by the given type priorityvoid
the select result should be sort by the priority and by the namevoid
removeFieldFilter
(String p_strGuid) removes a field filter, that was set beforevoid
removeGuidFilter
(String... p_guids) removes the given guids from the guid filtervoid
removeGuidFilter
(List<String> p_guidList) removes the given guids from the guid filtervoid
removeIdFilter
(int... p_ids) removes the given ids from the id filtervoid
removeObjectFilter
(de.uplanet.lucy.server.usermanager.IDsType p_type) Removes a filter objectvoid
reset()
reset the current filter settingsvoid
selectDeletedRecords
(boolean p_bValue) if true, records that marked as deleted are returned toovoid
selectDisabledRecords
(boolean p_bValue) if true, records that marked as disabled are returned toovoid
all 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 returnedvoid
selectRecordFields
(String... p_fieldGuids) set the record attributes, that should be read
The guids can found in the constant classesDS_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 setvoid
setFieldFilterOrExpression
(boolean p_bOrExpression) Combines field filters as or expressionvoid
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.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.void
setLastRecordCount
(int p_iCount) set the records count of the last selectvoid
setMaxTreeLevel
(int p_iMaxLevel) Set the maximal count of tree levels should be read (-1
for all).void
setNeedsRecordCount
(boolean p_bRecordCount) void
setOrder
(de.uplanet.lucy.server.usermanager.usecases.EDsSort p_sort) the select result should be sorted by the sort parameter seeEDsSort
void
setOrderAscending
(boolean p_bAscending) set the sort order (ascending or descending)void
Select all (same assetSelectCount(-1)
).void
setSelectCount
(int p_iCount) void
setSelectIterator
(IDsSelectIterator p_iter) Sets a iterator used for select.void
setShouldLikeWithLower
(boolean p_bLower) void
setStartIndex
(int p_iIdx) can be used for pageing, index of the first record (<= 0 for first record)boolean
boolean
boolean
-
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 @seeDsDefaultType
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 @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-1
for all
-
getSelectCount
int getSelectCount()- Returns:
- maximum count returned (
-1
for 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 (-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 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
-true
for 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
true
if SELECT COUNT(*) statement should called, otherwisefalse
-
setNeedsRecordCount
void setNeedsRecordCount(boolean p_bRecordCount) - Parameters:
p_bRecordCount
-true
if the record count is needed otherwisefalse
.
-