|
Jive API (3.0.13) Core Javadocs | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jivesoftware.community.ResultFilter
public abstract class ResultFilter
Abstract base class for Jive SBS result filters.
| Field Summary | |
|---|---|
static int |
AND_MODE
'AND' mode. |
static int |
ASCENDING
Ascending sort (ie 3, 4, 5...). |
static int |
CONTAINS_MATCH
Contains match. |
static int |
DESCENDING
Descending sort (ie 3, 2, 1...). |
static int |
EXACT_MATCH
Exact match. |
static int |
NULL_INT
An integer value that represents NULL. |
static int |
OR_MODE
'OR' mode; |
| Constructor Summary | |
|---|---|
ResultFilter()
|
|
| Method Summary | |
|---|---|
void |
addProperty(String name,
String value)
Adds a property to the list of properties that will be filtered on. |
void |
addProperty(String name,
String value,
int matchType)
Adds a property to the list of properties that will be filtered on. |
void |
addTag(ContentTag tag)
Adds a ContentTag to the list of tags to filter on. |
static ResultFilter |
createDefaultContentFilter()
Creates a default ResultFilter: no filtering with results sorted on the modification date. |
static ResultFilter |
createDefaultRecursiveContentFilter()
Creates a default recursive ResultFilter: no filtering with results sorted on the modification date. |
boolean |
equals(Object o)
|
Date |
getCreationDateRangeMax()
Returns the date that represents the upper boundry for creation dates that will pass the result filter. |
Date |
getCreationDateRangeMin()
Returns the date that represents the lower boundry for creation dates that will pass the result filter. |
Date |
getModificationDateRangeMax()
Returns the date that represents the upper boundry for modification dates that will pass the result filter. |
Date |
getModificationDateRangeMin()
Returns the date that represents the lower boundry for modification dates that will pass the result filter. |
int |
getNumResults()
Returns the max number of results that should be returned. |
int |
getPropertyCount()
Returns the number of properties that results will be filtered on. |
int |
getPropertyMatchType(int index)
Returns the value of the property at the specified index in the list of properties. |
int |
getPropertyMode()
Returns the mode that will be used to select results if multiple properties have been specified. |
String |
getPropertyName(int index)
Returns the name of the property at the specified index in the list of properties to be filtered on. |
Object |
getPropertyValue(int index)
Returns the value of the property at the specified index in the list of properties to be filtered on. |
String |
getPropertyValueString(int index)
Returns the value of the property at the specified index in the list of properties to be filtered on. |
int |
getSortField()
Returns the currently selected sort field. |
int |
getSortOrder()
Returns the sort order, which will be ResultFilter.ASCENDING for ascending sorting, or ResultFilter.DESCENDING for descending sorting. |
String |
getSortPropertyName()
Returns the name of the extended property that will be sorted on. |
int |
getStartIndex()
Returns the index of the first result to return. |
Collection<ContentTag> |
getTags()
Returns the the ContentTags to filter on. |
long |
getUserID()
Returns the userID that results will be filtered on. |
int |
hashCode()
|
boolean |
isAllTagsRequired()
Returns true if the content must be tagged with every tag contained in getTags(). |
boolean |
isPerformDistinctCount()
If the query is a count query, this property indicates whether a distinct count shoud be performed. |
boolean |
isRecursive()
If true, the result filter will return content from all sub-communities of specified community, including content from sub-communities of sub-communities, etc. |
void |
setAllTagsRequired(boolean allTagsRequired)
Sets whether or not the content must be tagged with every tag contained in getTags(). |
void |
setCreationDateRangeMax(Date creationDateRangeMax)
Sets the date that represents the upper boundry for creation dates that will pass the result filter If this value is not set the result filter will be unbounded for the latest creation date selected. |
void |
setCreationDateRangeMin(Date creationDateRangeMin)
Sets the date that represents the lower boundry for creation dates that will pass the result filter. |
void |
setModificationDateRangeMax(Date modificationDateRangeMax)
Sets the date that represents the upper boundry for modification dates that will pass the result filter. |
void |
setModificationDateRangeMin(Date modificationDateRangeMin)
Sets the date that represents the lower boundry for modification dates that will pass the result filter. |
void |
setNumResults(int numResults)
Sets the limit on the number of results to be returned. |
void |
setPerformDistinctCount(boolean performDistinctCount)
Sets the mode so that if a count query is performed it will use a distinct count operation. |
void |
setPropertyMode(int propertyMode)
Sets the mode that will be used to select results if multiple properties have been specified. |
void |
setRecursive(boolean recursive)
Sets the recursive value of queries. |
void |
setSortField(int sortField)
Sets the sort field to use. |
void |
setSortOrder(int sortOrder)
Sets the sort type. |
void |
setSortPropertyName(String sortPropertyName)
Sets the property name to sort on. |
void |
setStartIndex(int startIndex)
Sets the index of the first result to return. |
void |
setTags(Collection<ContentTag> tags)
Sets the ContentTags to filter on. |
void |
setUserID(long userID)
Sets the userID that results will be filtered on. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int DESCENDING
public static final int ASCENDING
public static final int EXACT_MATCH
public static final int CONTAINS_MATCH
public static final int AND_MODE
public static final int OR_MODE
public static final int NULL_INT
| Constructor Detail |
|---|
public ResultFilter()
| Method Detail |
|---|
public static ResultFilter createDefaultContentFilter()
public static ResultFilter createDefaultRecursiveContentFilter()
public long getUserID()
public void setUserID(long userID)
userID - the user ID to filter on.
public void addProperty(String name,
String value)
OR_MODE is specified and multiple properties to filter upon have been given, then the comment will not
be filtered out if any of the other properties match.
name - the name of the property to filter on.value - the value of the property that results must match.
public void addProperty(String name,
String value,
int matchType)
EXACT_MATCH and CONTAINS_MATCH. The exact match will match the following:
name - the name of the property to filter on.value - the value of the property that results must match.matchType - the type of match to perform, one of EXACT_MATCH or CONTAINS_MATCHpublic int getPropertyMode()
AND_MODE which specifies that all properties must match for the object to be selected. OR_MODE is useful if you want objects to be returned if any of the properties match.
public void setPropertyMode(int propertyMode)
AND_MODE
(the default) specifies that all properties must match for the object to be selected. OR_MODE is useful
if you want objects to be returned if any of the properties match.
propertyMode - the mode that will be used to select results if multiple properties have been specified.public int getPropertyCount()
public String getPropertyName(int index)
index - the index of the property in the property list
public Object getPropertyValue(int index)
The object that normally is returned is a String, however if multiple properties are added in
OR_MODE
with the same name and match type a list will be returned instead.
index - the index of the property in the property list
public String getPropertyValueString(int index)
If multiple properties are added in
OR_MODE with the same name and match type, the first value in the
list of values at that index will be returned.
index - the index of the property in the property list
public int getPropertyMatchType(int index)
EXACT_MATCH will be returned.
index - the index of the property in the properties list
public boolean isPerformDistinctCount()
public void setPerformDistinctCount(boolean performDistinctCount)
performDistinctCount - true if query should be performed using a distinct countpublic void addTag(ContentTag tag)
ContentTag to the list of tags to filter on. If any tags have been added to the list, only results
with at least one of the tags will be returned.
tag - the ContentTag to filter on.public void setTags(Collection<ContentTag> tags)
ContentTags to filter on. Only results with at least one of the tags will be returned.
tags - the ContentTags to filter on.public Collection<ContentTag> getTags()
ContentTags to filter on.
ContentTags to filter on.public boolean isAllTagsRequired()
public void setAllTagsRequired(boolean allTagsRequired)
allTagsRequired - true if the content must be tagged with every tag contained in getTags().public Date getCreationDateRangeMin()
public void setCreationDateRangeMin(Date creationDateRangeMin)
Setting a date range for a ResultFilter is a potential performance bottleneck. For example, if the argument for the date range is "new Date()" then the corresponding database query will map to an accuracy of a particular millisecond in time. This means that the results can't be cached. A better solution is to round dates to the nearest minute, hour, etc (whatever accuracy you need).
creationDateRangeMin - a date representing the lowest value of the creation date to be selected.public Date getCreationDateRangeMax()
public void setCreationDateRangeMax(Date creationDateRangeMax)
creationDateRangeMax - a date representing the highest value of the creation date to be selected.public Date getModificationDateRangeMin()
public void setModificationDateRangeMin(Date modificationDateRangeMin)
modificationDateRangeMin - a date representing the lowest value of the modification date to be selected.public Date getModificationDateRangeMax()
public void setModificationDateRangeMax(Date modificationDateRangeMax)
modificationDateRangeMax - a date representing the highest value of the modification date range to be
selected.public int getSortField()
public void setSortField(int sortField)
sortField - the field that will be used for sorting.public String getSortPropertyName()
public void setSortPropertyName(String sortPropertyName)
sortPropertyName - the name of the extended property to sort on.public int getSortOrder()
public void setSortOrder(int sortOrder)
sortOrder - the order that results will be sorted in.public int getNumResults()
setStartIndex(int)public void setNumResults(int numResults)
numResults - the number of results to return.public int getStartIndex()
public void setStartIndex(int startIndex)
startIndex - the index of the first result to return.public boolean isRecursive()
public void setRecursive(boolean recursive)
recursive - true if this result filter should return recursive content, false otherwise.public boolean equals(Object o)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic String toString()
toString in class Object
|
Jive Product Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||