KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > jonas > webapp > jonasadmin > service > ejb > EjbEntityForm


1 /*
2  * JOnAS: Java(TM) Open Application Server
3  * Copyright (C) 1999 Bull S.A.
4  * Contact: jonas-team@objectweb.org
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
19  * USA
20  *
21  * --------------------------------------------------------------------------
22  * $Id: EjbEntityForm.java,v 1.7 2004/10/11 14:20:57 durieuxp Exp $
23  * --------------------------------------------------------------------------
24  */

25
26 package org.objectweb.jonas.webapp.jonasadmin.service.ejb;
27
28 import javax.servlet.http.HttpServletRequest JavaDoc;
29
30 import org.apache.struts.action.ActionErrors;
31 import org.apache.struts.action.ActionMapping;
32
33 /**
34  * @author Michel-Ange ANTON
35  */

36 public class EjbEntityForm extends EjbForm {
37
38 // --------------------------------------------------------- Properties variables
39

40     /**
41      * MBean Ejb Entity properties
42      */

43     private int cacheSize = 0;
44     private int maxCacheSize = 0;
45     private int minPoolSize = 0;
46     private int passivationTimeOut = 0;
47     private int inactivityTimeOut = 0;
48     private int poolSize = 0;
49     private boolean shared = false;
50     private boolean prefetch = false;
51     private String JavaDoc lockPolicy = null;
52     private String JavaDoc persistency = null;
53
54     private int usedInTxInstance = 0;
55     private int usedOutTxInstance = 0;
56     private int unusedInstance = 0;
57     private int passivatedInstance = 0;
58     private int removedInstance = 0;
59
60 // --------------------------------------------------------- Public Methods
61

62     /**
63      * Reset all properties to their default values.
64      *
65      * @param mapping The mapping used to select this instance
66      * @param request The servlet request we are processing
67      */

68
69     public void reset(ActionMapping mapping, HttpServletRequest JavaDoc request) {
70         super.reset(mapping, request);
71         cacheSize = 0;
72         maxCacheSize = 0;
73         minPoolSize = 0;
74         passivationTimeOut = 0;
75         inactivityTimeOut = 0;
76         poolSize = 0;
77         shared = false;
78         prefetch = false;
79         lockPolicy = null;
80         persistency = null;
81
82         usedInTxInstance = 0;
83         usedOutTxInstance = 0;
84         unusedInstance = 0;
85         passivatedInstance = 0;
86         removedInstance = 0;
87     }
88
89     /**
90      * Validate the properties that have been set from this HTTP request,
91      * and return an <code>ActionErrors</code> object that encapsulates any
92      * validation errors that have been found. If no errors are found, return
93      * <code>null</code> or an <code>ActionErrors</code> object with no
94      * recorded error messages.
95      *
96      * @param mapping The mapping used to select this instance
97      * @param request The servlet request we are processing
98      */

99     public ActionErrors validate(ActionMapping mapping, HttpServletRequest JavaDoc request) {
100         return super.validate(mapping, request);
101     }
102
103 // --------------------------------------------------------- Properties Methods
104
public String JavaDoc getPersistency() {
105         return persistency;
106     }
107
108     public void setPersistency(String JavaDoc persistency) {
109         this.persistency = persistency;
110     }
111
112     public int getCacheSize() {
113         return cacheSize;
114     }
115
116     public int getMaxCacheSize() {
117         return maxCacheSize;
118     }
119
120     public int getMinPoolSize() {
121         return minPoolSize;
122     }
123
124     public int getPassivationTimeOut() {
125         return passivationTimeOut;
126     }
127
128     public int getInactivityTimeOut() {
129         return inactivityTimeOut;
130     }
131
132     public int getPoolSize() {
133         return poolSize;
134     }
135
136     public String JavaDoc getLockPolicy() {
137         return lockPolicy;
138     }
139
140     public void setLockPolicy(String JavaDoc lockPolicy) {
141         this.lockPolicy = lockPolicy;
142     }
143
144     public boolean getShared() {
145         return shared;
146     }
147
148     public boolean getPrefetch() {
149         return prefetch;
150     }
151
152     public void setCacheSize(int cacheSize) {
153         this.cacheSize = cacheSize;
154     }
155
156     public void setMaxCacheSize(int maxCacheSize) {
157         this.maxCacheSize = maxCacheSize;
158     }
159
160     public void setMinPoolSize(int minPoolSize) {
161         this.minPoolSize = minPoolSize;
162     }
163
164     public void setPassivationTimeOut(int passivationTimeOut) {
165         this.passivationTimeOut = passivationTimeOut;
166     }
167
168     public void setInactivityTimeOut(int inactivityTimeOut) {
169         this.inactivityTimeOut = inactivityTimeOut;
170     }
171
172     public void setPoolSize(int poolSize) {
173         this.poolSize = poolSize;
174     }
175
176     public void setShared(boolean shared) {
177         this.shared = shared;
178     }
179
180     public void setPrefetch(boolean prefetch) {
181         this.prefetch = prefetch;
182     }
183
184     public int getPassivatedInstance() {
185         return passivatedInstance;
186     }
187
188     public void setPassivatedInstance(int passivatedInstance) {
189         this.passivatedInstance = passivatedInstance;
190     }
191
192     public int getRemovedInstance() {
193         return removedInstance;
194     }
195
196     public void setRemovedInstance(int removedInstance) {
197         this.removedInstance = removedInstance;
198     }
199
200     public int getUnusedInstance() {
201         return unusedInstance;
202     }
203
204     public void setUnusedInstance(int unusedInstance) {
205         this.unusedInstance = unusedInstance;
206     }
207
208     public int getUsedInTxInstance() {
209         return usedInTxInstance;
210     }
211
212     public void setUsedInTxInstance(int usedInTxInstance) {
213         this.usedInTxInstance = usedInTxInstance;
214     }
215
216     public int getUsedOutTxInstance() {
217         return usedOutTxInstance;
218     }
219
220     public void setUsedOutTxInstance(int usedOutTxInstance) {
221         this.usedOutTxInstance = usedOutTxInstance;
222     }
223
224 }
225
Popular Tags