package org.objectweb.jonas.jtests.beans.ejbql;

import javax.ejb.*;

abstract public class SequenceEC2 implements EntityBean   {

    public int getNextKeyAfterIncrementingBy(int blockSize) {
	this.setIndex(this.getIndex()+ blockSize);
	return this.getIndex();
    }

    public String ejbCreate(String name) throws CreateException {
	this.setName(name);
	this.setIndex(0);
	return name;
    }

	
    abstract public int getIndex();
    abstract public String getName();
    abstract public void setIndex(int newIndex);
    abstract public void setName(java.lang.String newName);

    public void ejbActivate() {}
    public void ejbLoad() {}
    public void ejbPassivate() {}
    public void ejbPostCreate(String name) {}
    public void ejbRemove() throws RemoveException {}
    public void ejbStore() {}

    public void setEntityContext(EntityContext unused) {}
    public void unsetEntityContext() {}

}
