Class Enquiry

All Implemented Interfaces:
Requestable

public class Enquiry extends Request
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 Details

    • Enquiry

      public Enquiry()
      Default constructor. Initializes a new Enquiry instance by calling the default Request constructor. The query and answer fields 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 the Request constructor to initialize common request fields (ID, type, user, project, status). Sets the initial query text provided by the user. The answer field is initialized to null.
      Parameters:
      requestID - The unique ID for this enquiry request.
      requestType - The type of request (should be RequestType.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

      public String getQuery()
      Gets the text content of the user's submitted query.
      Returns:
      The query string.
    • setQuery

      public void setQuery(String query)
      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

      public 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

      public void setAnswer(String answer)
      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 overall RequestStatus to DONE.
      Parameters:
      answer - The answer string provided.