📄 resultfilter.java
字号:
* be selected by the result filter. If this value is not set the results filter will
* be unbounded for the latest creation date selected.
*
* @param creationDateRangeMax Date representing the filter lowest value of
* the creation date range.
*/
public void setCreationDateRangeMax(Date creationDateRangeMax) {
this.creationDateRangeMax = creationDateRangeMax;
}
/**
* Returns a date that represents the lower boundry for messages or threads to
* be selected by the result filter. If this value is not set it will return null
* and the results filter will be unbounded for the earliest modified date selected.
*
* @return a Date representing the filter lowest value of the modified date range.
*/
public Date getModifiedDateRangeMin() {
return modifiedDateRangeMin;
}
/**
* Sets a date that represents the lower boundry for messages or threads to
* be selected by the result filter. If this value is not set the results filter will
* be unbounded for the earliest modified date selected.
*
* @param modifiedDateRangeMin Date representing the filter lowest value of
* the modified date to be selected.
*/
public void setModifiedDateRangeMin(Date modifiedDateRangeMin) {
this.modifiedDateRangeMin = modifiedDateRangeMin;
}
/**
* Returns a date that represents the upper boundry for messages or threads to
* be selected by the result filter. If this value is not set it will return null
* and the results filter will be unbounded for the latest modified date selected.
*
* @return a Date representing the filter highest value of the modified date to be
* selected.
*/
public Date getModifiedDateRangeMax() {
return modifiedDateRangeMax;
}
/**
* Sets a date that represents the upper boundry for messages or threads to
* be selected by the result filter. If this value is not set the results filter will
* be unbounded for the latest modified date selected.
*
* @param modifiedDateRangeMax Date representing the filter lowest value of
* the modified date range.
*/
public void setModifiedDateRangeMax(Date modifiedDateRangeMax) {
this.modifiedDateRangeMax = modifiedDateRangeMax;
}
/*
* Returns the currently selected sort field. Default is
* JiveGlobals.MODIFIED_DATE.
*
* @return current sort field.
*/
public int getSortField() {
return sortField;
}
/**
* Sets the sort field to use. Default is JiveGlobals.MODIFIED_DATE .
* If the sortField is set to JiveGlobals.EXTENDED_PROPERTY, the name of
* the property must be set by a subsequent call to
* setSortPropertyName(String).
*
* @param sortField the field that will be used for sorting.
*/
public void setSortField(int sortField) {
this.sortField = sortField;
}
/**
* Returns the name of the extended property that will be sorted on.
* Returns null if sorting will not be done on a property.
*
* @return the extended property that will be sorted on.
*/
public String getSortPropertyName() {
return this.sortPropertyName;
}
/**
* Sets the property name to sort on. You must also call the setSortField(int)
* method with JiveGlobals.EXTENDED_PROPERTY as an argument.
*
* @param propertyName the name of the extended property to sort on.
*/
public void setSortPropertyName(String sortPropertyName) {
this.sortPropertyName = sortPropertyName;
}
/**
* Returns the sort order, which will be ResultFilter.ASCENDING for
* ascending sorting, or ResultFilter.DESCENDING for descending sorting.
* Descending sorting is: 3, 2, 1, etc. Ascending sorting is 1, 2, 3, etc.
*
* @retun the sort order.
*/
public int getSortOrder() {
return this.sortOrder;
}
/**
* Sets the sort type. Valid arguments are ResultFilter.ASCENDING for
* ascending sorting or ResultFilter.DESCENDING for descending sorting.
* Descending sorting is: 3, 2, 1, etc. Ascending sorting is 1, 2, 3, etc.
*
* @param sortOrder the order that results will be sorted in.
*/
public void setSortOrder(int sortOrder) {
if (! (sortOrder == ResultFilter.ASCENDING ||
sortOrder == ResultFilter.DESCENDING)
)
{
throw new IllegalArgumentException();
}
this.sortOrder = sortOrder;
}
/**
* Returns the max number of results that should be returned.
* The default value for is 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.
*
* @return the max number of results to return.
* @see #setStartIndex(int)
*/
public int getNumResults() {
return numResults;
}
/**
* Sets the limit on the number of results to be returned.
*
* @param numResults the number of results to return.
*/
public void setNumResults(int numResults) {
this.numResults = numResults;
}
/**
* Returns the index of the first result to return.
*
* @return the index of the first result which should be returned.
*/
public int getStartIndex() {
return startIndex;
}
/**
* Sets the index of the first result to return. For example, if the start
* index is set to 20, the Iterator returned will start at the 20th result
* in the query. This method can be used in combination with
* setNumResults(int) to perform pagination of results.
*
* @param startIndex the index of the first result to return.
*/
public void setStartIndex(int startIndex) {
this.startIndex = startIndex;
}
/**
* Returns the moderation value that represents the lower boundry for
* messages or threads to be selected by the result filter. If this value
* is not set it will return the lowest moderation value allowed and the
* results filter will be unbounded for the lowest moderation value selected.
*
* For example if boolean moderation is being used, the possible values that
* can be expected of a message are -1 for rejected messages, 0 unapproved
* messages, and 1 for approved messages. To show messages available
* for the general public, you would pass this accessor a minimum value
* of 1 and a maximum value of 1 or higher. To show messages in need of
* moderation you would pass this accessor a minimum value of 0 and a
* maximum value of 0. To show messages in need of moderation in the
* context of threads that are already approved, you would pass this accessor
* a minumum value of 0 and a maximum value of 1.
*
* @return an int representing the lowest value of the moderation value to be
* selected by the filter.
*/
public int getModerationRangeMin() {
return moderationRangeMin;
}
/**
* Sets the moderation value that represents the lower bound for messages
* or threads to be selected by the result filter. If this value is not
* set, the lower bound will default to minimum set for the forum. If you
* would like the moderation range to have now lower bound, simply pass in
* a sufficiently small number such as
*
* @param moderationRangeMin int representing the lowest value of
* the moderation value range to be selected by the result filter.
*/
public void setModerationRangeMin(int moderationRangeMin) {
this.moderationRangeMin = moderationRangeMin;
}
/**
* Returns the moderation value that represents the upper bound for
* messages or threads to be selected by the result filter. If an upper
* bound has not been set, this method will return ResultFilter.NULL_INT.
*
* @return the upper bound for moderation values to filter on.
*/
public int getModerationRangeMax() {
return moderationRangeMax;
}
/**
* Sets the upper bound for the moderation value that will pass the
* result filter. If this value is not set, or is set to
* ResultFilter.NULL_INT there will be no upper bound on moderation values.
*
* @param moderationRangeMax the max value of the moderation value range.
*/
public void setModerationRangeMax(int moderationRangeMax) {
this.moderationRangeMax = moderationRangeMax;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -