public class OnlineReservation extends Reservation
Reservation.ReservationContext
sMaxSize
Constructor and Description |
---|
OnlineReservation(int type,
long id,
Offering offering,
int priority,
boolean over,
int limit,
boolean apply,
boolean mustUse,
boolean allowOverlap,
boolean expired)
Constructor
|
OnlineReservation(int type,
long id,
Offering offering,
int priority,
boolean over,
int limit,
boolean apply,
boolean mustUse,
boolean allowOverlap,
boolean expired,
boolean override)
Constructor
|
Modifier and Type | Method and Description |
---|---|
double |
getLimitCap()
Compute limit cap (maximum number of students that can get into the offering using this reservation)
|
double |
getReservationLimit()
Reservation limit
|
int |
getType() |
boolean |
isApplicable(Student student)
Returns true if the student is applicable for the reservation
|
boolean |
isOverride() |
boolean |
mustBeUsed()
If true, student must use the reservation (if applicable).
|
addConfig, addSection, addSection, areRestrictionsInclusive, canAssignOverLimit, canBatchAssignOverLimit, canBreakLinkedSections, canEnroll, compareTo, compareTo, createAssignmentContext, getConfigs, getEnrollments, getId, getLimit, getLimit, getLimitCap, getModel, getOffering, getPriority, getReservedAvailableSpace, getReservedAvailableSpace, getRestrictivity, getSections, getSections, inheritAssignmentContext, isAllowDisabled, isAllowOverlap, isExpired, isIncluded, mustBeUsedIgnoreExpiration, neverIncluded, setAllowDisabled, setAllowOverlap, setBreakLinkedSections, setCanAssignOverLimit, setExpired, setMustBeUsed, setNeverIncluded, setPriority
getAssignmentContextReference, getContext, getContext, setAssignmentContextReference
public OnlineReservation(int type, long id, Offering offering, int priority, boolean over, int limit, boolean apply, boolean mustUse, boolean allowOverlap, boolean expired, boolean override)
type
- reservation typeid
- reservation unique idoffering
- reservation offeringpriority
- reservation priorityover
- true when the reservation allows the student to be assigned over the limitlimit
- reservation limitapply
- true if the reservation applies to the given studentmustUse
- true if the reservation must be usedallowOverlap
- true if the reservation allows for time overlapsexpired
- true if the reservation is expiredoverride
- true if the reservation is reservation overridepublic OnlineReservation(int type, long id, Offering offering, int priority, boolean over, int limit, boolean apply, boolean mustUse, boolean allowOverlap, boolean expired)
type
- reservation typeid
- reservation unique idoffering
- reservation offeringpriority
- reservation priorityover
- true when the reservation allows the student to be assigned over the limitlimit
- reservation limitapply
- true if the reservation applies to the given studentmustUse
- true if the reservation must be usedallowOverlap
- true if the reservation allows for time overlapsexpired
- true if the reservation is expiredpublic int getType()
public double getReservationLimit()
Reservation
getReservationLimit
in class Reservation
public boolean isApplicable(Student student)
Reservation
isApplicable
in class Reservation
student
- a studentpublic boolean isOverride()
public boolean mustBeUsed()
Reservation
mustBeUsed
in class Reservation
public double getLimitCap()
Reservation
getLimitCap
in class Reservation