KickJava   Java API By Example, From Geeks To Geeks.

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


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

5 package com.opensymphony.workflow.spi.ejb;
6
7 import java.sql.Timestamp JavaDoc;
8
9 import javax.ejb.CreateException JavaDoc;
10 import javax.ejb.EntityBean JavaDoc;
11
12
13 /**
14  * EJB implementation for history steps.
15  *
16  * @ejb.bean
17  * type="CMP"
18  * view-type="local"
19  * name="HistoryStep"
20  * reentrant="False"
21  * schema="HistoryStep"
22  * primkey-field="id"
23  *
24  * @ejb.pk class="java.lang.Long" extends="java.lang.Object"
25  *
26  * @ejb.persistence table-name="OS_HISTORYSTEP"
27  *
28  * @ejb.home local-extends="javax.ejb.EJBLocalHome"
29  *
30  * @ejb.interface local-extends="javax.ejb.EJBLocalObject,com.opensymphony.workflow.spi.ejb.AbstractLocalStep"
31  *
32  * @ejb.ejb-external-ref
33  * ref-name="ejb/SequenceGenerator"
34  * type="Session"
35  * view-type="remote"
36  * link="SequenceGenerator"
37  * home="com.opensymphony.module.sequence.SequenceGeneratorHome"
38  * business="com.opensymphony.module.sequence.SequenceGenerator"
39  *
40  * @ejb.finder
41  * signature="java.util.Collection findByEntryId(long entryId)"
42  * query="SELECT DISTINCT OBJECT(o) from HistoryStep o where o.entryId = ?1"
43  *
44  * @ejb.permission unchecked="true"
45  * @ejb.transaction type="Supports"
46  *
47  * @author <a HREF="mailto:hani@formicary.net">Hani Suleiman</a>
48  * @author <a HREF="mailto:plightbo@hotmail.com">Pat Lightbody</a>
49  */

50 public abstract class HistoryStepEJB implements EntityBean JavaDoc {
51     //~ Methods ////////////////////////////////////////////////////////////////
52

53     public abstract void setActionId(int actionId);
54
55     /**
56      * @ejb.interface-method
57      * @ejb.persistence column-name="ACTION_ID"
58      */

59     public abstract int getActionId();
60
61     public abstract void setCaller(String JavaDoc caller);
62
63     /**
64      * @ejb.interface-method
65      * @ejb.persistence column-name="CALLER"
66      */

67     public abstract String JavaDoc getCaller();
68
69     public abstract void setDueDate(Timestamp JavaDoc dueDate);
70
71     /**
72      * @ejb.interface-method
73      * @ejb.persistence column-name="DUE_DATE"
74      */

75     public abstract Timestamp JavaDoc getDueDate();
76
77     public abstract void setEntryId(long entryId);
78
79     /**
80      * @ejb.interface-method
81      * @ejb.persistence column-name="ENTRY_ID"
82      */

83     public abstract long getEntryId();
84
85     public abstract void setFinishDate(Timestamp JavaDoc finishDate);
86
87     /**
88      * @ejb.interface-method
89      * @ejb.persistence column-name="FINISH_DATE"
90      */

91     public abstract Timestamp JavaDoc getFinishDate();
92
93     public abstract void setId(Long JavaDoc id);
94
95     /**
96      * @ejb.pk-field
97      * @ejb.interface-method
98      * @ejb.persistence column-name="ID"
99      */

100     public abstract Long JavaDoc getId();
101
102     public abstract void setOwner(String JavaDoc owner);
103
104     /**
105      * @ejb.interface-method
106      * @ejb.persistence column-name="OWNER"
107      */

108     public abstract String JavaDoc getOwner();
109
110     public abstract void setStartDate(Timestamp JavaDoc startDate);
111
112     /**
113      * @ejb.interface-method
114      * @ejb.persistence column-name="START_DATE"
115      */

116     public abstract Timestamp JavaDoc getStartDate();
117
118     public abstract void setStatus(String JavaDoc status);
119
120     /**
121      * @ejb.interface-method
122      * @ejb.persistence column-name="STATUS"
123      */

124     public abstract String JavaDoc getStatus();
125
126     public abstract void setStepId(int stepId);
127
128     /**
129      * @ejb.interface-method
130      * @ejb.persistence column-name="STEP_ID"
131      */

132     public abstract int getStepId();
133
134     /**
135      * @ejb.create-method
136      */

137     public Long JavaDoc ejbCreate(long id, long entryId, int stepId, int actionId, String JavaDoc owner, Timestamp JavaDoc startDate, Timestamp JavaDoc dueDate, Timestamp JavaDoc finishDate, String JavaDoc status, String JavaDoc caller) throws CreateException JavaDoc {
138         try {
139             Long JavaDoc pk = new Long JavaDoc(id);
140             setId(pk);
141             setEntryId(entryId);
142             setStepId(stepId);
143             setActionId(actionId);
144             setOwner(owner);
145             setStartDate(startDate);
146             setFinishDate(finishDate);
147             setStatus(status);
148             setCaller(caller);
149
150             return pk;
151         } catch (Exception JavaDoc e) {
152             throw new CreateException JavaDoc(e.getMessage());
153         }
154     }
155
156     public void ejbPostCreate(long id, long entryId, int stepId, int actionId, String JavaDoc owner, Timestamp JavaDoc startDate, Timestamp JavaDoc dueDate, Timestamp JavaDoc finishDate, String JavaDoc status, String JavaDoc caller) throws CreateException JavaDoc {
157     }
158 }
159
Popular Tags