Class BTOApplication
java.lang.Object
entity.request.Request
entity.request.BTOApplication
- All Implemented Interfaces:
Requestable
Represents a specific type of request for a Build-To-Order (BTO) housing project application.
Extends the base
Request class and adds an approval status specific to the application outcome.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.BTOApplication(String requestID, RequestType requestType, String userID, String projectID, RequestStatus requestStatus) Parameterized constructor to create a BTOApplication with specified initial details. -
Method Summary
Modifier and TypeMethodDescriptionGets the current approval status of this BTO application.voidsetApplicationStatus(ApprovedStatus applicationStatus) Sets the approval status of this BTO application.Methods inherited from class entity.request.Request
getProjectID, getRequestID, getRequestStatus, getRequestType, getUserID, setProjectID, setRequestID, setRequestStatus, setRequestType, setUserID
-
Constructor Details
-
BTOApplication
public BTOApplication()Default constructor. Initializes a new BTOApplication instance by calling the defaultRequestconstructor. The specificapplicationStatuswill likely be null or require explicit setting later. -
BTOApplication
public BTOApplication(String requestID, RequestType requestType, String userID, String projectID, RequestStatus requestStatus) Parameterized constructor to create a BTOApplication with specified initial details. Calls theRequestconstructor to initialize common request fields (ID, type, user, project, status). Sets the initialapplicationStatusfor this BTO application toApprovedStatus.PENDING.- Parameters:
requestID- The unique ID for this request.requestType- The type of request (should beRequestType.BTO_APPLICATION).userID- The ID of the applicant submitting the application.projectID- The ID of the project being applied for.requestStatus- The initial overall processing status (e.g.,RequestStatus.PENDING).
-
-
Method Details
-
getApplicationStatus
Gets the current approval status of this BTO application.- Returns:
- The
ApprovedStatus(PENDING, SUCCESSFUL, or UNSUCCESSFUL).
-
setApplicationStatus
Sets the approval status of this BTO application. Typically called by a Manager or relevant controller when processing the application.- Parameters:
applicationStatus- The newApprovedStatusto set.
-