1 25 26 package org.objectweb.jorm.mapper.rdb.inheritance; 27 28 import org.objectweb.jorm.pobject.inheritance.extent.BirdAccessor; 29 import org.objectweb.jorm.api.PException; 30 31 public abstract class Bird extends Animal implements BirdAccessor { 32 String originCountry; 33 34 public Bird(boolean isMale, int size, String originCountry) { 35 super(isMale, size); 36 this.originCountry = originCountry; 37 } 38 public void paSetOriginCountry(String val) throws PException { 40 originCountry = val; 41 } 42 43 public String paGetOriginCountry() throws PException { 44 return originCountry; 45 } 46 public boolean equals(Object o) { 47 if (!super.equals(o)) { 48 return false; 49 } 50 51 if (o instanceof Bird) { 52 Bird bird = (Bird) o; 53 return (bird.originCountry.equals(originCountry)); 54 } 55 return false; 56 } 57 58 } 59 | Popular Tags |