mstover1 2005/07/15 13:34:24
Modified: src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/sampler
Tag: rel-2-1 JDBCSamplerBeanInfo.java
JDBCSamplerResources_es.properties
JDBCSamplerResources.properties JDBCSampler.java
Log:
Improving GUI on JDBC Sampler
Revision Changes Path
No revision
No revision
1.5.2.1 +5 -3
jakarta-jmeter/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/sampler/JDBCSamplerBeanInfo.java
Index: JDBCSamplerBeanInfo.java
===================================================================
RCS file:
/home/cvs/jakarta-jmeter/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/sampler/JDBCSamplerBeanInfo.java,v
retrieving revision 1.5
retrieving revision 1.5.2.1
diff -u -r1.5 -r1.5.2.1
--- JDBCSamplerBeanInfo.java 12 Jul 2005 20:50:54 -0000 1.5
+++ JDBCSamplerBeanInfo.java 15 Jul 2005 20:34:24 -0000 1.5.2.1
@@ -40,15 +40,17 @@
createPropertyGroup("varName", new String[] { "dataSource" });
- createPropertyGroup("sql", new String[] { "queryOnly", "query"
});
+ createPropertyGroup("sql", new String[] { "queryType", "query"
});
PropertyDescriptor p = property("dataSource");
p.setValue(NOT_UNDEFINED, Boolean.TRUE);
p.setValue(DEFAULT, "");
- p = property("queryOnly");
+ p = property("queryType");
p.setValue(NOT_UNDEFINED, Boolean.TRUE);
- p.setValue(DEFAULT, new Boolean(true));
+ p.setValue(DEFAULT, JDBCSampler.SELECT);
+ p.setValue(NOT_OTHER,Boolean.TRUE);
+ p.setValue(TAGS,new String[]{JDBCSampler.SELECT,"Update
Statement"});
p = property("query");
p.setValue(NOT_UNDEFINED, Boolean.TRUE);
1.1.2.1 +2 -2
jakarta-jmeter/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/sampler/JDBCSamplerResources_es.properties
Index: JDBCSamplerResources_es.properties
===================================================================
RCS file:
/home/cvs/jakarta-jmeter/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/sampler/JDBCSamplerResources_es.properties,v
retrieving revision 1.1
retrieving revision 1.1.2.1
diff -u -r1.1 -r1.1.2.1
--- JDBCSamplerResources_es.properties 10 Jul 2005 19:23:47 -0000
1.1
+++ JDBCSamplerResources_es.properties 15 Jul 2005 20:34:24 -0000
1.1.2.1
@@ -4,7 +4,7 @@
displayName=Petici\u00F3n JDBC
query.displayName=Query
query.shortDescription=Query SQL a enviar a la base de datos
-queryOnly.displayName=Solo Query
-queryOnly.shortDescription=is true, se lanzar\u00E1 como una query y no como
un update/inser. Si no, se lanza como update.
+queryType.displayName=Solo Query
+queryType.shortDescription=is true, se lanzar\u00E1 como una query y no como
un update/inser. Si no, se lanza como update.
sql.displayName=Query SQL
varName.displayName=Nombre de Variable Ligada al Pool
1.3.4.1 +2 -2
jakarta-jmeter/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/sampler/JDBCSamplerResources.properties
Index: JDBCSamplerResources.properties
===================================================================
RCS file:
/home/cvs/jakarta-jmeter/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/sampler/JDBCSamplerResources.properties,v
retrieving revision 1.3
retrieving revision 1.3.4.1
diff -u -r1.3 -r1.3.4.1
--- JDBCSamplerResources.properties 15 Apr 2005 19:55:37 -0000 1.3
+++ JDBCSamplerResources.properties 15 Jul 2005 20:34:24 -0000 1.3.4.1
@@ -3,7 +3,7 @@
sql.displayName=SQL Query
query.displayName=Query
query.shortDescription=SQL Query to send to database
-queryOnly.displayName=Query Only
-queryOnly.shortDescription=If true, will run as a query and not as an
update/insert. Otherwise, run as update.
+queryType.displayName=Query Type
+queryType.shortDescription=Determines if the SQL statement should be run as
a select statement or an update statement.
dataSource.displayName=Variable Name
dataSource.shortDescription=Name of the JMeter variable that the connection
pool is bound to.
\ No newline at end of file
1.37.2.1 +11 -11
jakarta-jmeter/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/sampler/JDBCSampler.java
Index: JDBCSampler.java
===================================================================
RCS file:
/home/cvs/jakarta-jmeter/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/sampler/JDBCSampler.java,v
retrieving revision 1.37
retrieving revision 1.37.2.1
diff -u -r1.37 -r1.37.2.1
--- JDBCSampler.java 12 Jul 2005 20:50:54 -0000 1.37
+++ JDBCSampler.java 15 Jul 2005 20:34:24 -0000 1.37.2.1
@@ -44,12 +44,13 @@
private static Logger log = LoggingManager.getLoggerForClass();
public static final String QUERY = "query";
+ public static final String SELECT = "Select Statement";
public String query = "";
public String dataSource = "";
- public boolean queryOnly = true;
+ public String queryType = SELECT;
/**
* Creates a JDBCSampler.
@@ -80,7 +81,7 @@
stmt = conn.createStatement();
// Based on query return value, get results
- if (isQueryOnly()) {
+ if (SELECT.equals(getQueryType())) {
ResultSet rs = null;
try {
rs = stmt.executeQuery(getQuery());
@@ -195,17 +196,16 @@
}
/**
- * @return Returns the queryOnly.
+ * @return Returns the queryType.
*/
- public boolean isQueryOnly() {
- return queryOnly;
+ public String getQueryType() {
+ return queryType;
}
/**
- * @param queryOnly
- * The queryOnly to set.
+ * @param queryType The queryType to set.
*/
- public void setQueryOnly(boolean queryOnly) {
- this.queryOnly = queryOnly;
+ public void setQueryType(String queryType) {
+ this.queryType = queryType;
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]