Class Application

java.lang.Object
com.ntu.fdae.group1.bto.models.project.Application

public class Application extends Object
Represents an application for a BTO housing project in the system.

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 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 application
      applicantNric - NRIC of the applicant
      projectId - ID of the BTO project being applied for
      submissionDate - Date when the application was submitted
  • Method Details

    • getApplicationId

      public String getApplicationId()
      Gets the unique identifier for this application.
      Returns:
      The application ID
    • getApplicantNric

      public String getApplicantNric()
      Gets the NRIC of the applicant who submitted this application.
      Returns:
      The applicant's NRIC
    • getProjectId

      public String getProjectId()
      Gets the ID of the BTO project being applied for.
      Returns:
      The project ID
    • getSubmissionDate

      public LocalDate getSubmissionDate()
      Gets the date when the application was submitted.
      Returns:
      The submission date
    • getStatus

      public ApplicationStatus 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

      public void setStatus(ApplicationStatus status)
      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

      public FlatType getPreferredFlatType()
      Gets the flat type preferred by the applicant.
      Returns:
      The preferred flat type, or null if no preference was specified
    • setPreferredFlatType

      public void setPreferredFlatType(FlatType preferredFlatType)
      Sets the flat type preferred by the applicant.
      Parameters:
      preferredFlatType - The preferred flat type
    • getRequestedWithdrawalDate

      public LocalDate 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

      public void setRequestedWithdrawalDate(LocalDate requestedWithdrawalDate)
      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