1 |
| |
2 |
| |
3 |
| |
4 |
| |
5 |
| |
6 |
| |
7 |
| |
8 |
| package org.jboss.cache.pojo.test; |
9 |
| |
10 |
| |
11 |
| |
12 |
| |
13 |
| public class NonSerializableObject { |
14 |
| |
15 |
| private String id; |
16 |
| |
17 |
0
| public String getId() {
|
18 |
0
| return id;
|
19 |
| } |
20 |
| |
21 |
0
| public void setId(String id) {
|
22 |
0
| this.id = id;
|
23 |
| } |
24 |
| |
25 |
0
| public NonSerializableObject() {
|
26 |
| } |
27 |
| |
28 |
0
| public NonSerializableObject(String aId) {
|
29 |
0
| id = aId;
|
30 |
| } |
31 |
| |
32 |
| |
33 |
0
| public String toString() {
|
34 |
0
| return id;
|
35 |
| } |
36 |
| |
37 |
0
| public boolean equals(Object aObject) {
|
38 |
0
| boolean result = false;
|
39 |
| |
40 |
0
| if ((aObject != null) &&
|
41 |
| (aObject.getClass().getName().equals( this.getClass().getName()))) { |
42 |
0
| if (id.equals(((NonSerializableObject)aObject).id)) {
|
43 |
0
| result = true;
|
44 |
| } |
45 |
| } |
46 |
| |
47 |
0
| return result;
|
48 |
| } |
49 |
| |
50 |
0
| public int hashCode() {
|
51 |
0
| return id.hashCode();
|
52 |
| } |
53 |
| } |