Class BTOWithdrawal
java.lang.Object
entity.request.Request
entity.request.BTOWithdrawal
- All Implemented Interfaces:
Requestable
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 Summary
ConstructorsConstructorDescriptionDefault constructor.BTOWithdrawal(String requestID, RequestType requestType, String userID, String projectID, RequestStatus requestStatus) Parameterized constructor to create a BTOWithdrawal request with specified initial details. -
Method Summary
Modifier and TypeMethodDescriptionGets the current approval status of this withdrawal request.voidsetWithdrawalStatus(ApprovedStatus withdrawalStatus) Sets the approval status of this withdrawal request.Methods inherited from class entity.request.Request
getProjectID, getRequestID, getRequestStatus, getRequestType, getUserID, setProjectID, setRequestID, setRequestStatus, setRequestType, setUserID
-
Constructor Details
-
BTOWithdrawal
public BTOWithdrawal()Default constructor. Initializes a new BTOWithdrawal instance by calling the defaultRequestconstructor. The specificwithdrawalStatuswill 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 theRequestconstructor to initialize common request fields (ID, type, user, project, status). Sets the initialwithdrawalStatusfor this withdrawal request toApprovedStatus.PENDING.- Parameters:
requestID- The unique ID for this withdrawal request.requestType- The type of request (should beRequestType.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
Gets the current approval status of this withdrawal request.- Returns:
- The
ApprovedStatus(PENDING, SUCCESSFUL, or UNSUCCESSFUL).
-
setWithdrawalStatus
Sets the approval status of this withdrawal request. Typically called by a Manager or relevant controller when processing the withdrawal request.- Parameters:
withdrawalStatus- The newApprovedStatusto set for the withdrawal request.
-