|
Clearspace API (1.7.0) Core Javadocs | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.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. |
| 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(java.lang.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. |
java.util.Date |
getCreationDateRangeMax()
Returns a date that represents the upper boundry for bans to be selected by the ban filter. |
java.util.Date |
getCreationDateRangeMin()
Returns the creation date that represents the lower boundary for bans to be filtered on. |
java.util.Date |
getExpirationDateRangeMax()
Returns a date that represents the upper boundry for bans to be selected by the ban filter. |
java.util.Date |
getExpirationDateRangeMin()
Returns the expiration date that represents the lower boundary for bans to be filtered on. |
java.lang.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(java.util.Date creationDateRangeMax)
Sets a date that represents the upper boundry for bans to be selected by the ban filter. |
void |
setCreationDateRangeMin(java.util.Date creationDateRangeMin)
Sets the date that represents the lower boundary for bans to be selected by the ban filter. |
void |
setExpirationDateRangeMax(java.util.Date expirationDateRangeMax)
Sets a date that represents the upper boundry for bans to be selected by the ban filter. |
void |
setExpirationDateRangeMin(java.util.Date expirationDateRangeMin)
Sets the date that represents the lower boundary for bans to be selected by the ban filter. |
void |
setIpAddress(java.lang.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, toString, 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()
public void setSortField(int sortField)
sortField - the field that will be used for sorting.public int getSortOrder()
public void setSortOrder(int sortOrder)
sortOrder - 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 java.lang.String getIpAddress()
public void setIpAddress(java.lang.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 java.util.Date getCreationDateRangeMin()
public void setCreationDateRangeMin(java.util.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).
creationDateRangeMin - Date representing the filter lowest value of
the creation date to be selected.public java.util.Date getCreationDateRangeMax()
public void setCreationDateRangeMax(java.util.Date creationDateRangeMax)
creationDateRangeMax - Date representing the filter lowest value of
the creation date range.public java.util.Date getExpirationDateRangeMin()
public void setExpirationDateRangeMin(java.util.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 java.util.Date getExpirationDateRangeMax()
public void setExpirationDateRangeMax(java.util.Date expirationDateRangeMax)
expirationDateRangeMax - Date representing the filter lowest value of
the expiration date range.public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object
|
Clearspace Project Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||