1 package org.objectweb.jonas.jtests.beans.ejbql; 2 3 import javax.ejb.*; 4 5 abstract public class SequenceEC2 implements EntityBean { 6 7 public int getNextKeyAfterIncrementingBy(int blockSize) { 8 this.setIndex(this.getIndex()+ blockSize); 9 return this.getIndex(); 10 } 11 12 public String ejbCreate(String name) throws CreateException { 13 this.setName(name); 14 this.setIndex(0); 15 return name; 16 } 17 18 19 abstract public int getIndex(); 20 abstract public String getName(); 21 abstract public void setIndex(int newIndex); 22 abstract public void setName(java.lang.String newName); 23 24 public void ejbActivate() {} 25 public void ejbLoad() {} 26 public void ejbPassivate() {} 27 public void ejbPostCreate(String name) {} 28 public void ejbRemove() throws RemoveException {} 29 public void ejbStore() {} 30 31 public void setEntityContext(EntityContext unused) {} 32 public void unsetEntityContext() {} 33 34 } 35 | Popular Tags |