public class IndividualReservation extends Reservation
Reservation.ReservationContext
Modifier and Type | Field and Description |
---|---|
static boolean |
DEFAULT_ALLOW_OVERLAP
Overlaps are allowed for individual reservations.
|
static boolean |
DEFAULT_CAN_ASSIGN_OVER_LIMIT
Individual reservations are the only reservations that can be assigned over the limit.
|
static boolean |
DEFAULT_MUST_BE_USED
Individual or group reservation must be used (unless it is expired)
|
static int |
DEFAULT_PRIORITY
Individual reservations are of the top priority
|
sMaxSize
Modifier | Constructor and Description |
---|---|
|
IndividualReservation(long id,
Offering offering,
Collection<Long> studentIds)
Constructor
|
protected |
IndividualReservation(long id,
Offering offering,
int priority,
boolean mustBeUsed,
boolean canAssignOverLimit,
boolean allowOverlap,
Collection<Long> studentIds)
Constructor
|
protected |
IndividualReservation(long id,
Offering offering,
int priority,
boolean mustBeUsed,
boolean canAssignOverLimit,
boolean allowOverlap,
Long... studentIds)
Constructor
|
|
IndividualReservation(long id,
Offering offering,
Long... studentIds)
Constructor
|
Modifier and Type | Method and Description |
---|---|
double |
getReservationLimit()
Reservation limit == number of students in the reservation
|
Set<Long> |
getStudentIds()
Students in the reservation
|
boolean |
isApplicable(Student student)
Reservation is applicable for all students in the reservation
|
addConfig, addSection, addSection, areRestrictionsInclusive, canAssignOverLimit, canBatchAssignOverLimit, canBreakLinkedSections, canEnroll, compareTo, compareTo, createAssignmentContext, getConfigs, getEnrollments, getId, getLimit, getLimit, getLimitCap, getLimitCap, getModel, getOffering, getPriority, getReservedAvailableSpace, getReservedAvailableSpace, getRestrictivity, getSections, getSections, inheritAssignmentContext, isAllowDisabled, isAllowOverlap, isExpired, isIncluded, mustBeUsed, mustBeUsedIgnoreExpiration, neverIncluded, setAllowDisabled, setAllowOverlap, setBreakLinkedSections, setCanAssignOverLimit, setExpired, setMustBeUsed, setNeverIncluded, setPriority
getAssignmentContextReference, getContext, getContext, setAssignmentContextReference
public static final int DEFAULT_PRIORITY
public static final boolean DEFAULT_MUST_BE_USED
public static final boolean DEFAULT_CAN_ASSIGN_OVER_LIMIT
public static final boolean DEFAULT_ALLOW_OVERLAP
protected IndividualReservation(long id, Offering offering, int priority, boolean mustBeUsed, boolean canAssignOverLimit, boolean allowOverlap, Long... studentIds)
id
- reservation unique idoffering
- instructional offering on which the reservation is setpriority
- reservation prioritymustBeUsed
- must this reservation be usedcanAssignOverLimit
- can assign over class / configuration / course limitallowOverlap
- does this reservation allow for overlapsstudentIds
- one or more studentspublic IndividualReservation(long id, Offering offering, Long... studentIds)
id
- unique idoffering
- offering for which the reservation isstudentIds
- one or more studentsprotected IndividualReservation(long id, Offering offering, int priority, boolean mustBeUsed, boolean canAssignOverLimit, boolean allowOverlap, Collection<Long> studentIds)
id
- reservation unique idoffering
- instructional offering on which the reservation is setpriority
- reservation prioritymustBeUsed
- must this reservation be usedcanAssignOverLimit
- can assign over class / configuration / course limitallowOverlap
- does this reservation allow for overlapsstudentIds
- one or more studentspublic IndividualReservation(long id, Offering offering, Collection<Long> studentIds)
id
- unique idoffering
- offering for which the reservation isstudentIds
- one or more studentspublic boolean isApplicable(Student student)
isApplicable
in class Reservation
student
- a studentpublic Set<Long> getStudentIds()
public double getReservationLimit()
getReservationLimit
in class Reservation