1 7 package org.jboss.cache.tests; 8 9 import java.io.Serializable ; 10 import java.util.List ; 11 import java.util.ArrayList ; 12 13 17 public class SamplePojo implements Serializable { 18 int age; 19 String name; 20 List hobbies=new ArrayList (); 21 22 public SamplePojo(int age, String name) { 23 this.age=age; 24 this.name=name; 25 } 26 27 public int getAge() { 28 return age; 29 } 30 31 public void setAge(int age) { 32 this.age=age; 33 } 34 35 public String getName() { 36 return name; 37 } 38 39 public void setName(String name) { 40 this.name=name; 41 } 42 43 public List getHobbies() { 44 return hobbies; 45 } 46 47 public void setHobbies(List hobbies) { 48 this.hobbies=hobbies; 49 } 50 51 public String toString() { 52 return "name=" + name + ", age=" + age + ", hobbies=" + hobbies; 53 } 54 } 55 | Popular Tags |