Class User
- java.lang.Object
-
- com.group21.jobTracker.backend.data.User
-
public class User extends Object
Class that represents the user in JobTracker.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddJob(Jobs job)Adds a job to the list of user jobsvoiddeleteExistingJob(Jobs job)Deletes an existing job from the userStringgetAge()Gets the age of the userStringgetEmailAddress()Getter for the email fieldStringgetExperience()Get experience of the userStringgetFullName()Getter for the fullName fieldStringgetGender()Getter for genderArrayList<Jobs>getJobs()Gets the list of jobsArrayList<Jobs>getJobsByDate(String type)Gets the 5 jobs with the closest datesArrayList<Jobs>getJobsByPriority()Gets the 5 jobs with the highest priorityStringgetKeywords()Get keywords from the userStringgetProcessedFullName()Gets the full name after being processedvoidsetAge(String age)Set the age of the uservoidsetEmailAddress(String emailAddress)Setter for the email fieldvoidsetExperience(String experience)Set the experience of the user.voidsetFullName(String fullName)Setter for the full name fieldvoidsetGender(String gender)Sets the gender of the uservoidsetKeywords(String keywords)Set the keywordsStringtoSaveString()Converts the user into a string to be saved to a fileStringtoString()Overrides the toString method to express the user as a stringvoidupdateId()Updates the id of all of the jobs saved to a user
-
-
-
Constructor Detail
-
User
public User(String fullName, String email, String gender, String age, String experience, String keywords)
Constructs the user object- Parameters:
fullName- fullName of the useremail- of the usergender- of the userage- of the userexperience- education level of the userkeywords- job searching keywords for the user
-
-
Method Detail
-
getEmailAddress
public String getEmailAddress()
Getter for the email field- Returns:
- the emailAddress
-
setEmailAddress
public void setEmailAddress(String emailAddress)
Setter for the email field- Parameters:
emailAddress- the email Address to set
-
getFullName
public String getFullName()
Getter for the fullName field- Returns:
- the full name
-
setFullName
public void setFullName(String fullName)
Setter for the full name field- Parameters:
fullName- the full name to set
-
getGender
public String getGender()
Getter for gender- Returns:
- the gender
-
setGender
public void setGender(String gender)
Sets the gender of the user- Parameters:
gender- the gender to set
-
getAge
public String getAge()
Gets the age of the user- Returns:
- the age
-
setAge
public void setAge(String age)
Set the age of the user- Parameters:
age- to set
-
getExperience
public String getExperience()
Get experience of the user- Returns:
- the experience of the user
-
setExperience
public void setExperience(String experience)
Set the experience of the user.- Parameters:
experience- to set
-
getKeywords
public String getKeywords()
Get keywords from the user- Returns:
- the keywords
-
setKeywords
public void setKeywords(String keywords)
Set the keywords- Parameters:
keywords- the keywords to set
-
addJob
public void addJob(Jobs job)
Adds a job to the list of user jobs- Parameters:
job- add the given job object to a list of the users jobs
-
getJobsByDate
public ArrayList<Jobs> getJobsByDate(String type)
Gets the 5 jobs with the closest dates- Parameters:
type- either DueDate or priority- Returns:
- a list of the 5 jobs with the closest dates
-
getJobsByPriority
public ArrayList<Jobs> getJobsByPriority()
Gets the 5 jobs with the highest priority- Returns:
- a list of the 5 jobs with the highest priority
-
toString
public String toString()
Overrides the toString method to express the user as a string
-
toSaveString
public String toSaveString()
Converts the user into a string to be saved to a file- Returns:
- the string representation of the user
-
getProcessedFullName
public String getProcessedFullName()
Gets the full name after being processed- Returns:
- the processed full name
-
deleteExistingJob
public void deleteExistingJob(Jobs job)
Deletes an existing job from the user- Parameters:
job- the job being deleted
-
updateId
public void updateId()
Updates the id of all of the jobs saved to a user
-
-