// Collection of code snippets by Arne VajhÃ¸j 
// (from articles on eksperten.dk / vajhoej.dk written sometime between 2004 and now) 
package test;

import javax.ejb.*;

/**
 * TestEntityBean.
 */
abstract public class TestEntityBean implements EntityBean {
    private EntityContext entityContext;
    // create
    public Integer ejbCreate(Integer f1, String f2) throws CreateException {
        setF1(f1);
        setF2(f2);
        return null;
    }
    public void ejbPostCreate(Integer f1, String f2) throws CreateException {
    }
    // diverse standard som skal være der men som man sjældent bruger
    public void ejbRemove() throws RemoveException {
    }
    public void ejbLoad() {
    }
    public void ejbStore() {
    }
    public void ejbActivate() {
    }
    public void ejbPassivate() {
    }
    public void setEntityContext(EntityContext entityContext) {
        this.entityContext = entityContext;
    }
    public void unsetEntityContext() {
        this.entityContext = null;
    }
    // get og set F1
    public abstract Integer getF1();
    public abstract void setF1(Integer f1);
    // get og set F2
    public abstract String getF2();
    public abstract void setF2(String f2);
}
