Class Jobs
- java.lang.Object
-
- com.group21.jobTracker.backend.data.Jobs
-
- All Implemented Interfaces:
Serializable
public class Jobs extends Object implements Serializable
Representation of a Job application- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Jobs()Constructs the Job without any parametersJobs(String jobTitle, String company, LocalDate dateApplied, LocalDate dueDate, String salary, String jobDescription, String nextAction, String status, double priority)Constructs the Jobs object
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static StringdateToString(LocalDate date)Helper function that formats the date into a stringbooleanequals(Jobs job2)Determines if this job application is equal to anotherStringgetCompany()Getter method for the companyLocalDategetDateApplied()Getter for the DateApplied fieldLocalDategetDueDate()Getter for the DueDate fieldintgetId()Getter for the Id fieldStringgetJobDescription()Getter for the Job DescriptionStringgetJobTitle()Getter method for the titleStringgetLink()Get the url for JobStringgetNextAction()Getter for the nextAction fielddoublegetPriority()Getter for the priority fieldStringgetRemindMeOn()Getter for the reminder fieldStringgetSalary()Getter for the salary fieldStringgetStatus()Getter for the status fieldStringgetStringId()Gets the id as a string for front end usebooleanisNewJob()Determines if the job is a new job or notvoidsetCompany(String company)Setter for the companyvoidsetDateApplied(LocalDate dateApplied)Setter for the DateApplied fieldvoidsetDueDate(LocalDate dueDate)Setter for the DueDate fieldvoidsetId(int id)Sets the idvoidsetJobDescription(String jobDescription)Setter for the Job DescriptionvoidsetJobTitle(String jobTitle)Setter method for the job titlevoidsetLink(String link)Set the link for a Job postingvoidsetNextAction(String nextAction)Setter for the next action fieldvoidsetPriority(double priority)Setter for the priority fieldvoidsetRemindMeOn(String remindMeOn)Setter for the reminder fieldvoidsetSalary(String salary)Setter for the salary fieldvoidsetStatus(String status)Setter for the status fieldvoidsetStringId(String id)Sets the id from a stringStringtoSaveString()Expresses the job as a string that is used to save the fileStringtoString()Overrides the toString method to convert the object into a string
-
-
-
Constructor Detail
-
Jobs
public Jobs()
Constructs the Job without any parameters
-
Jobs
public Jobs(String jobTitle, String company, LocalDate dateApplied, LocalDate dueDate, String salary, String jobDescription, String nextAction, String status, double priority)
Constructs the Jobs object- Parameters:
jobTitle- title of the jobcompany- name of the companydateApplied- date of the applicationdueDate- due date of jobsalary- salary of jobjobDescription- description of jobnextAction- next action for jobstatus- status of jobpriority- priority for job
-
-
Method Detail
-
getId
public int getId()
Getter for the Id field- Returns:
- the id of the job
-
getStringId
public String getStringId()
Gets the id as a string for front end use- Returns:
- the id as a string
-
setStringId
public void setStringId(String id)
Sets the id from a string- Parameters:
id- the new id
-
setId
public void setId(int id)
Sets the id- Parameters:
id- the new id
-
getJobTitle
public String getJobTitle()
Getter method for the title- Returns:
- the name
-
setJobTitle
public void setJobTitle(String jobTitle)
Setter method for the job title- Parameters:
jobTitle- the name to set
-
getCompany
public String getCompany()
Getter method for the company- Returns:
- the company
-
setCompany
public void setCompany(String company)
Setter for the company- Parameters:
company- the company to set
-
getDateApplied
public LocalDate getDateApplied()
Getter for the DateApplied field- Returns:
- the dateApplied
-
setDateApplied
public void setDateApplied(LocalDate dateApplied)
Setter for the DateApplied field- Parameters:
dateApplied- dateApplied to set
-
getDueDate
public LocalDate getDueDate()
Getter for the DueDate field- Returns:
- the dueDate
-
setDueDate
public void setDueDate(LocalDate dueDate)
Setter for the DueDate field- Parameters:
dueDate- dueDate to set
-
getSalary
public String getSalary()
Getter for the salary field- Returns:
- the salary
-
setSalary
public void setSalary(String salary)
Setter for the salary field- Parameters:
salary- salary to set
-
getJobDescription
public String getJobDescription()
Getter for the Job Description- Returns:
- the jobDescription
-
setJobDescription
public void setJobDescription(String jobDescription)
Setter for the Job Description- Parameters:
jobDescription- jobDescription to set
-
getNextAction
public String getNextAction()
Getter for the nextAction field- Returns:
- the nextAction
-
setNextAction
public void setNextAction(String nextAction)
Setter for the next action field- Parameters:
nextAction- nextAction to set
-
getStatus
public String getStatus()
Getter for the status field- Returns:
- the status
-
setStatus
public void setStatus(String status)
Setter for the status field- Parameters:
status- status to set
-
getPriority
public double getPriority()
Getter for the priority field- Returns:
- the priority
-
setPriority
public void setPriority(double priority)
Setter for the priority field- Parameters:
priority- priority to set
-
getRemindMeOn
public String getRemindMeOn()
Getter for the reminder field- Returns:
- the dueDate
-
setRemindMeOn
public void setRemindMeOn(String remindMeOn)
Setter for the reminder field- Parameters:
remindMeOn- reminder day
-
isNewJob
public boolean isNewJob()
Determines if the job is a new job or not- Returns:
- true if the job is new
-
toString
public String toString()
Overrides the toString method to convert the object into a string
-
equals
public boolean equals(Jobs job2)
Determines if this job application is equal to another- Parameters:
job2- the other job being compared to- Returns:
- true if the objects are equal
-
toSaveString
public String toSaveString()
Expresses the job as a string that is used to save the file- Returns:
- the string representation of the job
-
dateToString
public static String dateToString(LocalDate date)
Helper function that formats the date into a string- Parameters:
date- the date being formatted- Returns:
- the string representation of the date
-
setLink
public void setLink(String link)
Set the link for a Job posting- Parameters:
link- url for job posting
-
getLink
public String getLink()
Get the url for Job- Returns:
- string url
-
-