Class JobPosting

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

public class JobPosting extends DatabaseBean implements ViewEntry
A bean to store information about a job posting.
Since:
3.4
Version:
10.2
Author:
Luke
See Also:
  • Constructor Details

    • JobPosting

      public JobPosting(String title)
      Creates a new job posting.
      Parameters:
      title - the job title
  • Method Details

    • getTitle

      public String getTitle()
      Returns the job title.
      Returns:
      the title
    • getSummary

      public String getSummary()
      Returns the job summary, a brief description of the position.
      Returns:
      the summary
    • getStatus

      public JobStatus getStatus()
      Returns the job posting status.
      Returns:
      the JobStatus
    • getCreatedOn

      public Instant getCreatedOn()
      Returns the date the job posting was created on.
      Returns:
      the creation date/time
    • getClosesOn

      public Instant getClosesOn()
      Returns the date the job posting is closed to applications.
      Returns:
      the closing date/time
    • getMinLegs

      public int getMinLegs()
      Returns the minimum number of legs required to apply for this position.
      Returns:
      the number of legs
    • getMinAge

      public int getMinAge()
      Returns the minimum number of days since joining required to apply for this position.
      Returns:
      the number of days since joining
    • getHireManagerID

      public int getHireManagerID()
      Returns the database ID of the hiring manager.
      Returns:
      the datbase ID
    • getStaffOnly

      public boolean getStaffOnly()
      Returns whether this job posting is only visible to existing staff members.
      Returns:
      TRUE if only visible to the staff, otherwise FALSE
    • getDescription

      public String getDescription()
      Returns the posting description.
      Returns:
      the description
    • getApplications

      public Collection<Application> getApplications()
      Returns the applications for this job posting.
      Returns:
      a Collection of Application beans
    • getComments

      public Collection<Comment> getComments()
      Returns the comments for this job posting.
      Returns:
      a Collection of Comment beans
    • getSelectedApplications

      public Collection<Application> getSelectedApplications()
      Returns the selected Applications, if any.
      Returns:
      a Collection of Application beans
    • getAppCount

      public int getAppCount()
      Returns the number of Applications for this posting.
      Returns:
      the number of applications
    • add

      public void add(Application a)
      Adds an application to this Job posting.
      Parameters:
      a - an Application bean
    • add

      public void add(Comment c)
      Adds a comment to this Job posting.
      Parameters:
      c - a Comment bean
    • setCreatedOn

      public void setCreatedOn(Instant dt)
      Sets the date this posting was created.
      Parameters:
      dt - the creation date/time
    • setClosesOn

      public void setClosesOn(Instant dt)
      Sets the date this posting closes.
      Parameters:
      dt - the closing date/time
    • setStatus

      public void setStatus(JobStatus status)
      Updates the posting status.
      Parameters:
      status - the JobStatus
    • setMinLegs

      public void setMinLegs(int legs)
      Updates the minimum number of legs required to apply for this position.
      Parameters:
      legs - the minimum number of legs
    • setMinAge

      public void setMinAge(int age)
      Updates the minimum number of days since joining required to apply for this position.
      Parameters:
      age - the minimum number of days since joining
    • setStaffOnly

      public void setStaffOnly(boolean staffOnly)
      Marks this job posting as only visible to staff members.
      Parameters:
      staffOnly - TRUE if visible to staff members only, otherwise FALSE
    • setAppCount

      public void setAppCount(int cnt)
      Sets the number of applications to this posting.
      Parameters:
      cnt - the number of applications
      Throws:
      IllegalStateException - if applications have already been added
    • setHireManagerID

      public void setHireManagerID(int id)
      Sets the database ID of the hiring manager.
      Parameters:
      id - the database ID of the Hiring manager
    • setTitle

      public void setTitle(String title)
      Updates the job title.
      Parameters:
      title - the title
      Throws:
      NullPointerException - if title is null
    • setSummary

      public void setSummary(String summary)
      Updates the job summary.
      Parameters:
      summary - the summary
      Throws:
      NullPointerException - if summary is null
    • setDescription

      public void setDescription(String desc)
      Updates the posting description.
      Parameters:
      desc - the description
    • 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