1 16 17 package info.jtrac.domain; 18 19 import java.io.Serializable ; 20 21 import static info.jtrac.domain.Field.Name.*; 22 import java.util.ArrayList ; 23 import java.util.List ; 24 import java.util.Map ; 25 26 33 public class Space implements Serializable { 34 35 private long id; 36 private int version; 37 private Integer type; 38 private String prefixCode; 39 private String name; 40 private String description; 41 private boolean guestAllowed; 42 private SpaceSequence spaceSequence = new SpaceSequence(); 43 private Metadata metadata = new Metadata(); 44 45 47 public int getVersion() { 48 return version; 49 } 50 51 public void setVersion(int version) { 52 this.version = version; 53 } 54 55 public SpaceSequence getSpaceSequence() { 56 return spaceSequence; 57 } 58 59 public void setSpaceSequence(SpaceSequence spaceSequence) { 60 this.spaceSequence = spaceSequence; 61 } 62 63 public String getPrefixCode() { 64 return prefixCode; 65 } 66 67 public void setPrefixCode(String prefixCode) { 68 this.prefixCode = prefixCode; 69 } 70 71 public String getName() { 72 return name; 73 } 74 75 public void setName(String name) { 76 this.name = name; 77 } 78 79 public String getDescription() { 80 return description; 81 } 82 83 public void setDescription(String description) { 84 this.description = description; 85 } 86 87 public Metadata getMetadata() { 88 return metadata; 89 } 90 91 public void setMetadata(Metadata metadata) { 92 this.metadata = metadata; 93 } 94 95 public long getId() { 96 return id; 97 } 98 99 public void setId(long id) { 100 this.id = id; 101 } 102 103 public Integer getType() { 104 return type; 105 } 106 107 public void setType(Integer type) { 108 this.type = type; 109 } 110 111 public boolean isGuestAllowed() { 112 return guestAllowed; 113 } 114 115 public void setGuestAllowed(boolean guestAllowed) { 116 this.guestAllowed = guestAllowed; 117 } 118 119 @Override 120 public String toString() { 121 StringBuffer sb = new StringBuffer (); 122 sb.append("id [").append(id); 123 sb.append("]; prefixCode [").append(prefixCode); 124 sb.append("]"); 125 return sb.toString(); 126 } 127 128 @Override 129 public boolean equals(Object o) { 130 if (this == o) { 131 return true; 132 } 133 if (!(o instanceof Space)) { 134 return false; 135 } 136 final Space s = (Space) o; 137 return prefixCode.equals(s.getPrefixCode()); 138 } 139 140 @Override 141 public int hashCode() { 142 return prefixCode.hashCode(); 143 } 144 145 } 146 | Popular Tags |