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