/*This code was generated using the UMPLE modeling language! Date of generation: 2008/07/30 10:46:15*/ /*This class drives: */ package hotel.core; import java.sql.Time; import hotel.*; import hotel.json.*; public class Event extends Booking { //Class datatypes private String description; //Class association variables //Registry of our system. HotelRegistry registry = HotelRegistry.getInstance(); //Constructor public Event(String aStartDate, String aEndDate, String aStartTime, String aEndTime, String aBedroomsRequired, String aCreditCardToBill, Booking aBooking, Person aPerson, String aDescription) { super(aStartDate, aEndDate, aStartTime, aEndTime, aBedroomsRequired, aCreditCardToBill, aBooking, aPerson); description = aDescription; } public boolean setDescription(String aDescription) { description = aDescription; return true; } public String getDescription() { return description; } public void delete() { } public boolean areManyEndsNull() { return true; } /*********************************** * Returns the attribute list along with the * class ID in JSON format. ***********************************/ public JSONObject getAttributes() throws JSONException { JSONObject obj = new JSONObject(); obj.put("CLASS_ID", registry.getKey(this)); obj.put("description", getDescription()); return obj; } }