Package app.entity.camp
Class Camp
java.lang.Object
app.entity.RepositoryList<Camp>
app.entity.camp.CampList
app.entity.camp.CampDetails
app.entity.camp.Camp
- All Implemented Interfaces:
IFilterableByAttendee<Camp>,IFilterableByCampCommittee<Camp>,IFilterableByDateRange<Camp>,IFilterableByID<Camp>,IFilterableBySchool<Camp>,IFilterableByStudent<Camp>,IFilterableByVisibility<Camp>,ISerializable,ISortableByEndDate<Camp>,ISortableByID<Camp>,ISortableByLocation<Camp>,ISortableByName<Camp>,ISortableByRegistrationCloseDate<Camp>,ISortableByStartingDate<Camp>,ITaggedItem,Iterable<Camp>
The
Camp class represents a camp, extending the CampDetails
class with additional features.
It includes details about the staff in charge, attendees, and committees
involved in the camp.
The class provides methods to manage these aspects and create suggestion
plans for camp modifications.
Key features:
- Management of staff in charge.
- Handling attendees and committees.
- Adding and removing students from attendees and committees.
- Creating suggestion plans for camps.
- See Also:
-
Field Summary
FieldsFields inherited from class app.entity.camp.CampDetails
closeRegistrationDate, description, endDate, ID, location, name, school, startDate, totalCommitteeSlots, totalSlots, visibilityFields inherited from class app.entity.RepositoryList
all -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddAttendee(Student attendee) Adds a student as an attendee of the camp.booleanaddCommittee(Student committee) Adds a student as a committee member of the camp.voidaddEnquiry(Enquiry enquiry) Adds an enquiry to the list of enquiries.voidaddRegisteredStudent(Student student) Adds a student to the list of registered students (used for deserialize only).voidaddSuggestion(Suggestion suggestion) Adds a suggestion to the list of suggestions.Creates a suggestion plan based on the current state of the camp.Retrieves the list of enquiries for the camp.Retrieves the list of previously registered students.Retrieves the staff member in charge of the camp.Retrieves the list of suggestions for the camp.booleanisStudentRegistered(Student student) Checks if a student is registered in the camp.booleanremoveAttendee(Student attendee) Removes a student from the list of attendees.booleanremoveCommittee(Student committee) voidremoveEnquiry(Enquiry enquiry) Removes an enquiry from the list of enquiries.voidremoveSuggestion(Suggestion suggestion) Removes a suggestion from the list of suggestions.voidsetAttendees(Set<Student> attendees) voidsetCommittees(Set<Student> committees) voidsetStaffInCharge(Staff staffInCharge) Sets the staff member in charge of the camp.Methods inherited from class app.entity.camp.CampDetails
getCloseRegistrationDate, getDescription, getEndDate, getID, getLocation, getName, getSchool, getStartDate, getTotalCommitteeSlots, getTotalSlots, isVisible, setCloseRegistrationDate, setDescription, setEndDate, setID, setLocation, setName, setSchool, setStartDate, setTotalCommitteeSlots, setTotalSlots, setVisibilityMethods inherited from class app.entity.camp.CampList
filterByAttendee, filterByCampCommittee, filterByDateRange, filterByID, filterByRegistrationDate, filterBySchool, filterByStaff, filterByStudent, filterByVisibility, getAll, serialize, sortByEndDate, sortByID, sortByLocation, sortByName, sortByRegistrationCloseDate, sortByStartingDate, toArrayMethods inherited from class app.entity.RepositoryList
add, clear, get, iterator, remove, size, update, updateMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface app.entity.interfaces.ITaggedItem
getID, setIDMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
staffInCharge
-
attendees
-
committees
-
registeredStudents
-
MAX_COMMITTEE
public static final int MAX_COMMITTEE- See Also:
-
-
Constructor Details
-
Camp
public Camp(String ID, String name, String description, Boolean visibility, Date startDate, Date endDate, Date closeRegistrationDate, String school, String location, Staff staffInCharge, int totalSlots, int totalCommitteeSlots) Constructs a new Camp instance with specified details.- Parameters:
ID- Unique identifier for the camp.name- Name of the camp.description- Description of the camp.visibility- Visibility status of the camp.startDate- Start date of the camp.endDate- End date of the camp.closeRegistrationDate- Closing date for registration.school- School associated with the camp.location- Location of the camp.staffInCharge- Staff member in charge of the camp.totalSlots- Total number of slots available in the camp.totalCommitteeSlots- Total number of committee slots available in the camp.
-
-
Method Details
-
getStaffInCharge
Retrieves the staff member in charge of the camp.- Returns:
- Staff The staff member in charge.
-
getAttendees
-
getAttendeesAndCommittees
-
getCommittees
-
setStaffInCharge
Sets the staff member in charge of the camp.- Parameters:
staffInCharge- The staff member to be set as in charge.
-
setAttendees
-
setCommittees
-
addAttendee
Adds a student as an attendee of the camp.- Parameters:
attendee- The student to be added as an attendee.- Returns:
- boolean True if the student is successfully added.
-
addCommittee
Adds a student as a committee member of the camp.- Parameters:
committee- The student to be added as a committee member.- Returns:
- boolean True if the student is successfully added.
-
removeAttendee
Removes a student from the list of attendees.- Parameters:
attendee- The student to be removed.- Returns:
- boolean True if the student is successfully removed.
-
removeCommittee
-
createSuggestionPlan
Creates a suggestion plan based on the current state of the camp. This plan can be used to suggest modifications or improvements to the camp.- Returns:
- CampDetails A new
CampDetailsobject representing the suggestion plan.
-
getSuggestionList
Retrieves the list of suggestions for the camp.- Returns:
- The list of suggestions.
-
getEnquiryList
Retrieves the list of enquiries for the camp.- Returns:
- The list of enquiries.
-
addSuggestion
Adds a suggestion to the list of suggestions.- Parameters:
suggestion- The suggestion to be added.
-
addEnquiry
Adds an enquiry to the list of enquiries.- Parameters:
enquiry- The enquiry to be added.
-
removeSuggestion
Removes a suggestion from the list of suggestions.- Parameters:
suggestion- The suggestion to be removed.
-
removeEnquiry
Removes an enquiry from the list of enquiries.- Parameters:
enquiry- The enquiry to be removed.
-
isStudentRegistered
Checks if a student is registered in the camp.- Parameters:
student- The student to check for registration.- Returns:
- True if the student is registered, false otherwise.
-
addRegisteredStudent
Adds a student to the list of registered students (used for deserialize only).- Parameters:
student- The student to be added.
-
getRegisteredStudents
Retrieves the list of previously registered students.
-