1 25 26 package org.objectweb.jorm.mapper.rdb.inheritance; 27 28 import org.objectweb.jorm.pobject.inheritance.extent.EagleAccessor; 29 import org.objectweb.jorm.api.PException; 30 31 public class Eagle extends Bird implements EagleAccessor { 32 float maxSpeed; 33 34 35 public Eagle(boolean isMale, int size, String originCountry, 36 int maxSpeed) { 37 super(isMale, size, originCountry); 38 this.maxSpeed = maxSpeed; 39 } 40 public String paGetSpecies() { 41 return "eagle"; 42 } 43 44 public void paSetMaxSpeed(float val) throws PException { 46 maxSpeed = val; 47 } 48 49 public float paGetMaxSpeed() throws PException { 50 return maxSpeed; 51 } 52 public boolean equals(Object o) { 53 if (!super.equals(o)) { 54 return false; 55 } 56 57 if (o instanceof Eagle) { 58 Eagle eagle = (Eagle) o; 59 return (eagle.maxSpeed == maxSpeed); 60 } 61 return false; 62 } 63 64 65 } 66 | Popular Tags |