|
Clearspace API (2.5.18) Core Javadocs | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jivesoftware.community.ResultFilter
com.jivesoftware.community.BanFilter
public class BanFilter
Filters and sorts lists of Ban objects. This allows for a very rich set of possible queries that
can be run on ban data.
| Field Summary | |
|---|---|
static int |
ASCENDING
Ascending sort (ie 3, 4, 5...). |
static int |
CREATION_DATE
An integer value that represents the modification date filed. |
static int |
DESCENDING
Descending sort (ie 3, 2, 1...). |
static int |
EXPIRATION_DATE
An integer value that represents the creation date filed. |
| Fields inherited from class com.jivesoftware.community.ResultFilter |
|---|
AND_MODE, CONTAINS_MATCH, EXACT_MATCH, NULL_INT, OR_MODE |
| Constructor Summary | |
|---|---|
BanFilter()
|
|
| Method Summary | |
|---|---|
static BanFilter |
createDefaultBanFilter()
Creates a default BanFilter: Filters out expired bans with results sorted by expiration date in descending order. |
boolean |
equals(Object o)
|
long |
getAdminID()
Gets the currently selected admin ID that bans will be filtered on. |
long |
getBanLevel()
Gets the currently selected BanLevel that bans will be filtered on. |
long |
getBannedUserID()
Returns the ID of the user that bans will be filtered on. |
int |
getBanType()
Gets the currently selected ban type. |
Date |
getCreationDateRangeMax()
Returns a date that represents the upper boundry for bans to be selected by the ban filter. |
Date |
getCreationDateRangeMin()
Returns the creation date that represents the lower boundary for bans to be filtered on. |
Date |
getExpirationDateRangeMax()
Returns a date that represents the upper boundry for bans to be selected by the ban filter. |
Date |
getExpirationDateRangeMin()
Returns the expiration date that represents the lower boundary for bans to be filtered on. |
String |
getIpAddress()
Gets the currently selected IP address that bans will be filtered on. |
int |
getSortField()
Returns the currently selected sort field. |
int |
getSortOrder()
Sets the currently selected sort order. |
int |
hashCode()
|
void |
setAdminID(long adminID)
Sets the currently selected admin ID that bans will be filtered on. |
void |
setBanLevel(long banLevel)
Sets the currently selected BanLevel that bans will be filtered on. |
void |
setBannedUserID(long bannedUserID)
Sets the ID of the user that bans will be filtered on. |
void |
setBanType(int banType)
Sets the currently selected ban type. |
void |
setCreationDateRangeMax(Date creationDateRangeMax)
Sets a date that represents the upper boundry for bans to be selected by the ban filter. |
void |
setCreationDateRangeMin(Date creationDateRangeMin)
Sets the date that represents the lower boundary for bans to be selected by the ban filter. |
void |
setExpirationDateRangeMax(Date expirationDateRangeMax)
Sets a date that represents the upper boundry for bans to be selected by the ban filter. |
void |
setExpirationDateRangeMin(Date expirationDateRangeMin)
Sets the date that represents the lower boundary for bans to be selected by the ban filter. |
void |
setIpAddress(String ipAddress)
Sets the currently selected IP address that bans will be filtered on. |
void |
setSortField(int sortField)
Sets the currently selected sort field. |
void |
setSortOrder(int sortOrder)
Sets the currently selected sort order. |
| 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 EXPIRATION_DATE
public static final int CREATION_DATE
| Constructor Detail |
|---|
public BanFilter()
| Method Detail |
|---|
public static BanFilter createDefaultBanFilter()
BanFilter sorting by expiration date in descending order.
Expired bans will not be shown with this default filterpublic int getSortField()
getSortField in class ResultFilterpublic void setSortField(int sortField)
setSortField in class ResultFiltersortField - the field that will be used for sorting.public int getSortOrder()
getSortOrder in class ResultFilterpublic void setSortOrder(int sortOrder)
setSortOrder in class ResultFiltersortOrder - the order that will be used for sorting.public int getBanType()
public void setBanType(int banType)
banType - the ban type to filter or -1 for all ban typespublic long getBannedUserID()
public void setBannedUserID(long bannedUserID)
bannedUserID - the ID of the user that bans will be filtered on or -1 if there is no user filtering.public String getIpAddress()
public void setIpAddress(String ipAddress)
ipAddress - the currently selected IP adress that bans will be filtered on, or null if there is no IP
address filtering.public long getAdminID()
public void setAdminID(long adminID)
adminID - the ID of the admin that bans will be filtered on or -1 if bans should not be filtered by an
admin ID.public long getBanLevel()
BanLevel that bans will be filtered on. This method will return -1 if a
BanLevel has not been specified.
BanLevel that bans will be filtered on or -1 if a BanLevel
has not been specified.public void setBanLevel(long banLevel)
BanLevel that bans will be filtered on. If a BanLevel is not
specified, bans will not be filtered by a specific BanLevel. To change so that bans will not be filtered
by a BanLevel set the ban level to -1.
banLevel - the BanLevel of the banpublic Date getCreationDateRangeMin()
getCreationDateRangeMin in class ResultFilterpublic void setCreationDateRangeMin(Date creationDateRangeMin)
Setting a date range for a BanFilter 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).
setCreationDateRangeMin in class ResultFiltercreationDateRangeMin - Date representing the filter lowest value of
the creation date to be selected.public Date getCreationDateRangeMax()
getCreationDateRangeMax in class ResultFilterpublic void setCreationDateRangeMax(Date creationDateRangeMax)
setCreationDateRangeMax in class ResultFiltercreationDateRangeMax - Date representing the filter lowest value of
the creation date range.public Date getExpirationDateRangeMin()
public void setExpirationDateRangeMin(Date expirationDateRangeMin)
Setting a date range for a BanFilter 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).
expirationDateRangeMin - Date representing the filter lowest value of
the expiration date to be selected.public Date getExpirationDateRangeMax()
public void setExpirationDateRangeMax(Date expirationDateRangeMax)
expirationDateRangeMax - Date representing the filter lowest value of
the expiration date range.public boolean equals(Object o)
equals in class ResultFilterpublic int hashCode()
hashCode in class ResultFilter
|
Clearspace Project Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||