Class Request
java.lang.Object
entity.request.Request
- All Implemented Interfaces:
Requestable
- Direct Known Subclasses:
BTOApplication,BTOWithdrawal,Enquiry,OfficerRegistration
Base entity class representing a generic request within the system.
This class holds common attributes shared by all specific request types,
such as an ID, type, associated user and project IDs, and the overall processing status.
It is intended to be extended by concrete request classes like
BTOApplication,
Enquiry, BTOWithdrawal, and OfficerRegistration.
Implements the Requestable interface (assumed).-
Constructor Summary
ConstructorsConstructorDescriptionRequest()Default constructor.Request(String requestID, RequestType requestType, String userID, String projectID, RequestStatus requestStatus) Parameterized constructor to create a Request with specified initial values. -
Method Summary
Modifier and TypeMethodDescriptionGets the project ID related to this request.Gets the unique identifier for this request.Gets the overall processing status of this request.Gets the type of this request.Gets the user ID associated with this request.voidsetProjectID(String projectID) Sets the project ID related to this request.voidsetRequestID(String requestID) Sets the unique identifier for this request.voidsetRequestStatus(RequestStatus requestStatus) Sets the overall processing status of this request.voidsetRequestType(RequestType requestType) Sets the type of this request.voidSets the user ID associated with this request.
-
Constructor Details
-
Request
public Request()Default constructor. Initializes a new Request instance with default values: empty strings for IDs,RequestType.NONE, andRequestStatus.PENDING. -
Request
public Request(String requestID, RequestType requestType, String userID, String projectID, RequestStatus requestStatus) Parameterized constructor to create a Request with specified initial values. Used by subclasses to initialize the common request properties.- Parameters:
requestID- The unique ID for this request.requestType- TheRequestTypeindicating the kind of request.userID- The ID of the user associated with this request.projectID- The ID of the project related to this request.requestStatus- The initialRequestStatus(e.g., PENDING).
-
-
Method Details
-
getRequestID
Gets the unique identifier for this request.- Specified by:
getRequestIDin interfaceRequestable- Returns:
- The request ID string.
-
setRequestID
Sets the unique identifier for this request.- Specified by:
setRequestIDin interfaceRequestable- Parameters:
requestID- The request ID string.
-
getRequestType
Gets the type of this request.- Specified by:
getRequestTypein interfaceRequestable- Returns:
- The
RequestTypeenum value.
-
setRequestType
Sets the type of this request.- Specified by:
setRequestTypein interfaceRequestable- Parameters:
requestType- TheRequestTypeenum value.
-
getUserID
Gets the user ID associated with this request.- Specified by:
getUserIDin interfaceRequestable- Returns:
- The user ID string.
-
setUserID
Sets the user ID associated with this request.- Specified by:
setUserIDin interfaceRequestable- Parameters:
userID- The user ID string.
-
getProjectID
Gets the project ID related to this request.- Specified by:
getProjectIDin interfaceRequestable- Returns:
- The project ID string. Can be null or empty if not applicable.
-
setProjectID
Sets the project ID related to this request.- Specified by:
setProjectIDin interfaceRequestable- Parameters:
projectID- The project ID string.
-
getRequestStatus
Gets the overall processing status of this request.- Specified by:
getRequestStatusin interfaceRequestable- Returns:
- The
RequestStatusenum value (e.g., PENDING, DONE).
-
setRequestStatus
Sets the overall processing status of this request.- Specified by:
setRequestStatusin interfaceRequestable- Parameters:
requestStatus- TheRequestStatusenum value.
-