/******************************************************************* Copyright (c) 2001-2010 Apprisant Technologies Inc. All rights reserved. Apprisant Technologies permits non-exclusive royalty free use, copying and modification of this demo program source code for the purposes of evaluating the Apprisant Toolkit or building applications that use it. This software and documentation is provided "AS IS". APPRISANT TECHNOLOGIES DISCLAIMS ANY REPRESENTATIONS AND WARRANTIES, INCLUDING BUT NOT LIMITED TO ANY IMPLIED WARRANTY OF MERCHANTABILITY AND FITNESS OF THIS PRODUCT FOR ANY PARTICULAR PURPOSE. APPRISANT TECHNOLOGIES SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY ANY PARTY, INCLUDING LOST PROFITS, ARISING FROM THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ITS DERIVATIONS. ********************************************************************/ package schedule; /* Data object class for the Schedule demo. */ public class Booking { // Day values static enum Day { MON, TUES, WED, THUR, FRI } private Integer key; private String classID; private String profName; private Day day; private float startTime; private int duration; // minutes public Booking (int key, String classID, String profName, Day day, float startTime, int duration) { this.key = key; this.classID = classID; this.profName = profName; this.day = day; this.startTime = startTime; this.duration = duration; } public Integer getKey() { return key; } public void setClassID (String classID) { this.classID = classID; } public String getClassID() { return classID; } public String getDepartment() { return classID.substring(0, 4); } public void setProfName (String profName) { this.profName = profName; } public String getProfName() { return profName; } public void setDay (Day day) { this.day = day; } public Day getDay() { return day; } public void setStartTime (float startTime) { this.startTime = startTime; } public float getStartTime() { return startTime; } public void setDuration (int duration) { this.duration = duration; } public int getDuration() { return duration; } }