001 package net.sf.cpsolver.studentsct.reservation;
002
003 import net.sf.cpsolver.studentsct.model.Offering;
004 import net.sf.cpsolver.studentsct.model.Student;
005
006 /**
007 * Dummy reservation. Use to fill remaining space for offerings that are marked as by reservation only.
008 *
009 * <br>
010 * <br>
011 *
012 * @version StudentSct 1.2 (Student Sectioning)<br>
013 * Copyright (C) 2007 - 2010 Tomas Muller<br>
014 * <a href="mailto:muller@unitime.org">muller@unitime.org</a><br>
015 * <a href="http://muller.unitime.org">http://muller.unitime.org</a><br>
016 * <br>
017 * This library is free software; you can redistribute it and/or modify
018 * it under the terms of the GNU Lesser General Public License as
019 * published by the Free Software Foundation; either version 3 of the
020 * License, or (at your option) any later version. <br>
021 * <br>
022 * This library is distributed in the hope that it will be useful, but
023 * WITHOUT ANY WARRANTY; without even the implied warranty of
024 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
025 * Lesser General Public License for more details. <br>
026 * <br>
027 * You should have received a copy of the GNU Lesser General Public
028 * License along with this library; if not see
029 * <a href='http://www.gnu.org/licenses/'>http://www.gnu.org/licenses/</a>.
030 */
031 public class DummyReservation extends Reservation {
032
033 /**
034 * Constructor
035 * @param offering offering on which the reservation is set
036 */
037 public DummyReservation(Offering offering) {
038 super(offering.getId(), offering);
039 }
040
041 /**
042 * Dummy reservation is unlimited
043 */
044 @Override
045 public double getReservationLimit() {
046 return -1;
047 }
048
049 /**
050 * Dummy reservation has low priority
051 */
052 @Override
053 public int getPriority() {
054 return 4;
055 }
056
057 /**
058 * Dummy reservation is not applicable to any students
059 */
060 @Override
061 public boolean isApplicable(Student student) {
062 return false;
063 }
064
065 /**
066 * Dummy reservation cannot go over the limit
067 */
068 @Override
069 public boolean canAssignOverLimit() {
070 return false;
071 }
072
073
074 /**
075 * Dummy reservation do not need to be used
076 */
077 @Override
078 public boolean mustBeUsed() {
079 return false;
080 }
081
082 }