KickJava   Java API By Example, From Geeks To Geeks.

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


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 /**
11  * Test class for PojoCache using annotation. This represents a special resource
12  * type that can be declared @Transient. That is, it is neither Replicable nor
13  * Serializable.
14  *
15  * @version $Revision: 1.4 $
16  */

17 @org.jboss.cache.pojo.annotation.Replicable
18 public class Resource
19 {
20    String JavaDoc connection = null;
21    String JavaDoc name = null;
22 // Can turin it on for performance optimization
23
// @org.jboss.cache.pojo.annotation.Serializable
24
byte[] bin = null;
25
26    public String JavaDoc getName()
27    {
28       return name;
29    }
30
31    public void setName(String JavaDoc name)
32    {
33       this.name = name;
34    }
35
36    public String JavaDoc getConnection()
37    {
38       return connection;
39    }
40
41    public void setConnection(String JavaDoc connection)
42    {
43       this.connection = connection;
44    }
45
46    public byte[] getByte()
47    {
48       return bin;
49    }
50
51    public void setByte(byte[] b)
52    {
53       bin = b;
54    }
55
56    public String JavaDoc toString()
57    {
58       return "name=" + getName() + ", type=" + getConnection() + " bytes= " +bin.toString();
59    }
60 }
61
Popular Tags