1 18 19 package cowsultants.itracker.ejb.beans.entity; 20 21 import java.util.*; 22 import java.sql.Timestamp ; 23 24 import javax.ejb.EntityBean ; 25 import javax.ejb.EntityContext ; 26 import javax.ejb.FinderException ; 27 import javax.ejb.CreateException ; 28 29 public abstract class GenericBean implements EntityBean { 30 private EntityContext ctx; 31 32 public abstract Integer getId(); 33 public abstract void setId(Integer value); 34 35 public abstract Timestamp getCreateDate(); 36 public abstract void setCreateDate(Timestamp value); 37 38 public abstract Timestamp getLastModifiedDate(); 39 public abstract void setLastModifiedDate(Timestamp value); 40 41 public void setEntityContext(EntityContext value) { 42 ctx = value; 43 } 44 45 public void unsetEntityContext() { 46 ctx = null; 47 } 48 49 public Integer ejbCreate(Integer value) throws CreateException { 50 this.setId(value); 51 return null; 52 } 53 54 public void ejbPostCreate(Integer value) throws CreateException { 55 this.setCreateDate(new Timestamp (new Date().getTime())); 56 } 57 58 public void ejbActivate() {} 59 60 public void ejbPassivate() {} 61 62 public void ejbLoad() {} 63 64 public void ejbStore() {} 65 66 public void ejbRemove() {} 67 68 } 69 | Popular Tags |