1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.apache.ibatis.domain.blog;
17
18 public class PostLite {
19 private PostLiteId theId;
20 private int blogId;
21
22 public PostLite() {
23 }
24
25 public PostLite(PostLiteId aId, int aBlogId) {
26 blogId = aBlogId;
27 theId = aId;
28 }
29
30 public void setId(PostLiteId aId) {
31 theId = aId;
32 }
33
34 public void setBlogId(int aBlogId) {
35 blogId = aBlogId;
36 }
37
38 public PostLiteId getId() {
39 return theId;
40 }
41
42 public int getBlogId() {
43 return blogId;
44 }
45
46 @Override
47 public boolean equals(Object o) {
48 if (this == o) {
49 return true;
50 }
51 if (o == null || getClass() != o.getClass()) {
52 return false;
53 }
54
55 final PostLite that = (PostLite) o;
56
57 if ((blogId != that.blogId) || (theId != null ? !theId.equals(that.theId) : that.theId != null)) {
58 return false;
59 }
60
61 return true;
62 }
63
64 @Override
65 public int hashCode() {
66 int myresult = theId != null ? theId.hashCode() : 0;
67 return 31 * myresult + blogId;
68 }
69 }