KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*
2  * JBoss, the OpenSource J2EE webOS
3  *
4  * Distributable under LGPL license.
5  * See terms of license at gnu.org.
6  */

7 package org.jboss.cache.pojo.test;
8
9
10 /**
11  * Test class for PojoCache for circular references.
12  * Link is a POJO that will be instrumentet with CacheFieldInterceptor
13  *
14  * @version $Revision: 1.4 $
15  * <p>Below is the annotation that signifies this class is "prepared" under JBossAop. This is used in
16  * conjunction with a special jboss-aop.xml (supplied by JBossCache). In addition, this is JDK1.4 style,
17  * so a annoc Ant build target is needed to pre-compile it.</p>
18  * <p>To use this approach, just apply this line to your pojo and run annoc (and possibly aopc).</p>
19  */

20 // We are using JDK1.5 annotation.
21
@org.jboss.cache.pojo.annotation.Replicable
22 public class Link
23 {
24    Link link_;
25    String JavaDoc name_;
26
27    public Link()
28    {
29    }
30
31    public Link(String JavaDoc name)
32    {
33       name_ = name;
34    }
35
36    public void setName(String JavaDoc linkName)
37    {
38       name_ = linkName;
39    }
40
41    public String JavaDoc getName()
42    {
43       return name_;
44    }
45
46    public void setLink(Link link)
47    {
48       link_ = link;
49    }
50
51    public Link getLink()
52    {
53       return link_;
54    }
55
56    public String JavaDoc toString()
57    {
58       StringBuffer JavaDoc buf = new StringBuffer JavaDoc();
59       buf.append("Link: name " + name_);
60       return buf.toString();
61    }
62 }
63
Popular Tags