Class Job
java.lang.Object
me.josephsf.jobportaljosephsfeir.model.Job
Represents a job posting in the Job Portal application.
This class is mapped to the "jobs" collection in MongoDB using the
Spring Data MongoDB Document annotation. It contains all information
related to a job posting, including details about the position, company,
requirements, responsibilities, and status.
Each job posting is created by a recruiter and can be applied to by candidates. Jobs can be active or inactive, and have various metadata such as posting date, application deadline, and timestamps for creation and updates.
- Since:
- 2025-05-15
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the category of the job.Gets the name of the company offering the job.Gets the date and time when the job record was created.Gets the deadline for applying to the job.Gets the detailed description of the job.Gets the type of employment offered.getId()Gets the unique identifier of the job.Checks if the job posting is active.Gets the location where the job is based.Gets the date and time when the job was posted.Gets the ID of the recruiter who posted the job.Gets the list of requirements for the job.Gets the list of responsibilities for the job.Gets the annual salary offered for the position.getTitle()Gets the title of the job position.Gets the date and time when the job record was last updated.voidsetCategory(String category) Sets the category of the job.voidsetCompanyName(String companyName) Sets the name of the company offering the job.voidsetCreatedAt(LocalDateTime createdAt) Sets the date and time when the job record was created.voidsetDeadline(LocalDateTime deadline) Sets the deadline for applying to the job.voidsetDescription(String description) Sets the detailed description of the job.voidsetEmploymentType(String employmentType) Sets the type of employment offered.voidSets the unique identifier of the job.voidsetIsActive(Boolean isActive) Sets whether the job posting is active.voidsetLocation(String location) Sets the location where the job is based.voidsetPostedDate(LocalDateTime postedDate) Sets the date and time when the job was posted.voidsetRecruiterId(String recruiterId) Sets the ID of the recruiter who posted the job.voidsetRequirements(List<String> requirements) Sets the list of requirements for the job.voidsetResponsibilities(List<String> responsibilities) Sets the list of responsibilities for the job.voidSets the annual salary offered for the position.voidSets the title of the job position.voidsetUpdatedAt(LocalDateTime updatedAt) Sets the date and time when the job record was last updated.
-
Constructor Details
-
Job
public Job()Constructs a new Job instance with default values. Sets creation, update, and posted timestamps to the current time, and sets the job as active by default.
-
-
Method Details
-
getId
Gets the unique identifier of the job.- Returns:
- the job ID
-
setId
Sets the unique identifier of the job.- Parameters:
id- the job ID to set
-
getTitle
Gets the title of the job position.- Returns:
- the job title
-
setTitle
Sets the title of the job position.- Parameters:
title- the job title to set
-
getDescription
Gets the detailed description of the job.- Returns:
- the job description
-
setDescription
Sets the detailed description of the job.- Parameters:
description- the job description to set
-
getCompanyName
Gets the name of the company offering the job.- Returns:
- the company name
-
setCompanyName
Sets the name of the company offering the job.- Parameters:
companyName- the company name to set
-
getLocation
Gets the location where the job is based.- Returns:
- the job location
-
setLocation
Sets the location where the job is based.- Parameters:
location- the job location to set
-
getCategory
Gets the category of the job.- Returns:
- the job category
-
setCategory
Sets the category of the job.- Parameters:
category- the job category to set
-
getEmploymentType
Gets the type of employment offered.- Returns:
- the employment type
-
setEmploymentType
Sets the type of employment offered.- Parameters:
employmentType- the employment type to set
-
getSalary
Gets the annual salary offered for the position.- Returns:
- the salary amount
-
setSalary
Sets the annual salary offered for the position.- Parameters:
salary- the salary amount to set
-
getRecruiterId
Gets the ID of the recruiter who posted the job.- Returns:
- the recruiter ID
-
setRecruiterId
Sets the ID of the recruiter who posted the job.- Parameters:
recruiterId- the recruiter ID to set
-
getRequirements
Gets the list of requirements for the job.- Returns:
- the job requirements
-
setRequirements
Sets the list of requirements for the job.- Parameters:
requirements- the job requirements to set
-
getResponsibilities
Gets the list of responsibilities for the job.- Returns:
- the job responsibilities
-
setResponsibilities
Sets the list of responsibilities for the job.- Parameters:
responsibilities- the job responsibilities to set
-
getIsActive
Checks if the job posting is active.- Returns:
- true if the job is active, false otherwise
-
setIsActive
Sets whether the job posting is active.- Parameters:
isActive- the active status to set
-
getPostedDate
Gets the date and time when the job was posted.- Returns:
- the posted date
-
setPostedDate
Sets the date and time when the job was posted.- Parameters:
postedDate- the posted date to set
-
getDeadline
Gets the deadline for applying to the job.- Returns:
- the application deadline
-
setDeadline
Sets the deadline for applying to the job.- Parameters:
deadline- the application deadline to set
-
getCreatedAt
Gets the date and time when the job record was created.- Returns:
- the creation timestamp
-
setCreatedAt
Sets the date and time when the job record was created.- Parameters:
createdAt- the creation timestamp to set
-
getUpdatedAt
Gets the date and time when the job record was last updated.- Returns:
- the update timestamp
-
setUpdatedAt
Sets the date and time when the job record was last updated.- Parameters:
updatedAt- the update timestamp to set
-