Class NominationComment

java.lang.Object
org.deltava.beans.DatabaseBean
org.deltava.beans.hr.NominationComment
All Implemented Interfaces:
Serializable, Comparable<Object>, AuthoredBean, IDBean, ViewEntry, Cacheable

public class NominationComment extends DatabaseBean implements AuthoredBean, ViewEntry
A bean to track Senior Captain nomination comments.
Since:
3.3
Version:
8.0
Author:
Luke
See Also:
  • Constructor Details

    • NominationComment

      public NominationComment(int id, String body)
      Creates a new bean.
      Parameters:
      id - the author's database ID
      body - the comments
      Throws:
      IllegalArgumentException - if id is zero or negative
  • Method Details

    • getCreatedOn

      public Instant getCreatedOn()
      Returns the comment creation date.
      Returns:
      the date/time the comment was written
      See Also:
    • getBody

      public String getBody()
      Returns the comment body.
      Returns:
      the body
      See Also:
    • 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 interface AuthoredBean
      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 interface AuthoredBean
      Parameters:
      id - the author's database ID.
      See Also:
    • setBody

      public void setBody(String body)
      Updates the comment body.
      Parameters:
      body - the body
      See Also:
    • setCreatedOn

      public void setCreatedOn(Instant dt)
      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

      public int compareTo(Object o2)
      Specified by:
      compareTo in interface Comparable<Object>
      Overrides:
      compareTo in class DatabaseBean
    • getRowClassName

      public String getRowClassName()
      Description copied from interface: ViewEntry
      Returns the CSS class for this object if rendered in a view table.
      Specified by:
      getRowClassName in interface ViewEntry
      Returns:
      the CSS class name, or NULL if none