Package model.camp

Class Enquiry


  • public class Enquiry
    extends java.lang.Object
    This Enquiry Class represent inquiry related to a camp. An inquiry is sent in by a student and the student may then receive replies from staff or committee members of the camp.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int campID
      Identifier of the camp associated with the inquiry.
      private int enquiryID
      Unique identifier for the inquiry.
      private java.lang.String question
      Question or description of the inquiry.
      private java.util.List<java.lang.String> replierID
      List of replier identifiers corresponding to each reply.
      private java.util.List<java.lang.String> reply
      List of replies to the inquiry.
      private EnquiryStatus status
      Status of the inquiry, indicating whether it's Processing or Processed.
      private java.lang.String studentID
      Identifier of the student who initiated the inquiry.
    • Constructor Summary

      Constructors 
      Constructor Description
      Enquiry​(int enquiryID, int campID, java.lang.String studentID, java.lang.String question)
      Constuctor of class Enquiry
      Enquiry​(int enquiryID, int campID, java.lang.String studentID, java.lang.String question, java.util.List<java.lang.String> reply, java.util.List<java.lang.String> replierID, EnquiryStatus status)
      Constuctor of class Enquiry
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getCampID()
      Gets the identifier of the camp associated with the inquiry.
      int getEnquiryID()
      Gets the unique identifier of the inquiry.
      java.lang.String getQuestion()
      Gets the question of the inquiry.
      java.util.List<java.lang.String> getReplierID()
      Gets the list of replier identifiers.
      java.util.List<java.lang.String> getReply()
      Gets the list of replies to the inquiry.
      EnquiryStatus getStatus()
      Gets the status of the inquiry.
      java.lang.String getStudentID()
      Gets the identifier of the student who initiated the inquiry.
      boolean replyToEnquiry​(java.lang.String reply, java.lang.String replierID)
      Adds a reply to the inquiry and updates the status to Processed.
      void setAnswers​(java.util.List<java.lang.String> reply)
      Sets the list of replies to the inquiry.
      void setCampID​(int campID)
      Sets the identifier of the camp associated with the inquiry.
      void setEnquiryID​(int enquiryID)
      Sets the unique identifier of the inquiry.
      void setQuestion​(java.lang.String question)
      Sets the question or description of the inquiry.
      void setReplierID​(java.util.List<java.lang.String> replierID)
      Sets the list of replier identifiers.
      void setStatus​(EnquiryStatus status)
      Sets the status of the inquiry.
      void setStudentID​(java.lang.String studentID)
      Sets the identifier of the student who initiated the inquiry.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • enquiryID

        private int enquiryID
        Unique identifier for the inquiry.
      • campID

        private int campID
        Identifier of the camp associated with the inquiry.
      • studentID

        private java.lang.String studentID
        Identifier of the student who initiated the inquiry.
      • question

        private java.lang.String question
        Question or description of the inquiry.
      • reply

        private java.util.List<java.lang.String> reply
        List of replies to the inquiry.
      • replierID

        private java.util.List<java.lang.String> replierID
        List of replier identifiers corresponding to each reply.
      • status

        private EnquiryStatus status
        Status of the inquiry, indicating whether it's Processing or Processed.
    • Constructor Detail

      • Enquiry

        public Enquiry​(int enquiryID,
                       int campID,
                       java.lang.String studentID,
                       java.lang.String question)
        Constuctor of class Enquiry
        Parameters:
        enquiryID - Unique identifier for the inquiry.
        campID - Identifier of the camp associated with the inquiry.
        studentID - Identifier of the student who initiated the inquiry.
        question - Question or description of the inquiry.
      • Enquiry

        public Enquiry​(int enquiryID,
                       int campID,
                       java.lang.String studentID,
                       java.lang.String question,
                       java.util.List<java.lang.String> reply,
                       java.util.List<java.lang.String> replierID,
                       EnquiryStatus status)
        Constuctor of class Enquiry
        Parameters:
        enquiryID - Unique identifier for the inquiry.
        campID - Identifier of the camp associated with the inquiry.
        studentID - Identifier of the student who initiated the inquiry.
        question - Question or description of the inquiry.
        reply - List of replies to the inquiry.
        replierID - List of replier identifiers corresponding to each reply.
        status - Status of the inquiry, indicating whether it's Processing or Processed.
    • Method Detail

      • getEnquiryID

        public int getEnquiryID()
        Gets the unique identifier of the inquiry.
        Returns:
        The unique identifier of the inquiry.
      • setEnquiryID

        public void setEnquiryID​(int enquiryID)
        Sets the unique identifier of the inquiry.
        Parameters:
        enquiryID - The unique identifier to set for the inquiry.
      • getCampID

        public int getCampID()
        Gets the identifier of the camp associated with the inquiry.
        Returns:
        The identifier of the camp associated with the inquiry.
      • setCampID

        public void setCampID​(int campID)
        Sets the identifier of the camp associated with the inquiry.
        Parameters:
        campID - The identifier to set for the camp associated with the inquiry.
      • getStudentID

        public java.lang.String getStudentID()
        Gets the identifier of the student who initiated the inquiry.
        Returns:
        The identifier of the student who initiated the inquiry.
      • setStudentID

        public void setStudentID​(java.lang.String studentID)
        Sets the identifier of the student who initiated the inquiry.
        Parameters:
        studentID - The identifier to set for the student who initiated the inquiry.
      • getQuestion

        public java.lang.String getQuestion()
        Gets the question of the inquiry.
        Returns:
        The question or description of the inquiry.
      • setQuestion

        public void setQuestion​(java.lang.String question)
        Sets the question or description of the inquiry.
        Parameters:
        question - The question or description to set for the inquiry.
      • getReply

        public java.util.List<java.lang.String> getReply()
        Gets the list of replies to the inquiry.
        Returns:
        The list of replies to the inquiry.
      • setAnswers

        public void setAnswers​(java.util.List<java.lang.String> reply)
        Sets the list of replies to the inquiry.
        Parameters:
        reply - The list of replies to set for the inquiry.
      • getReplierID

        public java.util.List<java.lang.String> getReplierID()
        Gets the list of replier identifiers.
        Returns:
        The list of replier identifiers.
      • setReplierID

        public void setReplierID​(java.util.List<java.lang.String> replierID)
        Sets the list of replier identifiers.
        Parameters:
        replierID - The list of replier identifiers.
      • replyToEnquiry

        public boolean replyToEnquiry​(java.lang.String reply,
                                      java.lang.String replierID)
        Adds a reply to the inquiry and updates the status to Processed.
        Parameters:
        reply - The reply to add to the inquiry.
        replierID - The identifier of the replier.
        Returns:
        True if the reply is successfully added, False otherwise.
      • getStatus

        public EnquiryStatus getStatus()
        Gets the status of the inquiry.
        Returns:
        The status of the inquiry.
      • setStatus

        public void setStatus​(EnquiryStatus status)
        Sets the status of the inquiry.
        Parameters:
        status - The status to set for the inquiry.