ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akuznet...@apache.org
Subject [13/20] incubator-ignite git commit: IGNITE-377 Rework schema load XML generator to generate <util:constant static-field="java.sql.Types.XXX"/> instead of int number.
Date Mon, 02 Mar 2015 09:44:34 GMT
 IGNITE-377 Rework schema load XML generator to generate <util:constant static-field="java.sql.Types.XXX"/>
instead of int number.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/061ea8ae
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/061ea8ae
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/061ea8ae

Branch: refs/heads/ignite-339
Commit: 061ea8aed7f43a47b5097f3c626701c688014e63
Parents: 6097e7b
Author: AKuznetsov <akuznetsov@gridgain.com>
Authored: Sun Mar 1 00:17:19 2015 +0700
Committer: AKuznetsov <akuznetsov@gridgain.com>
Committed: Sun Mar 1 00:17:19 2015 +0700

----------------------------------------------------------------------
 .../core/src/test/config/store/jdbc/Ignite.xml  |  63 ++++++---
 .../ignite/schema/generator/XmlGenerator.java   |   8 +-
 .../apache/ignite/schema/model/PojoField.java   |  11 +-
 .../apache/ignite/schema/load/model/Ignite.xml  | 133 ++++++++++++++-----
 .../yardstick/config/ignite-store-config.xml    |  15 ++-
 5 files changed, 168 insertions(+), 62 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/061ea8ae/modules/core/src/test/config/store/jdbc/Ignite.xml
----------------------------------------------------------------------
diff --git a/modules/core/src/test/config/store/jdbc/Ignite.xml b/modules/core/src/test/config/store/jdbc/Ignite.xml
index 1b6f702..d56b4e6 100644
--- a/modules/core/src/test/config/store/jdbc/Ignite.xml
+++ b/modules/core/src/test/config/store/jdbc/Ignite.xml
@@ -21,9 +21,12 @@
     XML generated by Apache Ignite Schema Load utility: 02/03/2015
 -->
 <beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:util="http://www.springframework.org/schema/util"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://www.springframework.org/schema/beans
-                           http://www.springframework.org/schema/beans/spring-beans.xsd">
+                           http://www.springframework.org/schema/beans/spring-beans.xsd
+                           http://www.springframework.org/schema/util
+                           http://www.springframework.org/schema/util/spring-util.xsd">
     <bean class="org.apache.ignite.cache.CacheTypeMetadata">
         <property name="databaseSchema" value="PUBLIC"/>
         <property name="databaseTable" value="ORGANIZATION"/>
@@ -33,7 +36,9 @@
             <list>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
                     <property name="databaseName" value="ID"/>
-                    <property name="databaseType" value="4"/>
+                    <property name="databaseType">
+                        <util:constant static-field="java.sql.Types.INTEGER"/>
+                    </property>
                     <property name="javaName" value="id"/>
                     <property name="javaType" value="java.lang.Integer"/>
                 </bean>
@@ -43,24 +48,31 @@
             <list>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
                     <property name="databaseName" value="ID"/>
-                    <property name="databaseType" value="4"/>
+                    <property name="databaseType">
+                        <util:constant static-field="java.sql.Types.INTEGER"/>
+                    </property>
                     <property name="javaName" value="id"/>
                     <property name="javaType" value="java.lang.Integer"/>
                 </bean>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
                     <property name="databaseName" value="NAME"/>
-                    <property name="databaseType" value="12"/>
+                    <property name="databaseType">
+                        <util:constant static-field="java.sql.Types.VARCHAR"/>
+                    </property>
                     <property name="javaName" value="name"/>
                     <property name="javaType" value="java.lang.String"/>
                 </bean>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
                     <property name="databaseName" value="CITY"/>
-                    <property name="databaseType" value="12"/>
+                    <property name="databaseType">
+                        <util:constant static-field="java.sql.Types.VARCHAR"/>
+                    </property>
                     <property name="javaName" value="city"/>
                     <property name="javaType" value="java.lang.String"/>
                 </bean>
             </list>
         </property>
+
     </bean>
     <bean class="org.apache.ignite.cache.CacheTypeMetadata">
         <property name="databaseSchema" value="PUBLIC"/>
@@ -71,7 +83,9 @@
             <list>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
                     <property name="databaseName" value="ID"/>
-                    <property name="databaseType" value="4"/>
+                    <property name="databaseType">
+                        <util:constant static-field="java.sql.Types.INTEGER"/>
+                    </property>
                     <property name="javaName" value="id"/>
                     <property name="javaType" value="java.lang.Integer"/>
                 </bean>
@@ -81,24 +95,31 @@
             <list>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
                     <property name="databaseName" value="ID"/>
-                    <property name="databaseType" value="4"/>
+                    <property name="databaseType">
+                        <util:constant static-field="java.sql.Types.INTEGER"/>
+                    </property>
                     <property name="javaName" value="id"/>
                     <property name="javaType" value="java.lang.Integer"/>
                 </bean>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
                     <property name="databaseName" value="ORG_ID"/>
-                    <property name="databaseType" value="4"/>
+                    <property name="databaseType">
+                        <util:constant static-field="java.sql.Types.INTEGER"/>
+                    </property>
                     <property name="javaName" value="orgId"/>
                     <property name="javaType" value="java.lang.Integer"/>
                 </bean>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
                     <property name="databaseName" value="NAME"/>
-                    <property name="databaseType" value="12"/>
+                    <property name="databaseType">
+                        <util:constant static-field="java.sql.Types.VARCHAR"/>
+                    </property>
                     <property name="javaName" value="name"/>
                     <property name="javaType" value="java.lang.String"/>
                 </bean>
             </list>
         </property>
+
     </bean>
     <bean class="org.apache.ignite.cache.CacheTypeMetadata">
         <property name="databaseSchema" value="PUBLIC"/>
@@ -109,19 +130,25 @@
             <list>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
                     <property name="databaseName" value="ID"/>
-                    <property name="databaseType" value="4"/>
+                    <property name="databaseType">
+                        <util:constant static-field="java.sql.Types.INTEGER"/>
+                    </property>
                     <property name="javaName" value="id"/>
                     <property name="javaType" value="int"/>
                 </bean>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
                     <property name="databaseName" value="ORG_ID"/>
-                    <property name="databaseType" value="4"/>
+                    <property name="databaseType">
+                        <util:constant static-field="java.sql.Types.INTEGER"/>
+                    </property>
                     <property name="javaName" value="orgId"/>
                     <property name="javaType" value="int"/>
                 </bean>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
                     <property name="databaseName" value="CITY_ID"/>
-                    <property name="databaseType" value="4"/>
+                    <property name="databaseType">
+                        <util:constant static-field="java.sql.Types.INTEGER"/>
+                    </property>
                     <property name="javaName" value="cityId"/>
                     <property name="javaType" value="int"/>
                 </bean>
@@ -131,19 +158,25 @@
             <list>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
                     <property name="databaseName" value="ID"/>
-                    <property name="databaseType" value="4"/>
+                    <property name="databaseType">
+                        <util:constant static-field="java.sql.Types.INTEGER"/>
+                    </property>
                     <property name="javaName" value="id"/>
                     <property name="javaType" value="java.lang.Integer"/>
                 </bean>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
                     <property name="databaseName" value="ORG_ID"/>
-                    <property name="databaseType" value="4"/>
+                    <property name="databaseType">
+                        <util:constant static-field="java.sql.Types.INTEGER"/>
+                    </property>
                     <property name="javaName" value="orgId"/>
                     <property name="javaType" value="java.lang.Integer"/>
                 </bean>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
                     <property name="databaseName" value="NAME"/>
-                    <property name="databaseType" value="12"/>
+                    <property name="databaseType">
+                        <util:constant static-field="java.sql.Types.VARCHAR"/>
+                    </property>
                     <property name="javaName" value="name"/>
                     <property name="javaType" value="java.lang.String"/>
                 </bean>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/061ea8ae/modules/schema-load/src/main/java/org/apache/ignite/schema/generator/XmlGenerator.java
----------------------------------------------------------------------
diff --git a/modules/schema-load/src/main/java/org/apache/ignite/schema/generator/XmlGenerator.java
b/modules/schema-load/src/main/java/org/apache/ignite/schema/generator/XmlGenerator.java
index d4d7054..c62a720 100644
--- a/modules/schema-load/src/main/java/org/apache/ignite/schema/generator/XmlGenerator.java
+++ b/modules/schema-load/src/main/java/org/apache/ignite/schema/generator/XmlGenerator.java
@@ -159,7 +159,8 @@ public class XmlGenerator {
                 Element item = addBean(doc, list, CacheTypeFieldMetadata.class);
 
                 addProperty(doc, item, "databaseName", field.dbName());
-                addProperty(doc, item, "databaseType", String.valueOf(field.dbType()));
+                Element dbType = addProperty(doc, item, "databaseType", null);
+                addElement(doc, dbType, "util:constant", "static-field", "java.sql.Types."
+ field.dbTypeName());
                 addProperty(doc, item, "javaName", field.javaName());
                 addProperty(doc, item, "javaType", field.javaTypeName());
             }
@@ -308,9 +309,12 @@ public class XmlGenerator {
             Element beans = addElement(doc, doc, "beans");
             beans.setAttribute("xmlns", "http://www.springframework.org/schema/beans");
             beans.setAttribute("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance");
+            beans.setAttribute("xmlns:util", "http://www.springframework.org/schema/util");
             beans.setAttribute("xsi:schemaLocation",
                 "http://www.springframework.org/schema/beans " +
-                "http://www.springframework.org/schema/beans/spring-beans.xsd");
+                "http://www.springframework.org/schema/beans/spring-beans.xsd " +
+                "http://www.springframework.org/schema/util " +
+                "http://www.springframework.org/schema/util/spring-util.xsd");
 
             for (PojoDescriptor pojo : pojos)
                 addTypeMetadata(doc, beans, pkg, pojo, includeKeys);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/061ea8ae/modules/schema-load/src/main/java/org/apache/ignite/schema/model/PojoField.java
----------------------------------------------------------------------
diff --git a/modules/schema-load/src/main/java/org/apache/ignite/schema/model/PojoField.java
b/modules/schema-load/src/main/java/org/apache/ignite/schema/model/PojoField.java
index f9a5837..10939d9 100644
--- a/modules/schema-load/src/main/java/org/apache/ignite/schema/model/PojoField.java
+++ b/modules/schema-load/src/main/java/org/apache/ignite/schema/model/PojoField.java
@@ -45,9 +45,6 @@ public class PojoField {
     /** Field name in database. */
     private final StringProperty dbNameProp;
 
-    /** JDBC field type in database. */
-    private final int dbType;
-
     /** Field type in database. */
     private final StringProperty dbTypeNameProp;
 
@@ -139,8 +136,6 @@ public class PojoField {
     public PojoField(String dbName, int dbType, String javaName, String javaTypeName, boolean
key, boolean nullable) {
         dbNameProp = new SimpleStringProperty(dbName);
 
-        this.dbType = dbType;
-
         dbTypeNameProp = new SimpleStringProperty(jdbcTypeName(dbType));
 
         javaNamePrev = javaName;
@@ -340,10 +335,10 @@ public class PojoField {
     }
 
     /**
-     * @return POJO field JDBC type in database.
+     * @return POJO field JDBC type name in database.
      */
-    public int dbType() {
-        return dbType;
+    public String dbTypeName() {
+        return dbTypeNameProp.get();
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/061ea8ae/modules/schema-load/src/test/java/org/apache/ignite/schema/load/model/Ignite.xml
----------------------------------------------------------------------
diff --git a/modules/schema-load/src/test/java/org/apache/ignite/schema/load/model/Ignite.xml
b/modules/schema-load/src/test/java/org/apache/ignite/schema/load/model/Ignite.xml
index 8690dbd..f0b5696 100644
--- a/modules/schema-load/src/test/java/org/apache/ignite/schema/load/model/Ignite.xml
+++ b/modules/schema-load/src/test/java/org/apache/ignite/schema/load/model/Ignite.xml
@@ -21,9 +21,12 @@
     XML generated by Apache Ignite Schema Load utility: 02/05/2015
 -->
 <beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:util="http://www.springframework.org/schema/util"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://www.springframework.org/schema/beans
-                           http://www.springframework.org/schema/beans/spring-beans.xsd">
+                           http://www.springframework.org/schema/beans/spring-beans.xsd
+                           http://www.springframework.org/schema/util
+                           http://www.springframework.org/schema/util/spring-util.xsd">
     <bean class="org.apache.ignite.cache.CacheTypeMetadata">
         <property name="databaseSchema" value="PUBLIC"/>
         <property name="databaseTable" value="OBJECTS"/>
@@ -33,7 +36,9 @@
             <list>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
                     <property name="databaseName" value="PK"/>
-                    <property name="databaseType" value="4"/>
+                    <property name="databaseType">
+                        <util:constant static-field="java.sql.Types.INTEGER"/>
+                    </property>
                     <property name="javaName" value="pk"/>
                     <property name="javaType" value="int"/>
                 </bean>
@@ -43,91 +48,121 @@
             <list>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
                     <property name="databaseName" value="PK"/>
-                    <property name="databaseType" value="4"/>
+                    <property name="databaseType">
+                        <util:constant static-field="java.sql.Types.INTEGER"/>
+                    </property>
                     <property name="javaName" value="pk"/>
                     <property name="javaType" value="int"/>
                 </bean>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
                     <property name="databaseName" value="BOOLCOL"/>
-                    <property name="databaseType" value="16"/>
+                    <property name="databaseType">
+                        <util:constant static-field="java.sql.Types.BOOLEAN"/>
+                    </property>
                     <property name="javaName" value="boolcol"/>
                     <property name="javaType" value="java.lang.Boolean"/>
                 </bean>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
                     <property name="databaseName" value="BYTECOL"/>
-                    <property name="databaseType" value="-6"/>
+                    <property name="databaseType">
+                        <util:constant static-field="java.sql.Types.TINYINT"/>
+                    </property>
                     <property name="javaName" value="bytecol"/>
                     <property name="javaType" value="java.lang.Byte"/>
                 </bean>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
                     <property name="databaseName" value="SHORTCOL"/>
-                    <property name="databaseType" value="5"/>
+                    <property name="databaseType">
+                        <util:constant static-field="java.sql.Types.SMALLINT"/>
+                    </property>
                     <property name="javaName" value="shortcol"/>
                     <property name="javaType" value="java.lang.Short"/>
                 </bean>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
                     <property name="databaseName" value="INTCOL"/>
-                    <property name="databaseType" value="4"/>
+                    <property name="databaseType">
+                        <util:constant static-field="java.sql.Types.INTEGER"/>
+                    </property>
                     <property name="javaName" value="intcol"/>
                     <property name="javaType" value="java.lang.Integer"/>
                 </bean>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
                     <property name="databaseName" value="LONGCOL"/>
-                    <property name="databaseType" value="-5"/>
+                    <property name="databaseType">
+                        <util:constant static-field="java.sql.Types.BIGINT"/>
+                    </property>
                     <property name="javaName" value="longcol"/>
                     <property name="javaType" value="java.lang.Long"/>
                 </bean>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
                     <property name="databaseName" value="FLOATCOL"/>
-                    <property name="databaseType" value="7"/>
+                    <property name="databaseType">
+                        <util:constant static-field="java.sql.Types.REAL"/>
+                    </property>
                     <property name="javaName" value="floatcol"/>
                     <property name="javaType" value="java.lang.Float"/>
                 </bean>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
                     <property name="databaseName" value="DOUBLECOL"/>
-                    <property name="databaseType" value="8"/>
+                    <property name="databaseType">
+                        <util:constant static-field="java.sql.Types.DOUBLE"/>
+                    </property>
                     <property name="javaName" value="doublecol"/>
                     <property name="javaType" value="java.lang.Double"/>
                 </bean>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
                     <property name="databaseName" value="DOUBLECOL2"/>
-                    <property name="databaseType" value="8"/>
+                    <property name="databaseType">
+                        <util:constant static-field="java.sql.Types.DOUBLE"/>
+                    </property>
                     <property name="javaName" value="doublecol2"/>
                     <property name="javaType" value="java.lang.Double"/>
                 </bean>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
                     <property name="databaseName" value="BIGDECIMALCOL"/>
-                    <property name="databaseType" value="3"/>
+                    <property name="databaseType">
+                        <util:constant static-field="java.sql.Types.DECIMAL"/>
+                    </property>
                     <property name="javaName" value="bigdecimalcol"/>
                     <property name="javaType" value="java.math.BigDecimal"/>
                 </bean>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
                     <property name="databaseName" value="STRCOL"/>
-                    <property name="databaseType" value="12"/>
+                    <property name="databaseType">
+                        <util:constant static-field="java.sql.Types.VARCHAR"/>
+                    </property>
                     <property name="javaName" value="strcol"/>
                     <property name="javaType" value="java.lang.String"/>
                 </bean>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
                     <property name="databaseName" value="DATECOL"/>
-                    <property name="databaseType" value="91"/>
+                    <property name="databaseType">
+                        <util:constant static-field="java.sql.Types.DATE"/>
+                    </property>
                     <property name="javaName" value="datecol"/>
                     <property name="javaType" value="java.sql.Date"/>
                 </bean>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
                     <property name="databaseName" value="TIMECOL"/>
-                    <property name="databaseType" value="92"/>
+                    <property name="databaseType">
+                        <util:constant static-field="java.sql.Types.TIME"/>
+                    </property>
                     <property name="javaName" value="timecol"/>
                     <property name="javaType" value="java.sql.Time"/>
                 </bean>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
                     <property name="databaseName" value="TSCOL"/>
-                    <property name="databaseType" value="93"/>
+                    <property name="databaseType">
+                        <util:constant static-field="java.sql.Types.TIMESTAMP"/>
+                    </property>
                     <property name="javaName" value="tscol"/>
                     <property name="javaType" value="java.sql.Timestamp"/>
                 </bean>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
                     <property name="databaseName" value="ARRCOL"/>
-                    <property name="databaseType" value="-3"/>
+                    <property name="databaseType">
+                        <util:constant static-field="java.sql.Types.VARBINARY"/>
+                    </property>
                     <property name="javaName" value="arrcol"/>
                     <property name="javaType" value="java.lang.Object"/>
                 </bean>
@@ -181,7 +216,9 @@
             <list>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
                     <property name="databaseName" value="PK"/>
-                    <property name="databaseType" value="4"/>
+                    <property name="databaseType">
+                        <util:constant static-field="java.sql.Types.INTEGER"/>
+                    </property>
                     <property name="javaName" value="pk"/>
                     <property name="javaType" value="int"/>
                 </bean>
@@ -191,91 +228,121 @@
             <list>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
                     <property name="databaseName" value="PK"/>
-                    <property name="databaseType" value="4"/>
+                    <property name="databaseType">
+                        <util:constant static-field="java.sql.Types.INTEGER"/>
+                    </property>
                     <property name="javaName" value="pk"/>
                     <property name="javaType" value="int"/>
                 </bean>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
                     <property name="databaseName" value="BOOLCOL"/>
-                    <property name="databaseType" value="16"/>
+                    <property name="databaseType">
+                        <util:constant static-field="java.sql.Types.BOOLEAN"/>
+                    </property>
                     <property name="javaName" value="boolcol"/>
                     <property name="javaType" value="boolean"/>
                 </bean>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
                     <property name="databaseName" value="BYTECOL"/>
-                    <property name="databaseType" value="-6"/>
+                    <property name="databaseType">
+                        <util:constant static-field="java.sql.Types.TINYINT"/>
+                    </property>
                     <property name="javaName" value="bytecol"/>
                     <property name="javaType" value="byte"/>
                 </bean>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
                     <property name="databaseName" value="SHORTCOL"/>
-                    <property name="databaseType" value="5"/>
+                    <property name="databaseType">
+                        <util:constant static-field="java.sql.Types.SMALLINT"/>
+                    </property>
                     <property name="javaName" value="shortcol"/>
                     <property name="javaType" value="short"/>
                 </bean>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
                     <property name="databaseName" value="INTCOL"/>
-                    <property name="databaseType" value="4"/>
+                    <property name="databaseType">
+                        <util:constant static-field="java.sql.Types.INTEGER"/>
+                    </property>
                     <property name="javaName" value="intcol"/>
                     <property name="javaType" value="int"/>
                 </bean>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
                     <property name="databaseName" value="LONGCOL"/>
-                    <property name="databaseType" value="-5"/>
+                    <property name="databaseType">
+                        <util:constant static-field="java.sql.Types.BIGINT"/>
+                    </property>
                     <property name="javaName" value="longcol"/>
                     <property name="javaType" value="long"/>
                 </bean>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
                     <property name="databaseName" value="FLOATCOL"/>
-                    <property name="databaseType" value="7"/>
+                    <property name="databaseType">
+                        <util:constant static-field="java.sql.Types.REAL"/>
+                    </property>
                     <property name="javaName" value="floatcol"/>
                     <property name="javaType" value="float"/>
                 </bean>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
                     <property name="databaseName" value="DOUBLECOL"/>
-                    <property name="databaseType" value="8"/>
+                    <property name="databaseType">
+                        <util:constant static-field="java.sql.Types.DOUBLE"/>
+                    </property>
                     <property name="javaName" value="doublecol"/>
                     <property name="javaType" value="double"/>
                 </bean>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
                     <property name="databaseName" value="DOUBLECOL2"/>
-                    <property name="databaseType" value="8"/>
+                    <property name="databaseType">
+                        <util:constant static-field="java.sql.Types.DOUBLE"/>
+                    </property>
                     <property name="javaName" value="doublecol2"/>
                     <property name="javaType" value="double"/>
                 </bean>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
                     <property name="databaseName" value="BIGDECIMALCOL"/>
-                    <property name="databaseType" value="3"/>
+                    <property name="databaseType">
+                        <util:constant static-field="java.sql.Types.DECIMAL"/>
+                    </property>
                     <property name="javaName" value="bigdecimalcol"/>
                     <property name="javaType" value="java.math.BigDecimal"/>
                 </bean>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
                     <property name="databaseName" value="STRCOL"/>
-                    <property name="databaseType" value="12"/>
+                    <property name="databaseType">
+                        <util:constant static-field="java.sql.Types.VARCHAR"/>
+                    </property>
                     <property name="javaName" value="strcol"/>
                     <property name="javaType" value="java.lang.String"/>
                 </bean>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
                     <property name="databaseName" value="DATECOL"/>
-                    <property name="databaseType" value="91"/>
+                    <property name="databaseType">
+                        <util:constant static-field="java.sql.Types.DATE"/>
+                    </property>
                     <property name="javaName" value="datecol"/>
                     <property name="javaType" value="java.sql.Date"/>
                 </bean>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
                     <property name="databaseName" value="TIMECOL"/>
-                    <property name="databaseType" value="92"/>
+                    <property name="databaseType">
+                        <util:constant static-field="java.sql.Types.TIME"/>
+                    </property>
                     <property name="javaName" value="timecol"/>
                     <property name="javaType" value="java.sql.Time"/>
                 </bean>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
                     <property name="databaseName" value="TSCOL"/>
-                    <property name="databaseType" value="93"/>
+                    <property name="databaseType">
+                        <util:constant static-field="java.sql.Types.TIMESTAMP"/>
+                    </property>
                     <property name="javaName" value="tscol"/>
                     <property name="javaType" value="java.sql.Timestamp"/>
                 </bean>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
                     <property name="databaseName" value="ARRCOL"/>
-                    <property name="databaseType" value="-3"/>
+                    <property name="databaseType">
+                        <util:constant static-field="java.sql.Types.VARBINARY"/>
+                    </property>
                     <property name="javaName" value="arrcol"/>
                     <property name="javaType" value="java.lang.Object"/>
                 </bean>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/061ea8ae/modules/yardstick/config/ignite-store-config.xml
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/ignite-store-config.xml b/modules/yardstick/config/ignite-store-config.xml
index 161cfa5..066b246 100644
--- a/modules/yardstick/config/ignite-store-config.xml
+++ b/modules/yardstick/config/ignite-store-config.xml
@@ -21,9 +21,12 @@
     Ignite Spring configuration file to startup grid.
 -->
 <beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:util="http://www.springframework.org/schema/util"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xsi:schemaLocation="
-        http://www.springframework.org/schema/beans  http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+                           http://www.springframework.org/schema/beans/spring-beans.xsd
+                           http://www.springframework.org/schema/util
+                           http://www.springframework.org/schema/util/spring-util.xsd">
     <!--
         Store data source.
     -->
@@ -45,7 +48,9 @@
             <list>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
                     <property name="databaseName" value="ID"/>
-                    <property name="databaseType" value="4"/>
+                    <property name="databaseType">
+                        <util:constant static-field="java.sql.Types.INTEGER"/>
+                    </property>
                     <property name="javaName" value="id"/>
                     <property name="javaType" value="int"/>
                 </bean>
@@ -55,7 +60,9 @@
             <list>
                 <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata">
                     <property name="databaseName" value="VALUE"/>
-                    <property name="databaseType" value="4"/>
+                    <property name="databaseType">
+                        <util:constant static-field="java.sql.Types.INTEGER"/>
+                    </property>
                     <property name="javaName" value="id"/>
                     <property name="javaType" value="int"/>
                 </bean>


Mime
View raw message