java.lang.Object
com.example.iconic_raffleevent.model.Event

public class Event extends Object
Represents an event within the raffle system. This includes event details such as title, description, location, date, time, and attendee lists.
  • Constructor Details

    • Event

      public Event()
      Constructs an empty Event object with initialized lists.
  • Method Details

    • getEventId

      public String getEventId()
      Gets the event ID.
      Returns:
      the event ID as a String
    • setEventId

      public void setEventId(String eventId)
      Sets the event ID.
      Parameters:
      eventId - the event ID as a String
    • getEventTitle

      public String getEventTitle()
      Gets the title of the event.
      Returns:
      the event title as a String
    • setEventTitle

      public void setEventTitle(String eventTitle)
      Sets the title of the event.
      Parameters:
      eventTitle - the event title as a String
    • getEventDescription

      public String getEventDescription()
      Gets the description of the event.
      Returns:
      the event description as a String
    • setEventDescription

      public void setEventDescription(String eventDescription)
      Sets the description of the event.
      Parameters:
      eventDescription - the event description as a String
    • getEventLocation

      public String getEventLocation()
      Gets the location of the event.
      Returns:
      the event location as a String
    • setEventLocation

      public void setEventLocation(String eventLocation)
      Sets the location of the event.
      Parameters:
      eventLocation - the event location as a String
    • getEventStartDate

      public String getEventStartDate()
      Gets the start date of the event.
      Returns:
      the event start date as a String
    • setEventStartDate

      public void setEventStartDate(String eventStartDate)
      Sets the start date of the event.
      Parameters:
      eventStartDate - the event start date as a String
    • getEventStartTime

      public String getEventStartTime()
      Gets the start time of the event.
      Returns:
      the event start time as a String
    • setEventStartTime

      public void setEventStartTime(String eventStartTime)
      Sets the start time of the event.
      Parameters:
      eventStartTime - the event start time as a String
    • getEventEndDate

      public String getEventEndDate()
      Gets the end date of the event.
      Returns:
      the event end date as a String
    • setEventEndDate

      public void setEventEndDate(String eventEndDate)
      Sets the end date of the event.
      Parameters:
      eventEndDate - the event end date as a String
    • getEventEndTime

      public String getEventEndTime()
      Gets the end time of the event.
      Returns:
      the event end time as a String
    • setEventEndTime

      public void setEventEndTime(String eventEndTime)
      Sets the end time of the event.
      Parameters:
      eventEndTime - the event end time as a String
    • getEventImageUrl

      public String getEventImageUrl()
      Gets the URL of the event image.
      Returns:
      the event image URL as a String
    • setEventImageUrl

      public void setEventImageUrl(String eventImageUrl)
      Sets the URL of the event image.
      Parameters:
      eventImageUrl - the event image URL as a String
    • getMaxAttendees

      public Integer getMaxAttendees()
      Gets the maximum number of attendees for the event.
      Returns:
      the max number of attendees, or Integer.MAX_VALUE if not explicitly set.
    • setMaxAttendees

      public void setMaxAttendees(Integer maxAttendees)
      Sets the maximum number of attendees for the event.
      Parameters:
      maxAttendees - the maximum number of attendees. If null or negative, it defaults to Integer.MAX_VALUE.
    • isMaxAttendeesLimitReached

      public boolean isMaxAttendeesLimitReached()
      Checks if the maximum attendees limit has been reached.
      Returns:
      true if the registered attendees count is greater than or equal to the limit, or false if the limit has not been reached.
    • isGeolocationRequired

      public boolean isGeolocationRequired()
      Checks if geolocation is required for the event.
      Returns:
      true if geolocation is required, otherwise false
    • setGeolocationRequired

      public void setGeolocationRequired(boolean geolocationRequired)
      Sets whether geolocation is required for the event.
      Parameters:
      geolocationRequired - a boolean indicating geolocation requirement
    • getWaitingList

      public List<String> getWaitingList()
      Gets the list of waiting attendees.
      Returns:
      a List of Strings representing waiting attendees
    • setWaitingList

      public void setWaitingList(List<String> waitingList)
      Sets the waiting list of attendees.
      Parameters:
      waitingList - a List of Strings representing waiting attendees
    • getWaitingListLimit

      public Integer getWaitingListLimit()
      Gets the waiting list limit.
      Returns:
      the waiting list limit, or Integer.MAX_VALUE if no limit is set.
    • setWaitingListLimit

      public void setWaitingListLimit(Integer waitingListLimit)
      Sets the waiting list limit.
      Parameters:
      waitingListLimit - the maximum number of entries allowed in the waiting list. If null or negative, it defaults to Integer.MAX_VALUE.
    • isWaitingListLimitReached

      public boolean isWaitingListLimitReached()
      Checks if the waiting list limit has been reached.
      Returns:
      true if the waiting list size is greater than or equal to the limit, or false if the limit has not been reached.
    • addWaitingListEntrant

      public void addWaitingListEntrant(String entrantID)
      Adds an entrant to the waiting list.
      Parameters:
      entrantID - the ID of the entrant to add as a String
    • getRegisteredAttendees

      public List<String> getRegisteredAttendees()
      Gets the list of registered attendees.
      Returns:
      a List of Strings representing registered attendees
    • setRegisteredAttendees

      public void setRegisteredAttendees(List<String> registeredAttendees)
      Sets the list of registered attendees.
      Parameters:
      registeredAttendees - a List of Strings representing registered attendees
    • addRegisteredAttendees

      public void addRegisteredAttendees(String registeredID)
      Adds an attendee to the registered list.
      Parameters:
      registeredID - the ID of the attendee as a String
    • getQrCode

      public String getQrCode()
      Returns the hashed qrcode string for an event
      Returns:
      qrCode the hashed qrcode
    • setQrCode

      public void setQrCode(String qrCode)
      Sets the event qrcode
      Parameters:
      qrCode - the hashed qrcode of the event
    • setEventQrUrl

      public void setEventQrUrl(String qrUrl)
      The Url linking to an qrcode image
      Parameters:
      qrUrl - url for qrcode image
    • getEventQrUrl

      public String getEventQrUrl()
      Return the qrcode url
      Returns:
      eventQrUrl The url of the qrcode
    • setOrganizerID

      public void setOrganizerID(String organizerID)
      Set the organizer id for the event
      Parameters:
      organizerID - The id of the user who created the event
    • getOrganizerID

      public String getOrganizerID()
      Gets the ID of the event organizer.
      Returns:
      Return the organizer's ID as a String.
    • getDeclinedList

      public ArrayList<String> getDeclinedList()
      Gets the list of users who declined the invitation.
      Returns:
      Return the declined list as an ArrayList of Strings.
    • getInvitedList

      public ArrayList<String> getInvitedList()
      Gets the list of users who are invited to the event.
      Returns:
      Return the invited list as an ArrayList of Strings.
    • setInvitedList

      public void setInvitedList(ArrayList<String> invitedList)
      Sets the list of users invited to the event.
      Parameters:
      invitedList - This is the ArrayList of Strings representing the invited users.
    • setDeclinedList

      public void setDeclinedList(ArrayList<String> declinedList)
      Sets the list of users who declined the invitation.
      Parameters:
      declinedList - This is the ArrayList of Strings representing users who declined.
    • addToInviteList

      public void addToInviteList(String userId)
      Adds a user to the invite list.
      Parameters:
      userId - This is the ID of the user to add to the invited list.
    • addToDeclineList

      public void addToDeclineList(String userId)
      Adds a user to the declined list.
      Parameters:
      userId - This is the ID of the user to add to the declined list.
    • removeFromInviteList

      public void removeFromInviteList(String userId)
      Removes a user from the invite list.
      Parameters:
      userId - This is the ID of the user to remove from the invited list.
    • removeFromDeclinedList

      public void removeFromDeclinedList(String userId)
      Removes a user from the declined list.
      Parameters:
      userId - This is the ID of the user to remove from the declined list.
    • setFacilityId

      public void setFacilityId(String facilityId)
      Set the facility ID for an event
      Parameters:
      facilityId - The facility ID for the event
    • getFacilityId

      public String getFacilityId()
      Gets the facility ID for an event
      Returns:
      Return the facility ID for an event
    • getLocations

      public Map<String,Object> getLocations()
      Gets a maps containing all the entrants who joined a waitlist and the locations they joined from
      Returns:
      Map<String, Object> The map of entrants and their locations
    • setLocations

      public void setLocations(Map<String,Object> locations)
      Sets a map containing entrants and their locations
      Parameters:
      locations - a map holding entrant IDs as the key and their location as the value
    • addLocation

      public void addLocation(String key, Object location)
      Adds a location to the locations map
      Parameters:
      key - user ID
      location - Location user joined waitlist from
    • getLocation

      public Object getLocation(String key)
      Gets a location based on an entrant id
      Parameters:
      key - entrant id
      Returns:
      Object of users location
    • deleteLocation

      public void deleteLocation(String key)
      Deletes a location based on a key
      Parameters:
      key - entrant id