|
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.QuestionFilter
public class QuestionFilter
Filters and sorts lists of questions from QuestionManager.
| Nested Class Summary | |
|---|---|
static class |
QuestionFilter.SortField
Type-safe enumeration for field that be sorted on. |
| Field Summary | |
|---|---|
static int |
ASCENDING
Ascending sort (ie 3, 4, 5...). |
static int |
DESCENDING
Descending sort (ie 3, 2, 1...). |
static int |
NULL_INT
An integer value that represents NULL. |
| Constructor Summary | |
|---|---|
QuestionFilter()
Constructs a new QuestionFilter. |
|
| Method Summary | |
|---|---|
void |
addProperty(String name,
String value)
Adds a property to the list of properties that will be filtered on. |
void |
addResolutionState(Question.State resolutionState)
Adds a resolution state to the set of states that will be included in filtered results. |
void |
clearResolutionStates()
Removes all resolution states from the set of states that will be included in filtered results. |
Object |
clone()
Clones a ResultFilter |
boolean |
equals(Object o)
|
Date |
getCreationDateRangeMax()
Returns a date that represents the upper boundry for messages or threads to be selected by the result filter. |
Date |
getCreationDateRangeMin()
Returns the creation date that represents the lower boundary for messages or threads to be filtered on. |
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. |
String |
getPropertyName(int index)
Returns the name of the property at the specified index in the list of properties to be filtered on. |
String |
getPropertyValue(int index)
Returns the value of the property at the specified index in the list of properties to be filtered on. |
Date |
getResolutionDateRangeMax()
Returns a date that represents the upper boundry for the resolution date of questions to be selected by the result filter. |
Date |
getResolutionDateRangeMin()
Returns a date that represents the lower boundary for the resolution date of questions to be selected by the result filter. |
Set<Question.State> |
getResolutionStates()
Returns the set resolution states that will be included in filtered results. |
QuestionFilter.SortField |
getSortField()
Returns the currently selected sort field. |
int |
getSortOrder()
Returns the sort order, which will be ASCENDING for
ascending sorting, or 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. |
long |
getUserID()
Returns the ID of the creator of questions that results will be filtered on. |
int |
hashCode()
|
boolean |
isGroupByContainer()
Returns true if results will be grouped by community. |
void |
removeResolutionState(Question.State resolutionState)
Removes a resolution state from the set of states that will be included in filtered results. |
void |
setCreationDateRangeMax(Date creationDateRangeMax)
Sets a date that represents the upper boundry for messages or threads to be selected by the result filter. |
void |
setCreationDateRangeMin(Date creationDateRangeMin)
Sets the date that represents the lower boundary for messages or threads to be selected by the result filter. |
void |
setGroupByContainer(boolean groupByContainer)
Sets whether to group results by community. |
void |
setNumResults(int numResults)
Sets the limit on the number of results to be returned. |
void |
setResolutionDateRangeMax(Date resolutionnDateRangeMax)
Sets a date that represents the upper boundry for the resolution date of questions to be selected by the result filter. |
void |
setResolutionDateRangeMin(Date resolutionDateRangeMin)
Sets a date that represents the lower boundary for messages or threads to be selected by the result filter. |
void |
setSortField(QuestionFilter.SortField 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 |
setUserID(long userID)
Sets the creator of questions that results will be filtered on. |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int DESCENDING
public static final int ASCENDING
public static final int NULL_INT
| Constructor Detail |
|---|
public QuestionFilter()
| Method Detail |
|---|
public Set<Question.State> getResolutionStates()
public void addResolutionState(Question.State resolutionState)
resolutionState - resolution state.public void removeResolutionState(Question.State resolutionState)
resolutionState - resolution state.public void clearResolutionStates()
public long getUserID()
public void setUserID(long userID)
userID - the user to filter on.
public void addProperty(String name,
String value)
name - the name of the property to filter on.value - the value of the property that results must match.public int getPropertyCount()
public String getPropertyName(int index)
public String getPropertyValue(int index)
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 millesecond 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 - Date representing the filter lowest value of
the creation date to be selected.public Date getCreationDateRangeMax()
public void setCreationDateRangeMax(Date creationDateRangeMax)
creationDateRangeMax - Date representing the filter lowest value of
the creation date range.public Date getResolutionDateRangeMin()
public void setResolutionDateRangeMin(Date resolutionDateRangeMin)
resolutionDateRangeMin - Date representing the filter lowest value of
the modified date to be selected.public Date getResolutionDateRangeMax()
public void setResolutionDateRangeMax(Date resolutionnDateRangeMax)
resolutionnDateRangeMax - Date representing the filter lowest value of
the modified date range.public QuestionFilter.SortField getSortField()
QuestionFilter.SortField.creation_date. If the sortField is set to
QuestionFilter.SortField.extended_property, the name of the property must be
set by a subsequent call to setSortPropertyName(String).
public void setSortField(QuestionFilter.SortField sortField)
QuestionFilter.SortField.creation_date. If the sortField is set to
QuestionFilter.SortField.extended_property, the name of the property must be
set by a subsequent call to setSortPropertyName(String).
sortField - the field that will be used for sorting.public String getSortPropertyName()
public void setSortPropertyName(String sortPropertyName)
setSortField(com.jivesoftware.community.QuestionFilter.SortField) method with
QuestionFilter.SortField.extended_property as an argument.
sortPropertyName - the name of the extended property to sort on.public int getSortOrder()
ASCENDING for
ascending sorting, or DESCENDING for descending sorting.
Descending sorting is: 3, 2, 1, etc. Ascending sorting is 1, 2, 3, etc.
public void setSortOrder(int sortOrder)
ASCENDING for
ascending sorting or DESCENDING for descending sorting.
Descending sorting is: 3, 2, 1, etc. Ascending sorting is 1, 2, 3, etc.
sortOrder - the order that results will be sorted in.public boolean isGroupByContainer()
public void setGroupByContainer(boolean groupByContainer)
groupByContainer - true to group results by community.public int getNumResults()
NULL_INT, which means there will be no limit
on the number of results. This method can be used in combination with
setStartIndex(int) to perform pagination of results.
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 Object clone()
clone in class Objectpublic boolean equals(Object o)
equals in class Objectpublic int hashCode()
hashCode in class Object
|
Jive Product Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||