Class SignupTimeslot

  • All Implemented Interfaces:
    Comparable

    public class SignupTimeslot
    extends Object
    implements Comparable

    This class holds the information for signup time slot. This object is mapped directly to the DB storage by Hibernate

    • Field Detail

      • UNLIMITED

        public static final int UNLIMITED
        a constants maximum number for attendees
        See Also:
        Constant Field Values
    • Constructor Detail

      • SignupTimeslot

        public SignupTimeslot()
        constructor
    • Method Detail

      • isAvailable

        public boolean isAvailable()
        check if current time slot is available for adding more people
        Returns:
        true if current time slot is available for adding more people
      • getAttendee

        public SignupAttendee getAttendee​(String attendeeId)
        get the SignupAttendee object according to the attendee's Id
        Parameters:
        attendeeId - an attendee's Id
        Returns:
        a SignupAttendee object
      • getWaiter

        public SignupAttendee getWaiter​(String attendeeId)
        get the SignupAttendee object according to the attendee's Id, who is on the waiting list at the time slot
        Parameters:
        attendeeId - an attendee's Id
        Returns:
        a SignupAttendee object
      • isUnlimitedAttendee

        public boolean isUnlimitedAttendee()
        check if the time slot allows unlimited attendee to join
        Returns:
        true if the time slot allows unlimited attendee to join
      • getParticipantsNum

        public int getParticipantsNum()
        This method will obtain number of participants total signed
        Returns:
        a int
      • getWaitingListNum

        public int getWaitingListNum()
        This method will obtain the number of participants total signed in the waiting list
        Returns:
        a int