Class NominationComment
java.lang.Object
org.deltava.beans.DatabaseBean
org.deltava.beans.hr.NominationComment
- All Implemented Interfaces:
Serializable
,Comparable<Object>
,AuthoredBean
,IDBean
,ViewEntry
,Cacheable
A bean to track Senior Captain nomination comments.
- Since:
- 3.3
- Version:
- 8.0
- Author:
- Luke
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
int
Returns the Author of this bean.getBody()
Returns the comment body.Returns the comment creation date.Returns the CSS class for this object if rendered in a view table.boolean
Returns whether this comment is in support of the nomination.void
setAuthorID
(int id) Updates the author of this bean.void
Updates the comment body.void
setCreatedOn
(Instant dt) Updates the comment creation date.void
setSupport
(boolean isSupport) Marks whether this comment is in support of the nomination.Methods inherited from class org.deltava.beans.DatabaseBean
cacheKey, equals, getHexID, getID, hashCode, setID, validateID, validateID
-
Constructor Details
-
NominationComment
Creates a new bean.- Parameters:
id
- the author's database IDbody
- the comments- Throws:
IllegalArgumentException
- if id is zero or negative
-
-
Method Details
-
getCreatedOn
Returns the comment creation date.- Returns:
- the date/time the comment was written
- See Also:
-
getBody
-
getSupport
public boolean getSupport()Returns whether this comment is in support of the nomination.- Returns:
- TRUE if in support, otherwise FALSE
- See Also:
-
getAuthorID
public int getAuthorID()Description copied from interface:AuthoredBean
Returns the Author of this bean.- Specified by:
getAuthorID
in interfaceAuthoredBean
- Returns:
- the author's database ID
- See Also:
-
setAuthorID
public void setAuthorID(int id) Description copied from interface:AuthoredBean
Updates the author of this bean.- Specified by:
setAuthorID
in interfaceAuthoredBean
- Parameters:
id
- the author's database ID.- See Also:
-
setBody
-
setCreatedOn
Updates the comment creation date.- Parameters:
dt
- the date/time the comment was created- See Also:
-
setSupport
public void setSupport(boolean isSupport) Marks whether this comment is in support of the nomination.- Parameters:
isSupport
- TRUE if in support, otherwise FALSE- See Also:
-
compareTo
- Specified by:
compareTo
in interfaceComparable<Object>
- Overrides:
compareTo
in classDatabaseBean
-
getRowClassName
Description copied from interface:ViewEntry
Returns the CSS class for this object if rendered in a view table.- Specified by:
getRowClassName
in interfaceViewEntry
- Returns:
- the CSS class name, or NULL if none
-