1 package org.objectweb.jonas.jtests.beans.ejbql; 2 3 import javax.ejb.EntityContext ; 4 import javax.ejb.FinderException ; 5 import org.objectweb.jonas.jtests.beans.ejbql.ShipLocal; 6 7 public abstract class CabinBean implements javax.ejb.EntityBean { 8 9 public Integer ejbCreate(Integer id) throws javax.ejb.CreateException { 10 this.setId(id); 11 return null; 12 } 13 public void ejbPostCreate(Integer id){ 14 15 } 16 public abstract void setId(Integer id); 17 public abstract Integer getId(); 18 19 public abstract void setShip(ShipLocal ship); 20 public abstract ShipLocal getShip( ); 21 22 public abstract void setName(String name); 23 public abstract String getName( ); 24 25 public abstract void setBedCount(int count); 26 public abstract int getBedCount( ); 27 28 public abstract void setDeckLevel(int level); 29 public abstract int getDeckLevel( ); 30 31 public abstract int ejbSelectDeckLevel(Integer i) throws FinderException ; 33 34 35 public int getShipId() { 36 return getShip().getId().intValue(); 37 } 38 39 public void setShipId(int sp) { 40 ShipLocal sl = getShip( ); 41 sl.setId(new Integer (sp)); 42 setShip(sl); 43 } 44 45 public int ejbHomeSelectDeckLevel(Integer id) throws FinderException { 47 return this.ejbSelectDeckLevel(id); 48 } 49 50 public void setEntityContext(EntityContext ctx) { 51 } 53 public void unsetEntityContext() { 54 } 56 public void ejbActivate() { 57 } 59 public void ejbPassivate() { 60 } 62 public void ejbLoad() { 63 } 65 public void ejbStore() { 66 } 68 public void ejbRemove() throws javax.ejb.RemoveException { 69 } 71 } 72 | Popular Tags |