1 package at.ac.tuwien.sbc.valesriegler.types;
3 import java.io.Serializable;
5 import org.mozartspaces.capi3.Queryable;
7 import at.ac.tuwien.sbc.valesriegler.common.HasId;
10 * A table is a thing, where people can put things at. Possibly a laptop, to
11 * have free hands to hold a pizzabox on the knees.
16 @Queryable(autoindex = true)
17 public class Table implements Serializable, HasId {
18 private static int idNext = 0;
19 private final Integer id;
21 private Integer groupId = -1;
23 public Table(Integer id) {
36 public int getGroupId() {
40 public void setGroupId(int groupId) {
41 this.groupId = groupId;
44 public boolean isFree() {
51 public String toString() {
52 return "Table [id=" + id + ", groupId=" + groupId + "]";
56 public int hashCode() {
59 result = prime * result + ((id == null) ? 0 : id.hashCode());
64 public boolean equals(Object obj) {
69 if (getClass() != obj.getClass())
71 Table other = (Table) obj;
75 } else if (!id.equals(other.id))