Class Enquiry
java.lang.Object
entity.request.Request
entity.request.Enquiry
- All Implemented Interfaces:
Requestable
Represents a specific type of request where a user submits an enquiry or question,
typically regarding a specific project.
Extends the base
Request class and adds fields to store the text of the query
and the corresponding answer (if provided).- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionEnquiry()Default constructor.Enquiry(String requestID, RequestType requestType, String userID, String projectID, RequestStatus requestStatus, String query) Parameterized constructor to create an Enquiry request with specified initial details. -
Method Summary
Modifier and TypeMethodDescriptionGets the text content of the answer provided for this enquiry.getQuery()Gets the text content of the user's submitted query.voidSets the text content of the answer for this enquiry.voidSets the text content of the user's submitted query.Methods inherited from class entity.request.Request
getProjectID, getRequestID, getRequestStatus, getRequestType, getUserID, setProjectID, setRequestID, setRequestStatus, setRequestType, setUserID
-
Constructor Details
-
Enquiry
public Enquiry()Default constructor. Initializes a new Enquiry instance by calling the defaultRequestconstructor. Thequeryandanswerfields will be null initially. -
Enquiry
public Enquiry(String requestID, RequestType requestType, String userID, String projectID, RequestStatus requestStatus, String query) Parameterized constructor to create an Enquiry request with specified initial details. Calls theRequestconstructor to initialize common request fields (ID, type, user, project, status). Sets the initialquerytext provided by the user. Theanswerfield is initialized to null.- Parameters:
requestID- The unique ID for this enquiry request.requestType- The type of request (should beRequestType.ENQUIRY).userID- The ID of the user submitting the enquiry.projectID- The ID of the project the enquiry pertains to.requestStatus- The initial overall processing status (e.g.,RequestStatus.PENDING).query- The text content of the user's enquiry.
-
-
Method Details
-
getQuery
Gets the text content of the user's submitted query.- Returns:
- The query string.
-
setQuery
Sets the text content of the user's submitted query. Allows modification, for example, if the user edits their query before it's answered.- Parameters:
query- The new query string.
-
getAnswer
Gets the text content of the answer provided for this enquiry.- Returns:
- The answer string, or null if the enquiry has not been answered yet.
-
setAnswer
Sets the text content of the answer for this enquiry. Typically called by an Officer or Manager responding to the query. Setting the answer might also involve changing the overallRequestStatusto DONE.- Parameters:
answer- The answer string provided.
-