KickJava   Java API By Example, From Geeks To Geeks.

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

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