public class ReservationOverride extends IndividualReservation
IndividualReservation
for a particular student (or students) that allows for defining whether
it must be used, whether time conflicts are allowed, and whether it
is allowed to assign the student over the limit. This class is intended to be used
to model student overrides.
Reservation.ReservationContext
Constructor and Description |
---|
ReservationOverride(long id,
Offering offering,
Collection<Long> studentIds)
Constructor
|
ReservationOverride(long id,
Offering offering,
Long... studentIds)
Constructor
|
Modifier and Type | Method and Description |
---|---|
boolean |
canAssignOverLimit()
Individual reservations are the only reservations that can be assigned over the limit.
|
int |
getPriority()
Overrides comes just after individual and group reservations
|
boolean |
isAllowOverlap()
Overlaps are allowed for individual reservations.
|
boolean |
mustBeUsed()
Return if the override must be used (unless it is expired)
|
void |
setAllowOverlap(boolean allowOverlap)
Set if the override allows for time conflicts
|
void |
setCanAssignOverLimit(boolean allowOverLimit)
Set if the override allows for over the limit assignment
|
void |
setMustBeUsed(boolean mustBeUsed)
Set if the override must be used
|
getReservationLimit, getStudentIds, isApplicable
addConfig, addSection, canEnroll, compareTo, compareTo, createAssignmentContext, getConfigs, getEnrollments, getId, getLimit, getLimitCap, getModel, getOffering, getReservedAvailableSpace, getRestrictivity, getSections, getSections, isExpired, isIncluded, setExpired
getAssignmentContextReference, getContext, getContext, setAssignmentContextReference, setContext
public ReservationOverride(long id, Offering offering, Long... studentIds)
id
- unique idoffering
- offering for which the reservation isstudentIds
- one or more studentspublic ReservationOverride(long id, Offering offering, Collection<Long> studentIds)
id
- unique idoffering
- offering for which the reservation isstudentIds
- one or more studentspublic void setMustBeUsed(boolean mustBeUsed)
mustBeUsed
- true if the override must be used (if not expired)public boolean mustBeUsed()
mustBeUsed
in class IndividualReservation
public void setAllowOverlap(boolean allowOverlap)
allowOverlap
- true if time overlaps are allowedpublic boolean isAllowOverlap()
isAllowOverlap
in class IndividualReservation
public void setCanAssignOverLimit(boolean allowOverLimit)
allowOverLimit
- true if the student can get into the course, configuration, or class over the limitpublic boolean canAssignOverLimit()
canAssignOverLimit
in class IndividualReservation
public int getPriority()
getPriority
in class IndividualReservation
Copyright © 2014 UniTime LLC. All Rights Reserved.