Class JobDataService
- java.lang.Object
-
- com.group21.jobTracker.backend.DataService
-
- com.group21.jobTracker.backend.mock.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 Summary
Constructors Constructor Description JobDataService(String name)Constructor used for JUnit testing
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description List<Jobs>getAllJobs()This Function is to get all jobs for the user.static DataServicegetInstance()Initialize the JobDatService InstanceJobsgetJobsbyId(int jobId)This Function is to Search job by IdList<Jobs>getJobsByName(String filterText)This function is to Search job by string textList<Jobs>getPriority()This function gets the top 5 highest priority jobs-
Methods inherited from class com.group21.jobTracker.backend.DataService
get, getJob, getSearchResults
-
-
-
-
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:
getAllJobsin classDataService- 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:
getJobsbyIdin classDataService- 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
-
-