01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: *
17: */
18:
19: /*
20: * Created on May 16, 2004
21: *
22: */
23: package org.apache.jmeter.protocol.jdbc.sampler;
24:
25: import java.beans.PropertyDescriptor;
26:
27: import org.apache.jmeter.testbeans.BeanInfoSupport;
28: import org.apache.jmeter.testbeans.gui.TextAreaEditor;
29:
30: /**
31: * @author mstover
32: *
33: */
34: public class JDBCSamplerBeanInfo extends BeanInfoSupport {
35:
36: /**
37: *
38: */
39: public JDBCSamplerBeanInfo() {
40: super (JDBCSampler.class);
41:
42: createPropertyGroup("varName", // $NON-NLS-1$
43: new String[] { "dataSource" }); // $NON-NLS-1$
44:
45: createPropertyGroup("sql", // $NON-NLS-1$
46: new String[] { "queryType", // $NON-NLS-1$
47: "query", // $NON-NLS-1$
48: "queryArguments", // $NON-NLS-1$
49: "queryArgumentsTypes" // $NON-NLS-1$
50: });
51:
52: PropertyDescriptor p = property("dataSource"); // $NON-NLS-1$
53: p.setValue(NOT_UNDEFINED, Boolean.TRUE);
54: p.setValue(DEFAULT, "");
55:
56: p = property("queryArguments"); // $NON-NLS-1$
57: p.setValue(NOT_UNDEFINED, Boolean.TRUE);
58: p.setValue(DEFAULT, "");
59:
60: p = property("queryArgumentsTypes"); // $NON-NLS-1$
61: p.setValue(NOT_UNDEFINED, Boolean.TRUE);
62: p.setValue(DEFAULT, "");
63:
64: p = property("queryType"); // $NON-NLS-1$
65: p.setValue(NOT_UNDEFINED, Boolean.TRUE);
66: p.setValue(DEFAULT, JDBCSampler.SELECT);
67: p.setValue(NOT_OTHER, Boolean.TRUE);
68: p.setValue(TAGS, new String[] { JDBCSampler.SELECT,
69: JDBCSampler.UPDATE, JDBCSampler.CALLABLE,
70: JDBCSampler.PREPARED_SELECT,
71: JDBCSampler.PREPARED_UPDATE, JDBCSampler.COMMIT,
72: JDBCSampler.ROLLBACK, JDBCSampler.AUTOCOMMIT_FALSE,
73: JDBCSampler.AUTOCOMMIT_TRUE, });
74:
75: p = property("query"); // $NON-NLS-1$
76: p.setValue(NOT_UNDEFINED, Boolean.TRUE);
77: p.setValue(DEFAULT, "");
78: p.setPropertyEditorClass(TextAreaEditor.class);
79:
80: }
81: }
|