01: package com.silvermindsoftware.hitch.sample.model;
02:
03: /**
04: * Copyright 2007 Brandon Goodin
05: *
06: * Licensed under the Apache License, Version 2.0 (the "License");
07: * you may not use this file except in compliance with the License.
08: * You may obtain a copy of the License at
09: *
10: * http://www.apache.org/licenses/LICENSE-2.0
11: *
12: * Unless required by applicable law or agreed to in writing, software
13: * distributed under the License is distributed on an "AS IS" BASIS,
14: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15: * See the License for the specific language governing permissions and
16: * limitations under the License.
17: */
18:
19: public class Sex {
20:
21: private Integer id;
22: private String sex;
23:
24: public Sex() {
25: }
26:
27: public Sex(Integer id, String sex) {
28: this .id = id;
29: this .sex = sex;
30:
31: }
32:
33: public String getSex() {
34: return sex;
35: }
36:
37: public void setSex(String sex) {
38: this .sex = sex;
39: }
40:
41: public Integer getId() {
42: return id;
43: }
44:
45: public void setId(Integer id) {
46: this .id = id;
47: }
48:
49: public boolean equals(Object o) {
50: if (this == o)
51: return true;
52: if (o == null || getClass() != o.getClass())
53: return false;
54:
55: Sex sex1 = (Sex) o;
56:
57: if (id != null ? !id.equals(sex1.id) : sex1.id != null)
58: return false;
59: if (sex != null ? !sex.equals(sex1.sex) : sex1.sex != null)
60: return false;
61:
62: return true;
63: }
64:
65: public int hashCode() {
66: int result;
67: result = (id != null ? id.hashCode() : 0);
68: result = 31 * result + (sex != null ? sex.hashCode() : 0);
69: return result;
70: }
71:
72: public String toString() {
73: return sex;
74: }
75: }
|