KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > cache > tests > loader > SamplePojo


1 package org.jboss.cache.tests.loader;
2
3 import java.io.Serializable JavaDoc;
4 import java.util.ArrayList JavaDoc;
5 import java.util.List JavaDoc;
6
7 /**
8  * @author Bela Ban
9  * @version $Id: SamplePojo.java,v 1.1.1.1 2005/03/31 10:15:09 belaban Exp $
10  */

11 public class SamplePojo implements Serializable JavaDoc {
12    int age;
13    String JavaDoc name;
14    List JavaDoc hobbies=new ArrayList JavaDoc();
15
16    public SamplePojo(int age, String JavaDoc name) {
17       this.age=age;
18       this.name=name;
19    }
20
21    public int getAge() {
22       return age;
23    }
24
25    public void setAge(int age) {
26       this.age=age;
27    }
28
29    public String JavaDoc getName() {
30       return name;
31    }
32
33    public void setName(String JavaDoc name) {
34       this.name=name;
35    }
36
37    public List JavaDoc getHobbies() {
38       return hobbies;
39    }
40
41    public void setHobbies(List JavaDoc hobbies) {
42       this.hobbies=hobbies;
43    }
44
45    public String JavaDoc toString() {
46       return "name=" + name + ", age=" + age + ", hobbies=" + hobbies;
47    }
48 }
49
Popular Tags