Class Application
This class models a user's application to a specific BTO project, tracking its submission details, status, and progress through the application workflow. Applications move through various states from submission to decision-making, and potentially through withdrawal processes.
The application lifecycle typically involves:- Initial submission by an applicant
- Review by HDB managers
- Status updates (PENDING → SUCCESSFUL/UNSUCCESSFUL)
- Potential withdrawal processing
- Progression to booking if successful
-
Constructor Summary
ConstructorsConstructorDescriptionApplication
(String applicationId, String applicantNric, String projectId, LocalDate submissionDate) Constructs a new Application with the specified details. -
Method Summary
Modifier and TypeMethodDescriptionGets the NRIC of the applicant who submitted this application.Gets the unique identifier for this application.Gets the flat type preferred by the applicant.Gets the ID of the BTO project being applied for.Gets the date when a withdrawal was requested by the applicant.Gets the current status of this application in the workflow.Gets the date when the application was submitted.void
setPreferredFlatType
(FlatType preferredFlatType) Sets the flat type preferred by the applicant.void
setRequestedWithdrawalDate
(LocalDate requestedWithdrawalDate) Sets the date when a withdrawal was requested by the applicant.void
setStatus
(ApplicationStatus status) Sets the status of this application.
-
Constructor Details
-
Application
public Application(String applicationId, String applicantNric, String projectId, LocalDate submissionDate) Constructs a new Application with the specified details.- Parameters:
applicationId
- Unique identifier for the applicationapplicantNric
- NRIC of the applicantprojectId
- ID of the BTO project being applied forsubmissionDate
- Date when the application was submitted
-
-
Method Details
-
getApplicationId
Gets the unique identifier for this application.- Returns:
- The application ID
-
getApplicantNric
Gets the NRIC of the applicant who submitted this application.- Returns:
- The applicant's NRIC
-
getProjectId
Gets the ID of the BTO project being applied for.- Returns:
- The project ID
-
getSubmissionDate
Gets the date when the application was submitted.- Returns:
- The submission date
-
getStatus
Gets the current status of this application in the workflow.Possible statuses include PENDING, SUCCESSFUL, UNSUCCESSFUL, and BOOKED.
- Returns:
- The current application status
-
setStatus
Sets the status of this application.This method is used to update the application's state as it progresses through the application workflow, from PENDING to either SUCCESSFUL or UNSUCCESSFUL, and potentially to BOOKED.
- Parameters:
status
- The new application status
-
getPreferredFlatType
Gets the flat type preferred by the applicant.- Returns:
- The preferred flat type, or null if no preference was specified
-
setPreferredFlatType
Sets the flat type preferred by the applicant.- Parameters:
preferredFlatType
- The preferred flat type
-
getRequestedWithdrawalDate
Gets the date when a withdrawal was requested by the applicant.- Returns:
- The withdrawal request date, or null if no withdrawal was requested
-
setRequestedWithdrawalDate
Sets the date when a withdrawal was requested by the applicant.Setting this to a date indicates that the applicant has requested to withdraw their application. Setting it to null indicates that no withdrawal is requested or that a previous withdrawal request has been cancelled.
- Parameters:
requestedWithdrawalDate
- The withdrawal request date, or null
-