1 package org.objectweb.jonas.jtests.beans.ejbql; 2 3 import java.util.Collection ; 4 5 import javax.ejb.EntityContext ; 6 import javax.ejb.CreateException ; 7 import javax.ejb.FinderException ; 8 import javax.ejb.RemoveException ; 9 10 public abstract class ShipBean implements javax.ejb.EntityBean { 11 12 public Integer ejbCreate(Integer primaryKey, String name, double tonnage) throws CreateException { 13 setId(primaryKey); 14 setName(name); 15 setTonnage(tonnage); 16 return null; 17 } 18 19 public void ejbPostCreate(Integer primaryKey, String name, double tonnage) { 20 } 21 22 24 public abstract void setId(Integer id); 25 public abstract Integer getId(); 26 public abstract void setName(String name); 27 public abstract String getName( ); 28 public abstract void setTonnage(double tonnage); 29 public abstract double getTonnage( ); 30 31 public abstract double ejbSelectAverageOfTonnage() throws FinderException ; 33 public abstract Collection ejbSelectListOfTonnage() throws FinderException ; 34 35 public double ejbHomeGetAverageOfTonnage() throws FinderException { 37 return this.ejbSelectAverageOfTonnage(); 38 } 39 40 public void setEntityContext(EntityContext ec){} 42 public void unsetEntityContext(){} 43 public void ejbLoad(){} 44 public void ejbStore(){} 45 public void ejbActivate(){} 46 public void ejbPassivate(){} 47 public void ejbRemove() throws RemoveException {} 48 49 } 50 | Popular Tags |