Class BTOWithdrawal

java.lang.Object
entity.request.Request
entity.request.BTOWithdrawal
All Implemented Interfaces:
Requestable

public class BTOWithdrawal extends Request
Represents a specific type of request to withdraw a previously submitted Build-To-Order (BTO) housing application. Extends the base Request class and adds an approval status specific to the outcome of the withdrawal request itself.
See Also:
  • Constructor Details

    • BTOWithdrawal

      public BTOWithdrawal()
      Default constructor. Initializes a new BTOWithdrawal instance by calling the default Request constructor. The specific withdrawalStatus will likely be null or require explicit setting later.
    • BTOWithdrawal

      public BTOWithdrawal(String requestID, RequestType requestType, String userID, String projectID, RequestStatus requestStatus)
      Parameterized constructor to create a BTOWithdrawal request with specified initial details. Calls the Request constructor to initialize common request fields (ID, type, user, project, status). Sets the initial withdrawalStatus for this withdrawal request to ApprovedStatus.PENDING.
      Parameters:
      requestID - The unique ID for this withdrawal request.
      requestType - The type of request (should be RequestType.BTO_WITHDRAWAL).
      userID - The ID of the applicant submitting the withdrawal request.
      projectID - The ID of the project from which the application is being withdrawn.
      requestStatus - The initial overall processing status (e.g., RequestStatus.PENDING).
  • Method Details

    • getWithdrawalStatus

      public ApprovedStatus getWithdrawalStatus()
      Gets the current approval status of this withdrawal request.
      Returns:
      The ApprovedStatus (PENDING, SUCCESSFUL, or UNSUCCESSFUL).
    • setWithdrawalStatus

      public void setWithdrawalStatus(ApprovedStatus withdrawalStatus)
      Sets the approval status of this withdrawal request. Typically called by a Manager or relevant controller when processing the withdrawal request.
      Parameters:
      withdrawalStatus - The new ApprovedStatus to set for the withdrawal request.