001: /*
002: * JBoss, Home of Professional Open Source.
003: * Copyright 2006, Red Hat Middleware LLC, and individual contributors
004: * as indicated by the @author tags. See the copyright.txt file in the
005: * distribution for a full listing of individual contributors.
006: *
007: * This is free software; you can redistribute it and/or modify it
008: * under the terms of the GNU Lesser General Public License as
009: * published by the Free Software Foundation; either version 2.1 of
010: * the License, or (at your option) any later version.
011: *
012: * This software is distributed in the hope that it will be useful,
013: * but WITHOUT ANY WARRANTY; without even the implied warranty of
014: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
015: * Lesser General Public License for more details.
016: *
017: * You should have received a copy of the GNU Lesser General Public
018: * License along with this software; if not, write to the Free
019: * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
020: * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
021: */
022: package org.jboss.test.jcaprops.support;
023:
024: import java.io.PrintWriter;
025: import java.util.Set;
026:
027: import javax.resource.ResourceException;
028: import javax.resource.spi.ConnectionManager;
029: import javax.resource.spi.ConnectionRequestInfo;
030: import javax.resource.spi.ManagedConnection;
031: import javax.resource.spi.ManagedConnectionFactory;
032: import javax.security.auth.Subject;
033:
034: /**
035: * A PropertyTestManagedConnectionFactory.
036: *
037: * @author <a href="adrian@jboss.com">Adrian Brock</a>
038: * @version $Revision: 57211 $
039: */
040: public class PropertyTestManagedConnectionFactory implements
041: ManagedConnectionFactory {
042: /** The serialVersionUID */
043: private static final long serialVersionUID = 1L;
044:
045: private String stringRAR;
046: private Boolean booleanRAR;
047: private Byte byteRAR;
048: private Character characterRAR;
049: private Short shortRAR;
050: private Integer integerRAR;
051: private Long longRAR;
052: private Float floatRAR;
053: private Double doubleRAR;
054: private String stringCD;
055: private Boolean booleanCD;
056: private Byte byteCD;
057: private Character characterCD;
058: private Short shortCD;
059: private Integer integerCD;
060: private Long longCD;
061: private Float floatCD;
062: private Double doubleCD;
063: private String stringMCF;
064: private Boolean booleanMCF;
065: private Byte byteMCF;
066: private Character characterMCF;
067: private Short shortMCF;
068: private Integer integerMCF;
069: private Long longMCF;
070: private Float floatMCF;
071: private Double doubleMCF;
072:
073: public Boolean getBooleanCD() {
074: return booleanCD;
075: }
076:
077: public void setBooleanCD(Boolean booleanCD) {
078: this .booleanCD = booleanCD;
079: }
080:
081: public Boolean getBooleanMCF() {
082: return booleanMCF;
083: }
084:
085: public void setBooleanMCF(Boolean booleanMCF) {
086: this .booleanMCF = booleanMCF;
087: }
088:
089: public Boolean getBooleanRAR() {
090: return booleanRAR;
091: }
092:
093: public void setBooleanRAR(Boolean booleanRAR) {
094: this .booleanRAR = booleanRAR;
095: }
096:
097: public Byte getByteCD() {
098: return byteCD;
099: }
100:
101: public void setByteCD(Byte byteCD) {
102: this .byteCD = byteCD;
103: }
104:
105: public Byte getByteMCF() {
106: return byteMCF;
107: }
108:
109: public void setByteMCF(Byte byteMCF) {
110: this .byteMCF = byteMCF;
111: }
112:
113: public Byte getByteRAR() {
114: return byteRAR;
115: }
116:
117: public void setByteRAR(Byte byteRAR) {
118: this .byteRAR = byteRAR;
119: }
120:
121: public Character getCharacterCD() {
122: return characterCD;
123: }
124:
125: public void setCharacterCD(Character characterCD) {
126: this .characterCD = characterCD;
127: }
128:
129: public Character getCharacterMCF() {
130: return characterMCF;
131: }
132:
133: public void setCharacterMCF(Character characterMCF) {
134: this .characterMCF = characterMCF;
135: }
136:
137: public Character getCharacterRAR() {
138: return characterRAR;
139: }
140:
141: public void setCharacterRAR(Character characterRAR) {
142: this .characterRAR = characterRAR;
143: }
144:
145: public Double getDoubleCD() {
146: return doubleCD;
147: }
148:
149: public void setDoubleCD(Double doubleCD) {
150: this .doubleCD = doubleCD;
151: }
152:
153: public Double getDoubleMCF() {
154: return doubleMCF;
155: }
156:
157: public void setDoubleMCF(Double doubleMCF) {
158: this .doubleMCF = doubleMCF;
159: }
160:
161: public Double getDoubleRAR() {
162: return doubleRAR;
163: }
164:
165: public void setDoubleRAR(Double doubleRAR) {
166: this .doubleRAR = doubleRAR;
167: }
168:
169: public Float getFloatCD() {
170: return floatCD;
171: }
172:
173: public void setFloatCD(Float floatCD) {
174: this .floatCD = floatCD;
175: }
176:
177: public Float getFloatMCF() {
178: return floatMCF;
179: }
180:
181: public void setFloatMCF(Float floatMCF) {
182: this .floatMCF = floatMCF;
183: }
184:
185: public Float getFloatRAR() {
186: return floatRAR;
187: }
188:
189: public void setFloatRAR(Float floatRAR) {
190: this .floatRAR = floatRAR;
191: }
192:
193: public Integer getIntegerCD() {
194: return integerCD;
195: }
196:
197: public void setIntegerCD(Integer integerCD) {
198: this .integerCD = integerCD;
199: }
200:
201: public Integer getIntegerMCF() {
202: return integerMCF;
203: }
204:
205: public void setIntegerMCF(Integer integerMCF) {
206: this .integerMCF = integerMCF;
207: }
208:
209: public Integer getIntegerRAR() {
210: return integerRAR;
211: }
212:
213: public void setIntegerRAR(Integer integerRAR) {
214: this .integerRAR = integerRAR;
215: }
216:
217: public Long getLongCD() {
218: return longCD;
219: }
220:
221: public void setLongCD(Long longCD) {
222: this .longCD = longCD;
223: }
224:
225: public Long getLongMCF() {
226: return longMCF;
227: }
228:
229: public void setLongMCF(Long longMCF) {
230: this .longMCF = longMCF;
231: }
232:
233: public Long getLongRAR() {
234: return longRAR;
235: }
236:
237: public void setLongRAR(Long longRAR) {
238: this .longRAR = longRAR;
239: }
240:
241: public Short getShortCD() {
242: return shortCD;
243: }
244:
245: public void setShortCD(Short shortCD) {
246: this .shortCD = shortCD;
247: }
248:
249: public Short getShortMCF() {
250: return shortMCF;
251: }
252:
253: public void setShortMCF(Short shortMCF) {
254: this .shortMCF = shortMCF;
255: }
256:
257: public Short getShortRAR() {
258: return shortRAR;
259: }
260:
261: public void setShortRAR(Short shortRAR) {
262: this .shortRAR = shortRAR;
263: }
264:
265: public String getStringCD() {
266: return stringCD;
267: }
268:
269: public void setStringCD(String stringCD) {
270: this .stringCD = stringCD;
271: }
272:
273: public String getStringMCF() {
274: return stringMCF;
275: }
276:
277: public void setStringMCF(String stringMCF) {
278: this .stringMCF = stringMCF;
279: }
280:
281: public String getStringRAR() {
282: return stringRAR;
283: }
284:
285: public void setStringRAR(String stringRAR) {
286: this .stringRAR = stringRAR;
287: }
288:
289: public Object createConnectionFactory() throws ResourceException {
290: return null;
291: }
292:
293: public Object createConnectionFactory(ConnectionManager cxManager)
294: throws ResourceException {
295: return new PropertyTestConnectionFactoryImpl(cxManager);
296: }
297:
298: public ManagedConnection createManagedConnection(Subject subject,
299: ConnectionRequestInfo cxRequestInfo)
300: throws ResourceException {
301: return new PropertyTestManagedConnection(this );
302: }
303:
304: public PrintWriter getLogWriter() throws ResourceException {
305: return null;
306: }
307:
308: public ManagedConnection matchManagedConnections(Set connectionSet,
309: Subject subject, ConnectionRequestInfo cxRequestInfo)
310: throws ResourceException {
311: return (ManagedConnection) connectionSet.iterator().next();
312: }
313:
314: public void setLogWriter(PrintWriter out) throws ResourceException {
315: }
316:
317: }
|