01: package org.objectweb.jonas.jtests.beans.ejbql;
02:
03: import javax.ejb.*;
04:
05: abstract public class SequenceEC2 implements EntityBean {
06:
07: public int getNextKeyAfterIncrementingBy(int blockSize) {
08: this .setIndex(this .getIndex() + blockSize);
09: 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: abstract public int getIndex();
19:
20: abstract public String getName();
21:
22: abstract public void setIndex(int newIndex);
23:
24: abstract public void setName(java.lang.String newName);
25:
26: public void ejbActivate() {
27: }
28:
29: public void ejbLoad() {
30: }
31:
32: public void ejbPassivate() {
33: }
34:
35: public void ejbPostCreate(String name) {
36: }
37:
38: public void ejbRemove() throws RemoveException {
39: }
40:
41: public void ejbStore() {
42: }
43:
44: public void setEntityContext(EntityContext unused) {
45: }
46:
47: public void unsetEntityContext() {
48: }
49:
50: }
|