KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > cache > pojo > test > SpecialSerializedAddress


1 /*
2  * JBoss, Home of Professional Open Source
3  *
4  * Distributable under LGPL license.
5  * See terms of license at gnu.org.
6  */

7
8 package org.jboss.cache.pojo.test;
9
10 import java.io.Serializable JavaDoc;
11 import java.util.ArrayList JavaDoc;
12 import java.util.List JavaDoc;
13
14 /**
15  * Test class for PojoCache.
16  *
17  * @version $Revision: 1.3 $
18  */

19 @org.jboss.cache.pojo.annotation.Replicable
20 public class SpecialSerializedAddress implements Serializable JavaDoc
21 {
22    String JavaDoc street = null;
23    String JavaDoc city = null;
24    int zip = 0;
25
26    List JavaDoc residents = new ArrayList JavaDoc();
27
28    public List JavaDoc getResidents()
29    {
30       return residents;
31    }
32
33    public void setResidents(List JavaDoc residents)
34    {
35       this.residents = residents;
36    }
37
38    public void addResidents(String JavaDoc name)
39    {
40       residents.add(name);
41    }
42
43    public String JavaDoc getStreet()
44    {
45       return street;
46    }
47
48    public void setStreet(String JavaDoc street)
49    {
50       this.street = street;
51    }
52
53    public String JavaDoc getCity()
54    {
55       return city;
56    }
57
58    public void setCity(String JavaDoc city)
59    {
60       this.city = city;
61    }
62
63    public int getZip()
64    {
65       return zip;
66    }
67
68    public void setZip(int zip)
69    {
70       this.zip = zip;
71    }
72
73    public String JavaDoc toString()
74    {
75       return "street=" + getStreet() + ", city=" + getCity() + ", zip=" + getZip();
76    }
77
78 // public Object writeReplace() {
79
// return this;
80
// }
81
}
82
Popular Tags