KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > jonas > jtests > beans > ejbql > SequenceEC2


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 JavaDoc ejbCreate(String JavaDoc 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 JavaDoc getName();
21     abstract public void setIndex(int newIndex);
22     abstract public void setName(java.lang.String JavaDoc newName);
23
24     public void ejbActivate() {}
25     public void ejbLoad() {}
26     public void ejbPassivate() {}
27     public void ejbPostCreate(String JavaDoc 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