Class Enquiry
java.lang.Object
com.ntu.fdae.group1.bto.models.enquiry.Enquiry
Represents a customer enquiry in the BTO system.
This class models enquiries submitted by users seeking information or assistance about BTO projects or the application process. Each enquiry tracks its submission details, content, and any replies provided by HDB staff.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a reply to this enquiry.void
editContent
(String newContent) Edits the content of this enquiry.Gets the content or question of this enquiry.Gets the unique identifier for this enquiry.Gets the ID of the project this enquiry is related to.getReply()
Gets the reply provided by HDB staff.Gets the date when a reply was provided.Gets the date when this enquiry was submitted.Gets the NRIC of the user who submitted this enquiry.boolean
Checks if this enquiry has been replied to.void
setContent
(String content) Updates the content of this enquiry.
-
Constructor Details
-
Enquiry
public Enquiry(String enquiryId, String userNric, String projectId, String content, LocalDate submissionDate) Constructs a new Enquiry with the specified details.- Parameters:
enquiryId
- Unique identifier for this enquiryuserNric
- NRIC of the user submitting the enquiryprojectId
- ID of the related project, or null for general enquiriescontent
- The content or question of the enquirysubmissionDate
- Date when the enquiry was submitted
-
-
Method Details
-
getEnquiryId
Gets the unique identifier for this enquiry.- Returns:
- The enquiry ID
-
getUserNric
Gets the NRIC of the user who submitted this enquiry.- Returns:
- The user's NRIC
-
getProjectId
Gets the ID of the project this enquiry is related to.- Returns:
- The project ID, or null if this is a general enquiry
-
getContent
Gets the content or question of this enquiry.- Returns:
- The enquiry content
-
setContent
Updates the content of this enquiry.- Parameters:
content
- The new content to set
-
getReply
Gets the reply provided by HDB staff.- Returns:
- The reply text, or null if no reply has been provided
-
isReplied
public boolean isReplied()Checks if this enquiry has been replied to.- Returns:
- true if a reply has been provided, false otherwise
-
getSubmissionDate
Gets the date when this enquiry was submitted.- Returns:
- The submission date
-
getReplyDate
Gets the date when a reply was provided.- Returns:
- The reply date, or null if no reply has been provided
-
addReply
Adds a reply to this enquiry.When a reply is added, the enquiry is marked as replied and the reply date is recorded.
- Parameters:
replyContent
- The content of the replyreplyDate
- The date when the reply was provided
-
editContent
Edits the content of this enquiry.This is an alternative method to setContent() with a more descriptive name.
- Parameters:
newContent
- The new content to set
-