1 22 package org.jboss.test.cmp2.optimisticlock.bug1006723.testentity; 23 24 import javax.ejb.EntityBean ; 25 import javax.ejb.CreateException ; 26 import javax.ejb.EntityContext ; 27 import java.util.Date ; 28 29 public abstract class EntityBBean implements EntityBean { 30 31 public Long getOID(){ 32 return getOIDCMP(); 33 } 34 35 public void setLastModified(Date date) throws Exception { 36 if (date == null) 37 throw new Exception ("A date must be specified!"); 38 setLastModifiedCMP(date.getTime()); 39 } 40 41 public abstract void setOIDCMP(Long oID); 42 43 public abstract Long getOIDCMP(); 44 45 public abstract void setLastModifiedCMP(long date); 46 47 public abstract long getLastModifiedCMP(); 48 49 public Long ejbCreate(Long id) throws CreateException { 50 setOIDCMP(id); 51 return id; 52 } 53 54 public void ejbPostCreate(Long id) throws CreateException {} 55 56 public void ejbActivate(){} 57 58 public void ejbPassivate(){} 59 60 public void ejbLoad(){} 61 62 public void ejbStore(){} 63 64 public void ejbRemove(){} 65 66 public void setEntityContext(EntityContext context){} 67 68 public void unsetEntityContext(){} 69 70 } | Popular Tags |