public class GroupReservation extends IndividualReservation
IndividualReservation
, but
students cannot be assigned over the limit and the priority is lower than on
individual reservations. Also, a different limit than the number of students
in the group can be provided.
Reservation.ReservationContext
Modifier and Type | Field and Description |
---|---|
static boolean |
DEFAULT_ALLOW_OVERLAP
Overlaps are not allowed for group reservations.
|
static boolean |
DEFAULT_CAN_ASSIGN_OVER_LIMIT
Group reservations cannot 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
Group reservations are of the second highest priority
|
sMaxSize
Modifier | Constructor and Description |
---|---|
|
GroupReservation(long id,
double limit,
Offering offering,
Collection<Long> studentIds)
Constructor
|
protected |
GroupReservation(long id,
double limit,
Offering offering,
int priority,
boolean mustBeUsed,
boolean canAssignOverLimit,
boolean allowOverlap,
Collection<Long> studentIds)
Constructor
|
protected |
GroupReservation(long id,
double limit,
Offering offering,
int priority,
boolean mustBeUsed,
boolean canAssignOverLimit,
boolean allowOverlap,
Long... studentIds)
Constructor
|
|
GroupReservation(long id,
double limit,
Offering offering,
Long... studentIds)
Constructor
|
Modifier and Type | Method and Description |
---|---|
double |
getReservationLimit()
Reservation limit
|
void |
setReservationLimit(double limit)
Set reservation limit (-1 for unlimited)
|
getStudentIds, isApplicable
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
public GroupReservation(long id, double limit, Offering offering, Long... studentIds)
id
- unique idlimit
- reservation limit (-1 for unlimited)offering
- offering for which the reservation isstudentIds
- one or more studentspublic GroupReservation(long id, double limit, Offering offering, Collection<Long> studentIds)
id
- unique idlimit
- reservation limit (-1 for unlimited)offering
- offering for which the reservation isstudentIds
- one or more studentsprotected GroupReservation(long id, double limit, Offering offering, int priority, boolean mustBeUsed, boolean canAssignOverLimit, boolean allowOverlap, Long... studentIds)
id
- reservation unique idlimit
- reservation limit (-1 for unlimited)offering
- 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 studentsprotected GroupReservation(long id, double limit, Offering offering, int priority, boolean mustBeUsed, boolean canAssignOverLimit, boolean allowOverlap, Collection<Long> studentIds)
id
- reservation unique idlimit
- reservation limit (-1 for unlimited)offering
- 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 double getReservationLimit()
getReservationLimit
in class IndividualReservation
public void setReservationLimit(double limit)
limit
- reservation limit, -1 if unlimited