1 package org.apache.ojb.broker; 2 3 import java.io.Serializable ; 4 5 9 public class Reptile implements InterfaceAnimal, Serializable 10 { 11 private int animalId; 12 private int age; 13 private String name; 14 private String color; 15 private int zooId; 16 19 public Reptile() 20 { 21 super(); 22 } 23 24 public Reptile(int age, String name, String color) 25 { 26 this.age = age; 27 this.name = name; 28 this.color = color; 29 } 30 31 public int getAge() 32 { 33 return age; 34 } 35 36 public String getName() 37 { 38 return name; 39 } 40 41 public String getColor() 42 { 43 return color; 44 } 45 46 public String toString() 47 { 48 return "Reptile: id = " + animalId + "\n name = " + name + 49 "\n age = " + age + 50 "\n color = " + color + 51 "\n zooId = " + zooId; 52 } 53 54 58 public int getAnimalId() 59 { 60 return animalId; 61 } 62 63 67 public int getZooId() 68 { 69 return zooId; 70 } 71 72 76 public void setAge(int age) 77 { 78 this.age = age; 79 } 80 81 85 public void setAnimalId(int animalId) 86 { 87 this.animalId = animalId; 88 } 89 90 94 public void setColor(String color) 95 { 96 this.color = color; 97 } 98 99 103 public void setName(String name) 104 { 105 this.name = name; 106 } 107 108 112 public void setZooId(int zooId) 113 { 114 this.zooId = zooId; 115 } 116 117 } 118 | Popular Tags |