Exemple #1
0
 public int compareTo(Room entity) {
   if (!exists) {
     if (this == entity) return 0;
     if (this.hashCode() <= entity.hashCode()) return -7;
     return 7;
   }
   if (entity == null) return -4711;
   if (equals(entity)) {
     return 0;
   }
   return RelationManager.compareValues(id(), entity.id());
 }
  RoomProvidesFeature(RelationManager manager, Room subject, Feature object, int _quantity) {
    if (subject == null || object == null) {
      throw new IllegalArgumentException();
    }
    this.manager = manager;
    this.subject = subject;
    this.subject_refid = subject.id();
    this.object = object;
    this.object_refid = object.id();

    this._quantity = _quantity;
    this.fetched_quantity = true;
  }
  ElementInstancePrefersRoom(
      RelationManager manager, CourseElementInstance subject, Room object, int _priority) {
    if (subject == null || object == null) {
      throw new IllegalArgumentException();
    }
    this.manager = manager;
    this._elementInstance = this.subject = subject;
    this.ref_elementInstance = this.subject_refid = subject.id();
    this._room = this.object = object;
    this.ref_room = this.object_refid = object.id();
    timekey(true);

    this._priority = _priority;
    this.fetched_priority = true;
  }
Exemple #4
0
 public boolean equals(Room entity) {
   return entity.id() == id();
 }
Exemple #5
0
 public int compareTo(Room entity) {
   if (equals(entity)) {
     return 0;
   }
   return RelationManager.compareIds(id(), entity.id());
 }
Exemple #6
0
 public boolean equals(Room entity) {
   if (entity == null) return false;
   if (!exists) return this == entity;
   return entity.id() == id();
 }