KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > test > jcaprops > support > PropertyTestManagedConnectionFactory


1 /*
2   * JBoss, Home of Professional Open Source
3   * Copyright 2005, JBoss Inc., and individual contributors as indicated
4   * by the @authors tag. See the copyright.txt in the distribution for a
5   * full listing of individual contributors.
6   *
7   * This is free software; you can redistribute it and/or modify it
8   * under the terms of the GNU Lesser General Public License as
9   * published by the Free Software Foundation; either version 2.1 of
10   * the License, or (at your option) any later version.
11   *
12   * This software is distributed in the hope that it will be useful,
13   * but WITHOUT ANY WARRANTY; without even the implied warranty of
14   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15   * Lesser General Public License for more details.
16   *
17   * You should have received a copy of the GNU Lesser General Public
18   * License along with this software; if not, write to the Free
19   * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20   * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
21   */

22 package org.jboss.test.jcaprops.support;
23
24 import java.io.PrintWriter JavaDoc;
25 import java.util.Set JavaDoc;
26
27 import javax.resource.ResourceException JavaDoc;
28 import javax.resource.spi.ConnectionManager JavaDoc;
29 import javax.resource.spi.ConnectionRequestInfo JavaDoc;
30 import javax.resource.spi.ManagedConnection JavaDoc;
31 import javax.resource.spi.ManagedConnectionFactory JavaDoc;
32 import javax.security.auth.Subject JavaDoc;
33
34 /**
35  * A PropertyTestManagedConnectionFactory.
36  *
37  * @author <a HREF="adrian@jboss.com">Adrian Brock</a>
38  * @version $Revision: 37406 $
39  */

40 public class PropertyTestManagedConnectionFactory implements ManagedConnectionFactory JavaDoc
41 {
42    /** The serialVersionUID */
43    private static final long serialVersionUID = 1L;
44    
45    private String JavaDoc stringRAR;
46    private Boolean JavaDoc booleanRAR;
47    private Byte JavaDoc byteRAR;
48    private Character JavaDoc characterRAR;
49    private Short JavaDoc shortRAR;
50    private Integer JavaDoc integerRAR;
51    private Long JavaDoc longRAR;
52    private Float JavaDoc floatRAR;
53    private Double JavaDoc doubleRAR;
54    private String JavaDoc stringCD;
55    private Boolean JavaDoc booleanCD;
56    private Byte JavaDoc byteCD;
57    private Character JavaDoc characterCD;
58    private Short JavaDoc shortCD;
59    private Integer JavaDoc integerCD;
60    private Long JavaDoc longCD;
61    private Float JavaDoc floatCD;
62    private Double JavaDoc doubleCD;
63    private String JavaDoc stringMCF;
64    private Boolean JavaDoc booleanMCF;
65    private Byte JavaDoc byteMCF;
66    private Character JavaDoc characterMCF;
67    private Short JavaDoc shortMCF;
68    private Integer JavaDoc integerMCF;
69    private Long JavaDoc longMCF;
70    private Float JavaDoc floatMCF;
71    private Double JavaDoc doubleMCF;
72
73    public Boolean JavaDoc getBooleanCD()
74    {
75       return booleanCD;
76    }
77
78    public void setBooleanCD(Boolean JavaDoc booleanCD)
79    {
80       this.booleanCD = booleanCD;
81    }
82
83    public Boolean JavaDoc getBooleanMCF()
84    {
85       return booleanMCF;
86    }
87
88    public void setBooleanMCF(Boolean JavaDoc booleanMCF)
89    {
90       this.booleanMCF = booleanMCF;
91    }
92
93    public Boolean JavaDoc getBooleanRAR()
94    {
95       return booleanRAR;
96    }
97
98    public void setBooleanRAR(Boolean JavaDoc booleanRAR)
99    {
100       this.booleanRAR = booleanRAR;
101    }
102
103    public Byte JavaDoc getByteCD()
104    {
105       return byteCD;
106    }
107
108    public void setByteCD(Byte JavaDoc byteCD)
109    {
110       this.byteCD = byteCD;
111    }
112
113    public Byte JavaDoc getByteMCF()
114    {
115       return byteMCF;
116    }
117
118    public void setByteMCF(Byte JavaDoc byteMCF)
119    {
120       this.byteMCF = byteMCF;
121    }
122
123    public Byte JavaDoc getByteRAR()
124    {
125       return byteRAR;
126    }
127
128    public void setByteRAR(Byte JavaDoc byteRAR)
129    {
130       this.byteRAR = byteRAR;
131    }
132
133    public Character JavaDoc getCharacterCD()
134    {
135       return characterCD;
136    }
137
138    public void setCharacterCD(Character JavaDoc characterCD)
139    {
140       this.characterCD = characterCD;
141    }
142
143    public Character JavaDoc getCharacterMCF()
144    {
145       return characterMCF;
146    }
147
148    public void setCharacterMCF(Character JavaDoc characterMCF)
149    {
150       this.characterMCF = characterMCF;
151    }
152
153    public Character JavaDoc getCharacterRAR()
154    {
155       return characterRAR;
156    }
157
158    public void setCharacterRAR(Character JavaDoc characterRAR)
159    {
160       this.characterRAR = characterRAR;
161    }
162
163    public Double JavaDoc getDoubleCD()
164    {
165       return doubleCD;
166    }
167
168    public void setDoubleCD(Double JavaDoc doubleCD)
169    {
170       this.doubleCD = doubleCD;
171    }
172
173    public Double JavaDoc getDoubleMCF()
174    {
175       return doubleMCF;
176    }
177
178    public void setDoubleMCF(Double JavaDoc doubleMCF)
179    {
180       this.doubleMCF = doubleMCF;
181    }
182
183    public Double JavaDoc getDoubleRAR()
184    {
185       return doubleRAR;
186    }
187
188    public void setDoubleRAR(Double JavaDoc doubleRAR)
189    {
190       this.doubleRAR = doubleRAR;
191    }
192
193    public Float JavaDoc getFloatCD()
194    {
195       return floatCD;
196    }
197
198    public void setFloatCD(Float JavaDoc floatCD)
199    {
200       this.floatCD = floatCD;
201    }
202
203    public Float JavaDoc getFloatMCF()
204    {
205       return floatMCF;
206    }
207
208    public void setFloatMCF(Float JavaDoc floatMCF)
209    {
210       this.floatMCF = floatMCF;
211    }
212
213    public Float JavaDoc getFloatRAR()
214    {
215       return floatRAR;
216    }
217
218    public void setFloatRAR(Float JavaDoc floatRAR)
219    {
220       this.floatRAR = floatRAR;
221    }
222
223    public Integer JavaDoc getIntegerCD()
224    {
225       return integerCD;
226    }
227
228    public void setIntegerCD(Integer JavaDoc integerCD)
229    {
230       this.integerCD = integerCD;
231    }
232
233    public Integer JavaDoc getIntegerMCF()
234    {
235       return integerMCF;
236    }
237
238    public void setIntegerMCF(Integer JavaDoc integerMCF)
239    {
240       this.integerMCF = integerMCF;
241    }
242
243    public Integer JavaDoc getIntegerRAR()
244    {
245       return integerRAR;
246    }
247
248    public void setIntegerRAR(Integer JavaDoc integerRAR)
249    {
250       this.integerRAR = integerRAR;
251    }
252
253    public Long JavaDoc getLongCD()
254    {
255       return longCD;
256    }
257
258    public void setLongCD(Long JavaDoc longCD)
259    {
260       this.longCD = longCD;
261    }
262
263    public Long JavaDoc getLongMCF()
264    {
265       return longMCF;
266    }
267
268    public void setLongMCF(Long JavaDoc longMCF)
269    {
270       this.longMCF = longMCF;
271    }
272
273    public Long JavaDoc getLongRAR()
274    {
275       return longRAR;
276    }
277
278    public void setLongRAR(Long JavaDoc longRAR)
279    {
280       this.longRAR = longRAR;
281    }
282
283    public Short JavaDoc getShortCD()
284    {
285       return shortCD;
286    }
287
288    public void setShortCD(Short JavaDoc shortCD)
289    {
290       this.shortCD = shortCD;
291    }
292
293    public Short JavaDoc getShortMCF()
294    {
295       return shortMCF;
296    }
297
298    public void setShortMCF(Short JavaDoc shortMCF)
299    {
300       this.shortMCF = shortMCF;
301    }
302
303    public Short JavaDoc getShortRAR()
304    {
305       return shortRAR;
306    }
307
308    public void setShortRAR(Short JavaDoc shortRAR)
309    {
310       this.shortRAR = shortRAR;
311    }
312
313    public String JavaDoc getStringCD()
314    {
315       return stringCD;
316    }
317
318    public void setStringCD(String JavaDoc stringCD)
319    {
320       this.stringCD = stringCD;
321    }
322
323    public String JavaDoc getStringMCF()
324    {
325       return stringMCF;
326    }
327
328    public void setStringMCF(String JavaDoc stringMCF)
329    {
330       this.stringMCF = stringMCF;
331    }
332
333    public String JavaDoc getStringRAR()
334    {
335       return stringRAR;
336    }
337
338    public void setStringRAR(String JavaDoc stringRAR)
339    {
340       this.stringRAR = stringRAR;
341    }
342
343    public Object JavaDoc createConnectionFactory() throws ResourceException JavaDoc
344    {
345       return null;
346    }
347
348    public Object JavaDoc createConnectionFactory(ConnectionManager JavaDoc cxManager) throws ResourceException JavaDoc
349    {
350       return new PropertyTestConnectionFactoryImpl(cxManager);
351    }
352
353    public ManagedConnection JavaDoc createManagedConnection(Subject JavaDoc subject, ConnectionRequestInfo JavaDoc cxRequestInfo) throws ResourceException JavaDoc
354    {
355       return new PropertyTestManagedConnection(this);
356    }
357
358    public PrintWriter JavaDoc getLogWriter() throws ResourceException JavaDoc
359    {
360       return null;
361    }
362
363    public ManagedConnection JavaDoc matchManagedConnections(Set JavaDoc connectionSet, Subject JavaDoc subject, ConnectionRequestInfo JavaDoc cxRequestInfo) throws ResourceException JavaDoc
364    {
365       return (ManagedConnection JavaDoc) connectionSet.iterator().next();
366    }
367
368    public void setLogWriter(PrintWriter JavaDoc out) throws ResourceException JavaDoc
369    {
370    }
371
372 }
373
Popular Tags