Jive Forums API (5.5.20.2-oracle) Developer Javadocs

com.jivesoftware.forum.webservices
Class AnnouncementFilter

java.lang.Object
  extended by com.jivesoftware.forum.webservices.AnnouncementFilter

public class AnnouncementFilter
extends java.lang.Object

Filters and sorts lists of announcements. Results may be filtered and/or sorted by userID and subject.

The class also supports pagination of announcements with the setStartIndex(int) and setNumResults(int) methods. If the start index is not set, it will begin at index 0. If the number of results is not set, it will be unbounded and return as many results as available.


Field Summary
static int ANNOUNCEMENT_SUBJECT
           
static int ASCENDING
           
static int DESCENDING
           
static int END_DATE
           
static int NULL_INT
          An integer value that represents NULL.
static int START_DATE
           
static int USER_ID
           
static int USER_NAME
           
 
Constructor Summary
AnnouncementFilter()
           
 
Method Summary
 java.lang.Object clone()
          Clones a AnnouncementFilter
 boolean equals(java.lang.Object o)
           
 java.util.Date getEndDateRangeMax()
          Returns the maximum end date on which results will be filtered.
 java.util.Date getEndDateRangeMin()
          Returns the minimum end date on which results will be filtered.
 int getNumResults()
          Returns the max number of results that should be returned.
 int getSortField()
          Returns the currently selected sort field.
 int getSortOrder()
          Returns the sort order.
 java.util.Date getStartDateRangeMax()
          Returns the maximum start date on which results will be filtered.
 java.util.Date getStartDateRangeMin()
          Returns the minimum start date on which results will be filtered.
 int getStartIndex()
          Returns the index of the first result to return.
 java.lang.String getSubject()
          Returns the subject string that results will be filtered on.
 long getUserID()
          Returns the userID that results will be filtered on.
 java.lang.String getUsername()
          Returns the user name string that results will be filtered on.
 int hashCode()
           
 boolean isCaseSensitive()
          Returns whether or not string matching is case sensitive.
 void setCaseSensitive(boolean caseSensitive)
          Sets case sensitivity for string matching
 void setEndDateRangeMax(java.util.Date endDateRangeMax)
          Sets the maximum end date on which results will be filtered.
 void setEndDateRangeMin(java.util.Date endDateRangeMin)
          Sets the minimum end date on which results will be filtered.
 void setNumResults(int numResults)
          Sets the limit on the number of results to be returned.
 void setSortField(int sortField)
          Sets the sort field to use.
 void setSortOrder(int sortOrder)
          Sets the sort order.
 void setStartDateRangeMax(java.util.Date startDateRangeMax)
          Sets the maximum start date on which results will be filtered.
 void setStartDateRangeMin(java.util.Date startDateRangeMin)
          Sets the minimum start date on which results will be filtered.
 void setStartIndex(int startIndex)
          Sets the index of the first result to return.
 void setSubject(java.lang.String subject)
          Sets the subject string that results will be filtered on.
 void setUserID(long userID)
          Sets the userID that results will be filtered on.
 void setUsername(java.lang.String username)
          Sets the user name string that results will be filtered on.
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DESCENDING

public static final int DESCENDING
See Also:
Constant Field Values

ASCENDING

public static final int ASCENDING
See Also:
Constant Field Values

USER_ID

public static final int USER_ID
See Also:
Constant Field Values

USER_NAME

public static final int USER_NAME
See Also:
Constant Field Values

ANNOUNCEMENT_SUBJECT

public static final int ANNOUNCEMENT_SUBJECT
See Also:
Constant Field Values

START_DATE

public static final int START_DATE
See Also:
Constant Field Values

END_DATE

public static final int END_DATE
See Also:
Constant Field Values

NULL_INT

public static final int NULL_INT
An integer value that represents NULL. The actual value is Integer.MAX_VALUE - 123 (an arbitrary number that has a very low probability of actually being selected by a user as a valid value).

See Also:
Constant Field Values
Constructor Detail

AnnouncementFilter

public AnnouncementFilter()
Method Detail

getUserID

public long getUserID()
Returns the userID that results will be filtered on. The method will return NULL_INT if no user has been specified. The method will return -1 if filtering is to take place on all "anonymous" users.

Returns:
the userID that results will be filtered on.

setUserID

public void setUserID(long userID)
Sets the userID that results will be filtered on. If you'd like to filter on "anonymous" users, pass in an id of -1. By default, no filtering on userID's will take place. If you'd like to change so that no filtering is performed, pass in AnnouncementFilter.NULL_INT.

Parameters:
userID - the user ID to filter on.

getUsername

public java.lang.String getUsername()
Returns the user name string that results will be filtered on. The method will return null if no string has been specified.

Returns:
the user name string that results will be filtered on.

setUsername

public void setUsername(java.lang.String username)
Sets the user name string that results will be filtered on. A match is made if the subject contains the match string.

Parameters:
username - the subject string to filter on.

getSubject

public java.lang.String getSubject()
Returns the subject string that results will be filtered on. The method will return null if no string has been specified.

Returns:
the subject string that results will be filtered on.

setSubject

public void setSubject(java.lang.String subject)
Sets the subject string that results will be filtered on. A match is made if the subject contains the specified string.

Parameters:
subject - the subject string to filter on.

getSortField

public int getSortField()
Returns the currently selected sort field. The default value is AnnouncementFilter.NULL_INT, which turns off sorting. Valid sort fields are: AnnouncementFilter.NULL_INT, AnnouncementFilter.USER_ID, AnnouncementFilter.USER_NAME, AnnouncementFilter.ANNOUNCEMENT_SUBJECT

Returns:
current sort field.

setSortField

public void setSortField(int sortField)
Sets the sort field to use. AnnouncementFilter.NULL_INT turns off sorting. Valid sort fields are: AnnouncementFilter.NULL_INT, AnnouncementFilter.USER_ID, AnnouncementFilter.USER_NAME, AnnouncementFilter.ANNOUNCEMENT_SUBJECT

Parameters:
sortField - the field that will be used for sorting.

getSortOrder

public int getSortOrder()
Returns the sort order. Valid sort orders are: AnnouncementFilter.ASCENDING, AnnouncementFilter.DESCENDING.

Returns:
the sort order.

setSortOrder

public void setSortOrder(int sortOrder)
Sets the sort order. Valid sort orders are: AnnouncementFilter.ASCENDING, AnnouncementFilter.DESCENDING.

Parameters:
sortOrder - the order that results will be sorted in.

getNumResults

public int getNumResults()
Returns the max number of results that should be returned.

Returns:
the max number of results to return.
See Also:
setStartIndex(int)

setNumResults

public void setNumResults(int numResults)
Sets the limit on the number of results to be returned. The default value 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.

Parameters:
numResults - the number of results to return.

getStartIndex

public int getStartIndex()
Returns the index of the first result to return.

Returns:
the index of the first result which should be returned.

setStartIndex

public void setStartIndex(int startIndex)
Sets the index of the first result to return. For example, if the start index is set to 20, the returned results will start at the 20th result in the query. This method can be used in combination with setNumResults(int) to perform pagination of results.

Parameters:
startIndex - the index of the first result to return.

getStartDateRangeMin

public java.util.Date getStartDateRangeMin()
Returns the minimum start date on which results will be filtered.

Returns:
the minimum start date.

setStartDateRangeMin

public void setStartDateRangeMin(java.util.Date startDateRangeMin)
Sets the minimum start date on which results will be filtered.

Parameters:
startDateRangeMin - the minimum start date.

getStartDateRangeMax

public java.util.Date getStartDateRangeMax()
Returns the maximum start date on which results will be filtered.

Returns:
the maximum start date.

setStartDateRangeMax

public void setStartDateRangeMax(java.util.Date startDateRangeMax)
Sets the maximum start date on which results will be filtered.

Parameters:
startDateRangeMax - the maximum start date.

getEndDateRangeMin

public java.util.Date getEndDateRangeMin()
Returns the minimum end date on which results will be filtered.

Returns:
the minimum end date.

setEndDateRangeMin

public void setEndDateRangeMin(java.util.Date endDateRangeMin)
Sets the minimum end date on which results will be filtered.

Parameters:
endDateRangeMin - the minimum end date.

getEndDateRangeMax

public java.util.Date getEndDateRangeMax()
Returns the maximum end date on which results will be filtered.

Returns:
the maximum end date.

setEndDateRangeMax

public void setEndDateRangeMax(java.util.Date endDateRangeMax)
Sets the maximum end date on which results will be filtered.

Parameters:
endDateRangeMax - the maximum end date.

isCaseSensitive

public boolean isCaseSensitive()
Returns whether or not string matching is case sensitive. False by default.

Returns:
case sensitivity.

setCaseSensitive

public void setCaseSensitive(boolean caseSensitive)
Sets case sensitivity for string matching

Parameters:
caseSensitive - case sensitivity.

clone

public java.lang.Object clone()
Clones a AnnouncementFilter

Overrides:
clone in class java.lang.Object

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

Jive Forums Project Page

Copyright © 1999-2006 Jive Software.