KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > opensymphony > workflow > spi > ejb > PreviousHistoryStepEJB


1 /*
2  * Copyright (c) 2002-2003 by OpenSymphony
3  * All rights reserved.
4  */

5 package com.opensymphony.workflow.spi.ejb;
6
7 import com.opensymphony.workflow.spi.ejb.PreviousStepPK;
8
9 import javax.ejb.CreateException JavaDoc;
10
11
12 /**
13  * @ejb.bean
14  * type="CMP"
15  * view-type="local"
16  * name="HistoryStepPrev"
17  * reentrant="False"
18  * schema="HistoryStepPrev"
19  *
20  * @ejb.pk extends="java.lang.Object" class="com.opensymphony.workflow.spi.ejb.PreviousStepPK"
21  *
22  * @ejb.persistence table-name="OS_HISTORYSTEP_PREV"
23  *
24  * @ejb.home local-extends="javax.ejb.EJBLocalHome"
25  *
26  * @ejb.interface local-extends="javax.ejb.EJBLocalObject"
27  *
28  * @ejb.ejb-external-ref
29  * ref-name="ejb/SequenceGenerator"
30  * type="Session"
31  * view-type="remote"
32  * link="SequenceGenerator"
33  * home="com.opensymphony.module.sequence.SequenceGeneratorHome"
34  * business="com.opensymphony.module.sequence.SequenceGenerator"
35  *
36  * @ejb.finder
37  * signature="java.util.Collection findByStepId(long entryId)"
38  * query="SELECT DISTINCT OBJECT(o) from HistoryStepPrev o where o.id = ?1"
39  *
40  * @ejb.permission unchecked="true"
41  * @ejb.transaction type="Supports"
42  *
43  * @author Hani Suleiman (hani@formicary.net)
44  * Date: Apr 7, 2003
45  * Time: 8:17:09 PM
46  */

47 public abstract class PreviousHistoryStepEJB extends PreviousStepEJB {
48     //~ Methods ////////////////////////////////////////////////////////////////
49

50     /**
51      * @ejb.create-method
52      */

53     public PreviousStepPK ejbCreate(long id, long previousId) throws CreateException JavaDoc {
54         try {
55             Long JavaDoc pkA = new Long JavaDoc(id);
56             Long JavaDoc pkB = new Long JavaDoc(previousId);
57             setId(pkA);
58             setPreviousId(pkB);
59
60             return new PreviousStepPK(pkA, pkB);
61         } catch (Exception JavaDoc e) {
62             throw new CreateException JavaDoc(e.getMessage());
63         }
64     }
65
66     public void ejbPostCreate(long id, long previousId) throws CreateException JavaDoc {
67     }
68 }
69
Popular Tags