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() {
53 public String toString() {
54 return "Table [id=" + id + ", groupId=" + groupId + "]";
58 public int hashCode() {
61 result = prime * result + ((id == null) ? 0 : id.hashCode());
66 public boolean equals(Object obj) {
71 if (getClass() != obj.getClass())
73 Table other = (Table) obj;
77 } else if (!id.equals(other.id))