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;
11 * A table is a thing, where people can put things at. Possibly a laptop, to
12 * have free hands to hold a pizzabox on the knees.
17 @Queryable(autoindex=true)
18 public class Table implements Serializable, HasId {
19 private static int idNext = 0;
20 private final Integer id;
22 private Integer groupId = -1;
24 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 + "]";
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))