Class JobDataService

  • All Implemented Interfaces:
    Serializable

    public class JobDataService
    extends DataService
    A Data Service class dedicated to User Job board. The implementation has very simplistic locking and does not notify users of modifications.
    See Also:
    Serialized Form
    • Constructor Detail

      • JobDataService

        public JobDataService​(String name)
        Constructor used for JUnit testing
        Parameters:
        name - of the user
    • Method Detail

      • getInstance

        public static DataService getInstance()
        Initialize the JobDatService Instance
        Returns:
        MocDataService instance which contain the list of jobs from User
      • getAllJobs

        public List<Jobs> getAllJobs()
        This Function is to get all jobs for the user.
        Specified by:
        getAllJobs in class DataService
        Returns:
        a collection of Jobs for the USer to show on Application view for User
      • getPriority

        public List<Jobs> getPriority()
        This function gets the top 5 highest priority jobs
        Returns:
        a collection of the top 5 highest priority jobs
      • getJobsbyId

        public Jobs getJobsbyId​(int jobId)
        This Function is to Search job by Id
        Specified by:
        getJobsbyId in class DataService
        Parameters:
        jobId - id of the Jobs object you are searching for
        Returns:
        null if no job found else return the job which was looking for
      • getJobsByName

        public List<Jobs> getJobsByName​(String filterText)
        This function is to Search job by string text
        Parameters:
        filterText - the text to search for jobs by
        Returns:
        an empty list if no jobs are found found else return a list of matching jobs