Exemplo n.º 1
0
 public Appointment(
     int appointmentId,
     String title,
     String description,
     long startTime,
     long finishTime,
     Room room,
     User owner) {
   this.appointmentId = appointmentId;
   this.title = title;
   this.description = description;
   this.startTime = new GregorianCalendar();
   this.startTime.setTimeInMillis(startTime);
   this.finishTime = new GregorianCalendar();
   this.finishTime.setTimeInMillis(finishTime);
   this.room = room;
   if (room != null) {
     room.addAppointment(this);
   }
   this.owner = owner;
   if (owner != null) {
     owner.addOwnership(this);
   }
   participants = new ArrayList<Participant>();
   pcs = new PropertyChangeSupport(this);
 }
Exemplo n.º 2
0
 public Appointment(
     int appointmentId, String title, Calendar startTime, Calendar finishTime, User owner) {
   this.appointmentId = appointmentId;
   this.title = title;
   this.startTime = startTime;
   this.finishTime = finishTime;
   this.owner = owner;
   if (owner != null) {
     owner.addOwnership(this);
   }
   participants = new ArrayList<Participant>();
   pcs = new PropertyChangeSupport(this);
 }