1 package at.ac.tuwien.sbc.valesriegler.types;
3 import at.ac.tuwien.sbc.valesriegler.common.HasId;
4 import org.mozartspaces.capi3.Queryable;
6 import java.io.Serializable;
9 * A table is a thing, where people can put things at. Possibly a laptop, to
10 * have free hands to hold a pizzabox on the knees.
15 @Queryable(autoindex = true)
16 public class Table implements Serializable, HasId {
17 private static int idNext = 0;
18 private final Integer id;
20 private Integer groupId = -1;
23 * is needed for spaces linda selection
25 private Boolean isFree = true;
27 public Table(Integer id) {
40 public int getGroupId() {
44 public void setGroupId(int groupId) {
45 this.groupId = groupId;
53 public void setFree(Boolean free) {
57 public boolean isFree() {
64 public String toString() {
65 return "Table [id=" + id + ", groupId=" + groupId + "]";
69 public int hashCode() {
72 result = prime * result + ((id == null) ? 0 : id.hashCode());
77 public boolean equals(Object obj) {
82 if (getClass() != obj.getClass())
84 Table other = (Table) obj;
88 } else if (!id.equals(other.id))