KickJava   Java API By Example, From Geeks To Geeks.

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


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 org.jboss.cache.pojo.annotation.Serializable;
11 import org.jboss.cache.pojo.annotation.Transient;
12
13 /**
14  * Test class for PojoCache using annotation. This object consists of sub-objects
15  * that has special annotation.
16  *
17  * @version $Revision: 1.4 $
18  */

19 @org.jboss.cache.pojo.annotation.Replicable
20 public class Gadget
21 {
22    String JavaDoc name;
23    @Transient
24    Resource resource;
25    @Serializable
26    SpecialAddress addr;
27
28    public String JavaDoc getName()
29    {
30       return name;
31    }
32
33    public void setName(String JavaDoc name)
34    {
35       this.name = name;
36    }
37
38    public Resource getResource()
39    {
40       return resource;
41    }
42
43    public void setResource(Resource resource)
44    {
45       this.resource = resource;
46    }
47
48    public SpecialAddress getAddr()
49    {
50       return addr;
51    }
52
53    public void setAddr(SpecialAddress addr)
54    {
55       this.addr = addr;
56    }
57
58    public String JavaDoc toString()
59    {
60       return "name=" + getName() + ", resource=" + getResource() + ", SepcialAddress: " + getAddr();
61    }
62 }
63
Popular Tags