Package io.manebot.database.model
Class UserBan
- java.lang.Object
-
- io.manebot.database.model.TimedRow
-
- io.manebot.database.model.UserBan
-
-
Method Summary
Modifier and Type Method Description User
getBanningUser()
Gets the user that created this ban record, null if no reason was supplied.java.util.Date
getDate()
Gets the date that the ban was created.java.util.Date
getEnd()
Gets the date that the ban ends, null if there is no end.java.lang.String
getReason()
Gets the reason for the user being banned.User
getUser()
Gets the user that was banned.int
getUserBanId()
int
hashCode()
boolean
isPardoned()
Finds if the ban has been pardoned.void
pardon()
Pardons the ban.-
Methods inherited from class io.manebot.database.model.TimedRow
getCreated, getCreatedDate, getUpdated, getUpdatedDate, setCreated, setCreated, setCreatedDate, setUpdated, setUpdated, setUpdatedDate
-
-
-
-
Method Detail
-
getUserBanId
public int getUserBanId()
-
getUser
public User getUser()
Description copied from interface:UserBan
Gets the user that was banned.
-
getReason
public java.lang.String getReason()
Description copied from interface:UserBan
Gets the reason for the user being banned.
-
getBanningUser
public User getBanningUser()
Description copied from interface:UserBan
Gets the user that created this ban record, null if no reason was supplied.- Specified by:
getBanningUser
in interfaceUserBan
- Returns:
- ban reason.
-
getDate
public java.util.Date getDate()
Description copied from interface:UserBan
Gets the date that the ban was created.
-
getEnd
public java.util.Date getEnd()
Description copied from interface:UserBan
Gets the date that the ban ends, null if there is no end.
-
isPardoned
public boolean isPardoned()
Description copied from interface:UserBan
Finds if the ban has been pardoned.- Specified by:
isPardoned
in interfaceUserBan
- Returns:
- true if the ban was pardoned, false otherwise.
-
pardon
public void pardon() throws java.lang.SecurityException
Description copied from interface:UserBan
Pardons the ban.
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-