ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From se...@apache.org
Subject [3/8] incubator-ignite git commit: ignite-sql-old - annotations
Date Fri, 13 Feb 2015 22:55:21 GMT
ignite-sql-old - annotations


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

Branch: refs/heads/ignite-sql-old
Commit: 8be3faa768d43f8427b44afa9684a945814092af
Parents: 6f2dc26
Author: S.Vladykin <svladykin@gridgain.com>
Authored: Sat Feb 14 00:54:32 2015 +0300
Committer: S.Vladykin <svladykin@gridgain.com>
Committed: Sat Feb 14 00:54:32 2015 +0300

----------------------------------------------------------------------
 .../examples/datagrid/CacheQueryExample.java    |  17 +--
 .../datagrid/starschema/DimProduct.java         |   6 +-
 .../examples/datagrid/starschema/DimStore.java  |   6 +-
 .../datagrid/starschema/FactPurchase.java       |  10 +-
 .../ignite/jdbc/JdbcComplexQuerySelfTest.java   |  15 ++-
 .../ignite/jdbc/JdbcMetadataSelfTest.java       |  13 +-
 .../jdbc/JdbcPreparedStatementSelfTest.java     |  32 ++---
 .../ignite/jdbc/JdbcResultSetSelfTest.java      |  39 +++---
 .../ignite/jdbc/JdbcStatementSelfTest.java      |  11 +-
 .../apache/ignite/cache/query/CacheQuery.java   |   9 +-
 .../query/annotations/QueryGroupIndex.java      |  49 ++++++++
 .../cache/query/annotations/QuerySqlField.java  | 125 +++++++++++++++++++
 .../query/annotations/QuerySqlFunction.java     |  67 ++++++++++
 .../cache/query/annotations/QueryTextField.java |  35 ++++++
 .../configuration/QueryConfiguration.java       |   3 +-
 .../processors/query/GridQueryProcessor.java    |  21 ++--
 .../GridCacheConcurrentTxMultiNodeTest.java     |  21 ++--
 ...CacheFullTextQueryMultithreadedSelfTest.java |   3 +-
 .../cache/GridCacheLuceneQueryIndexTest.java    |   6 +-
 .../cache/GridCacheOffHeapSelfTest.java         |   4 +-
 .../cache/GridCacheQueryEmbeddedValue.java      |  10 +-
 .../cache/GridCacheQueryIndexSelfTest.java      |   3 +-
 .../processors/cache/GridCacheTestValue.java    |   4 +-
 .../processors/cache/GridCacheTestValue2.java   |   4 +-
 ...hePartitionedQueryMultiThreadedSelfTest.java |   9 +-
 ...dCacheAbstractReduceFieldsQuerySelfTest.java |  11 +-
 .../ignite/loadtests/mapper/TestObject.java     |   6 +-
 .../query/h2/GridH2IndexingGeoSelfTest.java     |   5 +-
 .../processors/query/h2/IgniteH2Indexing.java   |   3 +-
 .../GridCacheAbstractFieldsQuerySelfTest.java   |  13 +-
 .../cache/GridCacheAbstractQuerySelfTest.java   |  29 ++---
 .../cache/GridCacheCrossCacheQuerySelfTest.java |  17 +--
 .../cache/GridCacheQueryLoadSelfTest.java       |   4 +-
 .../GridCacheQueryMultiThreadedSelfTest.java    |   3 +-
 .../cache/GridCacheQueryTestValue.java          |  20 +--
 .../GridCacheSqlQueryMultiThreadedSelfTest.java |   3 +-
 .../processors/cache/GridCacheSwapSelfTest.java |   4 +-
 .../GridCacheReplicatedQuerySelfTest.java       |   3 +-
 .../query/h2/GridH2IndexRebuildTest.java        |  13 +-
 .../query/h2/sql/GridQueryParsingTest.java      |  17 +--
 .../loadtests/h2indexing/GridTestEntity.java    |   6 +-
 .../scala/org/apache/ignite/scalar/scalar.scala |   6 +-
 .../commands/cache/VisorCacheCommandSpec.scala  |   4 +-
 .../yardstick/cache/model/Organization.java     |   6 +-
 .../ignite/yardstick/cache/model/Person.java    |  12 +-
 45 files changed, 499 insertions(+), 208 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8be3faa7/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheQueryExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheQueryExample.java b/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheQueryExample.java
index 04fb53d..238429c 100644
--- a/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheQueryExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheQueryExample.java
@@ -21,6 +21,7 @@ import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
 import org.apache.ignite.cache.affinity.*;
 import org.apache.ignite.cache.query.*;
+import org.apache.ignite.cache.query.annotations.*;
 import org.apache.ignite.lang.*;
 
 import java.io.*;
@@ -374,27 +375,27 @@ public class CacheQueryExample {
      */
     private static class Person implements Serializable {
         /** Person ID (indexed). */
-        @CacheQuerySqlField(index = true)
+        @QuerySqlField(index = true)
         private UUID id;
 
         /** Organization ID (indexed). */
-        @CacheQuerySqlField(index = true)
+        @QuerySqlField(index = true)
         private UUID orgId;
 
         /** First name (not-indexed). */
-        @CacheQuerySqlField
+        @QuerySqlField
         private String firstName;
 
         /** Last name (not indexed). */
-        @CacheQuerySqlField
+        @QuerySqlField
         private String lastName;
 
         /** Resume text (create LUCENE-based TEXT index for this field). */
-        @CacheQueryTextField
+        @QueryTextField
         private String resume;
 
         /** Salary (indexed). */
-        @CacheQuerySqlField
+        @QuerySqlField
         private double salary;
 
         /** Custom cache key to guarantee that person is always collocated with its organization. */
@@ -450,11 +451,11 @@ public class CacheQueryExample {
      */
     private static class Organization implements Serializable {
         /** Organization ID (indexed). */
-        @CacheQuerySqlField(index = true)
+        @QuerySqlField(index = true)
         private UUID id;
 
         /** Organization name (indexed). */
-        @CacheQuerySqlField(index = true)
+        @QuerySqlField(index = true)
         private String name;
 
         /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8be3faa7/examples/src/main/java/org/apache/ignite/examples/datagrid/starschema/DimProduct.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/datagrid/starschema/DimProduct.java b/examples/src/main/java/org/apache/ignite/examples/datagrid/starschema/DimProduct.java
index aa59ae5..79478f4 100644
--- a/examples/src/main/java/org/apache/ignite/examples/datagrid/starschema/DimProduct.java
+++ b/examples/src/main/java/org/apache/ignite/examples/datagrid/starschema/DimProduct.java
@@ -17,8 +17,8 @@
 
 package org.apache.ignite.examples.datagrid.starschema;
 
-import org.apache.ignite.cache.query.*;
 import org.apache.ignite.cache.*;
+import org.apache.ignite.cache.query.annotations.*;
 
 /**
  * Represents a product available for purchase. In our {@code snowflake} schema a {@code product}
@@ -27,14 +27,14 @@ import org.apache.ignite.cache.*;
  */
 public class DimProduct {
     /** Primary key. */
-    @CacheQuerySqlField(index = true)
+    @QuerySqlField(index = true)
     private int id;
 
     /** Product name. */
     private String name;
 
     /** Product list price. */
-    @CacheQuerySqlField
+    @QuerySqlField
     private float price;
 
     /** Available product quantity. */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8be3faa7/examples/src/main/java/org/apache/ignite/examples/datagrid/starschema/DimStore.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/datagrid/starschema/DimStore.java b/examples/src/main/java/org/apache/ignite/examples/datagrid/starschema/DimStore.java
index a2494b5..3c40fe2 100644
--- a/examples/src/main/java/org/apache/ignite/examples/datagrid/starschema/DimStore.java
+++ b/examples/src/main/java/org/apache/ignite/examples/datagrid/starschema/DimStore.java
@@ -17,8 +17,8 @@
 
 package org.apache.ignite.examples.datagrid.starschema;
 
-import org.apache.ignite.cache.query.*;
 import org.apache.ignite.cache.*;
+import org.apache.ignite.cache.query.annotations.*;
 
 /**
  * Represents a physical store location. In our {@code snowflake} schema a {@code store}
@@ -27,11 +27,11 @@ import org.apache.ignite.cache.*;
  */
 public class DimStore {
     /** Primary key. */
-    @CacheQuerySqlField(index = true)
+    @QuerySqlField(index = true)
     private int id;
 
     /** Store name. */
-    @CacheQuerySqlField
+    @QuerySqlField
     private String name;
 
     /** Zip code. */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8be3faa7/examples/src/main/java/org/apache/ignite/examples/datagrid/starschema/FactPurchase.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/datagrid/starschema/FactPurchase.java b/examples/src/main/java/org/apache/ignite/examples/datagrid/starschema/FactPurchase.java
index 61bbb6f..26dc5a0 100644
--- a/examples/src/main/java/org/apache/ignite/examples/datagrid/starschema/FactPurchase.java
+++ b/examples/src/main/java/org/apache/ignite/examples/datagrid/starschema/FactPurchase.java
@@ -17,8 +17,8 @@
 
 package org.apache.ignite.examples.datagrid.starschema;
 
-import org.apache.ignite.cache.query.*;
 import org.apache.ignite.cache.*;
+import org.apache.ignite.cache.query.annotations.*;
 
 /**
  * Represents a purchase record. In our {@code snowflake} schema purchase
@@ -27,19 +27,19 @@ import org.apache.ignite.cache.*;
  */
 public class FactPurchase {
     /** Primary key. */
-    @CacheQuerySqlField(index = true)
+    @QuerySqlField(index = true)
     private int id;
 
     /** Foreign key to store at which purchase occurred. */
-    @CacheQuerySqlField
+    @QuerySqlField
     private int storeId;
 
     /** Foreign key to purchased product. */
-    @CacheQuerySqlField
+    @QuerySqlField
     private int productId;
 
     /** Purchase price. */
-    @CacheQuerySqlField
+    @QuerySqlField
     private float purchasePrice;
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8be3faa7/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcComplexQuerySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcComplexQuerySelfTest.java b/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcComplexQuerySelfTest.java
index 980d34d..7e734b6 100644
--- a/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcComplexQuerySelfTest.java
+++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcComplexQuerySelfTest.java
@@ -18,9 +18,8 @@
 package org.apache.ignite.jdbc;
 
 import org.apache.ignite.IgniteCache;
-import org.apache.ignite.cache.*;
 import org.apache.ignite.cache.affinity.*;
-import org.apache.ignite.cache.query.*;
+import org.apache.ignite.cache.query.annotations.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.internal.util.typedef.*;
 import org.apache.ignite.spi.discovery.tcp.*;
@@ -259,19 +258,19 @@ public class JdbcComplexQuerySelfTest extends GridCommonAbstractTest {
     @SuppressWarnings("UnusedDeclaration")
     private static class Person implements Serializable {
         /** ID. */
-        @CacheQuerySqlField
+        @QuerySqlField
         private final int id;
 
         /** Name. */
-        @CacheQuerySqlField(index = false)
+        @QuerySqlField(index = false)
         private final String name;
 
         /** Age. */
-        @CacheQuerySqlField
+        @QuerySqlField
         private final int age;
 
         /** Organization ID. */
-        @CacheQuerySqlField
+        @QuerySqlField
         private final int orgId;
 
         /**
@@ -298,11 +297,11 @@ public class JdbcComplexQuerySelfTest extends GridCommonAbstractTest {
     @SuppressWarnings("UnusedDeclaration")
     private static class Organization implements Serializable {
         /** ID. */
-        @CacheQuerySqlField
+        @QuerySqlField
         private final int id;
 
         /** Name. */
-        @CacheQuerySqlField(index = false)
+        @QuerySqlField(index = false)
         private final String name;
 
         /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8be3faa7/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcMetadataSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcMetadataSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcMetadataSelfTest.java
index 7a30622..ea85e32 100644
--- a/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcMetadataSelfTest.java
+++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcMetadataSelfTest.java
@@ -18,9 +18,8 @@
 package org.apache.ignite.jdbc;
 
 import org.apache.ignite.*;
-import org.apache.ignite.cache.*;
 import org.apache.ignite.cache.affinity.*;
-import org.apache.ignite.cache.query.*;
+import org.apache.ignite.cache.query.annotations.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.internal.util.typedef.*;
 import org.apache.ignite.spi.discovery.tcp.*;
@@ -285,15 +284,15 @@ public class JdbcMetadataSelfTest extends GridCommonAbstractTest {
     @SuppressWarnings("UnusedDeclaration")
     private static class Person implements Serializable {
         /** Name. */
-        @CacheQuerySqlField(index = false)
+        @QuerySqlField(index = false)
         private final String name;
 
         /** Age. */
-        @CacheQuerySqlField
+        @QuerySqlField
         private final int age;
 
         /** Organization ID. */
-        @CacheQuerySqlField
+        @QuerySqlField
         private final int orgId;
 
         /**
@@ -318,11 +317,11 @@ public class JdbcMetadataSelfTest extends GridCommonAbstractTest {
     @SuppressWarnings("UnusedDeclaration")
     private static class Organization implements Serializable {
         /** ID. */
-        @CacheQuerySqlField
+        @QuerySqlField
         private final int id;
 
         /** Name. */
-        @CacheQuerySqlField(index = false)
+        @QuerySqlField(index = false)
         private final String name;
 
         /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8be3faa7/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcPreparedStatementSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcPreparedStatementSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcPreparedStatementSelfTest.java
index da68890..47a4122 100644
--- a/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcPreparedStatementSelfTest.java
+++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcPreparedStatementSelfTest.java
@@ -18,7 +18,7 @@
 package org.apache.ignite.jdbc;
 
 import org.apache.ignite.*;
-import org.apache.ignite.cache.query.*;
+import org.apache.ignite.cache.query.annotations.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.spi.discovery.tcp.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
@@ -657,63 +657,63 @@ public class JdbcPreparedStatementSelfTest extends GridCommonAbstractTest {
     @SuppressWarnings("UnusedDeclaration")
     private static class TestObject implements Serializable {
         /** */
-        @CacheQuerySqlField(index = false)
+        @QuerySqlField(index = false)
         private final int id;
 
         /** */
-        @CacheQuerySqlField
+        @QuerySqlField
         private Boolean boolVal;
 
         /** */
-        @CacheQuerySqlField
+        @QuerySqlField
         private Byte byteVal;
 
         /** */
-        @CacheQuerySqlField
+        @QuerySqlField
         private Short shortVal;
 
         /** */
-        @CacheQuerySqlField
+        @QuerySqlField
         private Integer intVal;
 
         /** */
-        @CacheQuerySqlField
+        @QuerySqlField
         private Long longVal;
 
         /** */
-        @CacheQuerySqlField
+        @QuerySqlField
         private Float floatVal;
 
         /** */
-        @CacheQuerySqlField
+        @QuerySqlField
         private Double doubleVal;
 
         /** */
-        @CacheQuerySqlField
+        @QuerySqlField
         private BigDecimal bigVal;
 
         /** */
-        @CacheQuerySqlField
+        @QuerySqlField
         private String strVal;
 
         /** */
-        @CacheQuerySqlField
+        @QuerySqlField
         private byte[] arrVal;
 
         /** */
-        @CacheQuerySqlField
+        @QuerySqlField
         private Date dateVal;
 
         /** */
-        @CacheQuerySqlField
+        @QuerySqlField
         private Time timeVal;
 
         /** */
-        @CacheQuerySqlField
+        @QuerySqlField
         private Timestamp tsVal;
 
         /** */
-        @CacheQuerySqlField
+        @QuerySqlField
         private URL urlVal;
 
         /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8be3faa7/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcResultSetSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcResultSetSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcResultSetSelfTest.java
index 16657da..c5980f6 100644
--- a/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcResultSetSelfTest.java
+++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcResultSetSelfTest.java
@@ -18,8 +18,7 @@
 package org.apache.ignite.jdbc;
 
 import org.apache.ignite.IgniteCache;
-import org.apache.ignite.cache.*;
-import org.apache.ignite.cache.query.*;
+import org.apache.ignite.cache.query.annotations.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
 import org.apache.ignite.spi.discovery.tcp.*;
@@ -529,75 +528,75 @@ public class JdbcResultSetSelfTest extends GridCommonAbstractTest {
     @SuppressWarnings("UnusedDeclaration")
     private static class TestObject implements Serializable {
         /** */
-        @CacheQuerySqlField
+        @QuerySqlField
         private final int id;
 
         /** */
-        @CacheQuerySqlField(index = false)
+        @QuerySqlField(index = false)
         private Boolean boolVal;
 
         /** */
-        @CacheQuerySqlField(index = false)
+        @QuerySqlField(index = false)
         private Byte byteVal;
 
         /** */
-        @CacheQuerySqlField(index = false)
+        @QuerySqlField(index = false)
         private Short shortVal;
 
         /** */
-        @CacheQuerySqlField(index = false)
+        @QuerySqlField(index = false)
         private Integer intVal;
 
         /** */
-        @CacheQuerySqlField(index = false)
+        @QuerySqlField(index = false)
         private Long longVal;
 
         /** */
-        @CacheQuerySqlField(index = false)
+        @QuerySqlField(index = false)
         private Float floatVal;
 
         /** */
-        @CacheQuerySqlField(index = false)
+        @QuerySqlField(index = false)
         private Double doubleVal;
 
         /** */
-        @CacheQuerySqlField(index = false)
+        @QuerySqlField(index = false)
         private BigDecimal bigVal;
 
         /** */
-        @CacheQuerySqlField(index = false)
+        @QuerySqlField(index = false)
         private String strVal;
 
         /** */
-        @CacheQuerySqlField(index = false)
+        @QuerySqlField(index = false)
         private byte[] arrVal;
 
         /** */
-        @CacheQuerySqlField(index = false)
+        @QuerySqlField(index = false)
         private Date dateVal;
 
         /** */
-        @CacheQuerySqlField(index = false)
+        @QuerySqlField(index = false)
         private Time timeVal;
 
         /** */
-        @CacheQuerySqlField(index = false)
+        @QuerySqlField(index = false)
         private Timestamp tsVal;
 
         /** */
-        @CacheQuerySqlField(index = false)
+        @QuerySqlField(index = false)
         private URL urlVal;
 
         /** */
-        @CacheQuerySqlField(index = false)
+        @QuerySqlField(index = false)
         private TestObjectField f1 = new TestObjectField(100, "AAAA");
 
         /** */
-        @CacheQuerySqlField(index = false)
+        @QuerySqlField(index = false)
         private TestObjectField f2 = new TestObjectField(500, "BBBB");
 
         /** */
-        @CacheQuerySqlField(index = false)
+        @QuerySqlField(index = false)
         private TestObjectField f3;
 
         /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8be3faa7/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcStatementSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcStatementSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcStatementSelfTest.java
index 7298616..97ccc69 100644
--- a/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcStatementSelfTest.java
+++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcStatementSelfTest.java
@@ -18,8 +18,7 @@
 package org.apache.ignite.jdbc;
 
 import org.apache.ignite.IgniteCache;
-import org.apache.ignite.cache.*;
-import org.apache.ignite.cache.query.*;
+import org.apache.ignite.cache.query.annotations.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.internal.util.typedef.*;
 import org.apache.ignite.spi.discovery.tcp.*;
@@ -252,19 +251,19 @@ public class JdbcStatementSelfTest extends GridCommonAbstractTest {
     @SuppressWarnings("UnusedDeclaration")
     private static class Person implements Serializable {
         /** ID. */
-        @CacheQuerySqlField
+        @QuerySqlField
         private final int id;
 
         /** First name. */
-        @CacheQuerySqlField(index = false)
+        @QuerySqlField(index = false)
         private final String firstName;
 
         /** Last name. */
-        @CacheQuerySqlField(index = false)
+        @QuerySqlField(index = false)
         private final String lastName;
 
         /** Age. */
-        @CacheQuerySqlField
+        @QuerySqlField
         private final int age;
 
         /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8be3faa7/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQuery.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQuery.java b/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQuery.java
index 628a5f1..efb15a8 100644
--- a/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQuery.java
+++ b/modules/core/src/main/java/org/apache/ignite/cache/query/CacheQuery.java
@@ -17,6 +17,7 @@
 
 package org.apache.ignite.cache.query;
 
+import org.apache.ignite.cache.query.annotations.*;
 import org.apache.ignite.cluster.*;
 import org.apache.ignite.lang.*;
 import org.jetbrains.annotations.*;
@@ -29,13 +30,13 @@ import org.jetbrains.annotations.*;
  * <h1 class="header">SQL Queries</h1>
  * {@code SQL} query allows to execute distributed cache
  * queries using standard SQL syntax. All values participating in where clauses
- * or joins must be annotated with {@link CacheQuerySqlField} annotation. Query can be created
+ * or joins must be annotated with {@link QuerySqlField} annotation. Query can be created
  * with {@link CacheQueries#createSqlQuery(Class, String)} method.
  * <h2 class="header">Field Queries</h2>
  * By default {@code select} clause is ignored as query result contains full objects.
  * If it is needed to select individual fields, use {@link CacheQueries#createSqlFieldsQuery(String)} method.
  * This type of query replaces full objects with individual fields. Note that selected fields
- * must be annotated with {@link CacheQuerySqlField} annotation.
+ * must be annotated with {@link QuerySqlField} annotation.
  * <h2 class="header">Cross-Cache Queries</h2>
  * You are allowed to query data from several caches. Cache that this query was created on is
  * treated as default schema in this case. Other caches can be referenced by their names.
@@ -50,12 +51,12 @@ import org.jetbrains.annotations.*;
  * </pre>
  * <h2 class="header">Custom functions in SQL queries.</h2>
  * It is possible to write custom Java methods and call then form SQL queries. These methods must be public static
- * and annotated with {@link CacheQuerySqlFunction}. Classes containing these methods must be registered in
+ * and annotated with {@link QuerySqlFunction}. Classes containing these methods must be registered in
  * {@link org.apache.ignite.configuration.QueryConfiguration#setIndexCustomFunctionClasses(Class[])}.
  * <h1 class="header">Full Text Queries</h1>
  * Ignite supports full text queries based on Apache Lucene engine. This queries are created by
  * {@link CacheQueries#createFullTextQuery(Class, String)} method. Note that all fields that
- * are expected to show up in text query results must be annotated with {@link CacheQueryTextField}
+ * are expected to show up in text query results must be annotated with {@link QueryTextField}
  * annotation.
  * <h1 class="header">Scan Queries</h1>
  * Sometimes when it is known in advance that SQL query will cause a full data scan, or whenever data set

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8be3faa7/modules/core/src/main/java/org/apache/ignite/cache/query/annotations/QueryGroupIndex.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/query/annotations/QueryGroupIndex.java b/modules/core/src/main/java/org/apache/ignite/cache/query/annotations/QueryGroupIndex.java
new file mode 100644
index 0000000..9c756c4
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/cache/query/annotations/QueryGroupIndex.java
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.cache.query.annotations;
+
+import java.lang.annotation.*;
+
+/**
+ * Describes group index.
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.TYPE)
+public @interface QueryGroupIndex {
+    /**
+     * Group index name.
+     *
+     * @return Name.
+     */
+    String name();
+
+    /**
+     * List of group indexes for type.
+     */
+    @SuppressWarnings("PublicInnerClass")
+    @Retention(RetentionPolicy.RUNTIME)
+    @Target(ElementType.TYPE)
+    public static @interface List {
+        /**
+         * Gets array of group indexes.
+         *
+         * @return Array of group indexes.
+         */
+        QueryGroupIndex[] value();
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8be3faa7/modules/core/src/main/java/org/apache/ignite/cache/query/annotations/QuerySqlField.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/query/annotations/QuerySqlField.java b/modules/core/src/main/java/org/apache/ignite/cache/query/annotations/QuerySqlField.java
new file mode 100644
index 0000000..08575ad
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/cache/query/annotations/QuerySqlField.java
@@ -0,0 +1,125 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.cache.query.annotations;
+
+import org.apache.ignite.cache.query.*;
+
+import java.lang.annotation.*;
+
+/**
+ * Annotates fields for SQL queries. All fields that will be involved in SQL clauses must have
+ * this annotation. For more information about cache queries see {@link CacheQuery} documentation.
+ * @see CacheQuery
+ */
+@Documented
+@Retention(RetentionPolicy.RUNTIME)
+@Target({ElementType.METHOD, ElementType.FIELD})
+public @interface QuerySqlField {
+    /**
+     * Specifies whether cache should maintain an index for this field or not.
+     * Just like with databases, field indexing may require additional overhead
+     * during updates, but makes select operations faster.
+     * <p>
+     * When indexing SPI and indexed field is
+     * of type {@code com.vividsolutions.jts.geom.Geometry} (or any subclass of this class) then Ignite will
+     * consider this index as spatial providing performance boost for spatial queries.
+     *
+     * @return {@code True} if index must be created for this field in database.
+     */
+    boolean index() default false;
+
+    /**
+     * Specifies whether index should be in descending order or not. This property only
+     * makes sense if {@link #index()} property is set to {@code true}.
+     *
+     * @return {@code True} if field index should be in descending order.
+     */
+    boolean descending() default false;
+
+    /**
+     * Array of index groups this field belongs to. Groups are used for compound indexes,
+     * whenever index should be created on more than one field. All fields within the same
+     * group will belong to the same index.
+     * <p>
+     * Group indexes are needed because SQL engine can utilize only one index per table occurrence in a query.
+     * For example if we have two separate indexes on fields {@code a} and {@code b} of type {@code X} then
+     * query {@code select * from X where a = ? and b = ?} will use for filtering either index on field {@code a}
+     * or {@code b} but not both. For more effective query execution here it is preferable to have a single
+     * group index on both fields.
+     * <p>
+     * For more complex scenarios please refer to {@link QuerySqlField.Group} documentation.
+     *
+     * @return Array of group names.
+     */
+    String[] groups() default {};
+
+    /**
+     * Array of ordered index groups this field belongs to. For more information please refer to
+     * {@linkplain QuerySqlField.Group} documentation.
+     *
+     * @return Array of ordered group indexes.
+     * @see #groups()
+     */
+    Group[] orderedGroups() default {};
+
+    /**
+     * Property name. If not provided then field name will be used.
+     *
+     * @return Name of property.
+     */
+    String name() default "";
+
+    /**
+     * Describes group of index and position of field in this group.
+     * <p>
+     * Opposite to {@link #groups()} this annotation gives control over order of fields in a group index.
+     * This can be needed in scenarios when we have a query like
+     * {@code select * from X where a = ? and b = ? order by b desc}. If we have index {@code (a asc, b asc)}
+     * sorting on {@code b} will be performed. Here it is preferable to have index {@code (b desc, a asc)}
+     * which will still allow query to search on index using both fields and avoid sorting because index
+     * is already sorted in needed way.
+     *
+     * @see #groups()
+     * @see #orderedGroups()
+     */
+    @Retention(RetentionPolicy.RUNTIME)
+    @Target({ElementType.METHOD, ElementType.FIELD})
+    @SuppressWarnings("PublicInnerClass")
+    public static @interface Group {
+        /**
+         * Group index name where this field participate.
+         *
+         * @return Group index name
+         */
+        String name();
+
+        /**
+         * Fields in this group index will be sorted on this attribute.
+         *
+         * @return Order number.
+         */
+        int order();
+
+        /**
+         * Defines sorting order for this field in group.
+         *
+         * @return True if field will be in descending order.
+         */
+        boolean descending() default false;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8be3faa7/modules/core/src/main/java/org/apache/ignite/cache/query/annotations/QuerySqlFunction.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/query/annotations/QuerySqlFunction.java b/modules/core/src/main/java/org/apache/ignite/cache/query/annotations/QuerySqlFunction.java
new file mode 100644
index 0000000..86882d3
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/cache/query/annotations/QuerySqlFunction.java
@@ -0,0 +1,67 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.cache.query.annotations;
+
+import java.lang.annotation.*;
+
+/**
+ * Annotates public static methods in classes to be used in SQL queries as custom functions.
+ * Annotated class must be registered in H2 indexing SPI using following method
+ * {@link org.apache.ignite.configuration.QueryConfiguration#setIndexCustomFunctionClasses(Class[])}.
+ * <p>
+ * Example usage:
+ * <pre name="code" class="java">
+ *     public class MyFunctions {
+ *         &#64;CacheQuerySqlFunction
+ *         public static int sqr(int x) {
+ *             return x * x;
+ *         }
+ *     }
+ *
+ *     // Register.
+ *     indexing.setIndexCustomFunctionClasses(MyFunctions.class);
+ *
+ *     // And use in queries.
+ *     cache.queries().createSqlFieldsQuery("select sqr(2) where sqr(1) = 1");
+ * </pre>
+ * <p>
+ * For more information about H2 custom functions please refer to
+ * <a href="http://www.h2database.com/html/features.html#user_defined_functions">H2 documentation</a>.
+ */
+@Documented
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.METHOD)
+public @interface QuerySqlFunction {
+    /**
+     * Specifies alias for the function to be used form SQL queries.
+     * If no alias provided method name will be used.
+     *
+     * @return Alias for function.
+     */
+    String alias() default "";
+
+    /**
+     * Specifies if the function is deterministic (result depends only on input parameters).
+     * <p>
+     * Deterministic function is a function which always returns the same result
+     * assuming that input parameters are the same.
+     *
+     * @return {@code true} If function is deterministic, {@code false} otherwise.
+     */
+    boolean deterministic() default false;
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8be3faa7/modules/core/src/main/java/org/apache/ignite/cache/query/annotations/QueryTextField.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/query/annotations/QueryTextField.java b/modules/core/src/main/java/org/apache/ignite/cache/query/annotations/QueryTextField.java
new file mode 100644
index 0000000..c10141f
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/cache/query/annotations/QueryTextField.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.cache.query.annotations;
+
+import org.apache.ignite.cache.query.*;
+
+import java.lang.annotation.*;
+
+/**
+ * Annotation for fields or getters to be indexed for full text
+ * search using Lucene. For more information
+ * refer to {@link CacheQuery} documentation.
+ * @see CacheQuery
+ */
+@Documented
+@Retention(RetentionPolicy.RUNTIME)
+@Target({ElementType.METHOD, ElementType.FIELD, ElementType.TYPE})
+public @interface QueryTextField {
+    // No-op.
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8be3faa7/modules/core/src/main/java/org/apache/ignite/configuration/QueryConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/configuration/QueryConfiguration.java b/modules/core/src/main/java/org/apache/ignite/configuration/QueryConfiguration.java
index 00cd7bc..98b0f6f 100644
--- a/modules/core/src/main/java/org/apache/ignite/configuration/QueryConfiguration.java
+++ b/modules/core/src/main/java/org/apache/ignite/configuration/QueryConfiguration.java
@@ -17,6 +17,7 @@
 
 package org.apache.ignite.configuration;
 
+import org.apache.ignite.cache.query.annotations.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
 import org.jetbrains.annotations.*;
 
@@ -123,7 +124,7 @@ public class QueryConfiguration {
     }
 
     /**
-     * Sets classes with methods annotated by {@link org.apache.ignite.cache.query.CacheQuerySqlFunction}
+     * Sets classes with methods annotated by {@link QuerySqlFunction}
      * to be used as user-defined functions from SQL queries.
      *
      * @param idxCustomFuncClss List of classes.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8be3faa7/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
index 08d0a5d..60bf730 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
@@ -20,6 +20,7 @@ package org.apache.ignite.internal.processors.query;
 import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
 import org.apache.ignite.cache.query.*;
+import org.apache.ignite.cache.query.annotations.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.processors.*;
@@ -740,28 +741,28 @@ public class GridQueryProcessor extends GridProcessorAdapter {
             throw new IgniteCheckedException("Recursive reference found in type: " + cls.getName());
 
         if (parent == null) { // Check class annotation at top level only.
-            CacheQueryTextField txtAnnCls = cls.getAnnotation(CacheQueryTextField.class);
+            QueryTextField txtAnnCls = cls.getAnnotation(QueryTextField.class);
 
             if (txtAnnCls != null)
                 type.valueTextIndex(true);
 
-            CacheQueryGroupIndex grpIdx = cls.getAnnotation(CacheQueryGroupIndex.class);
+            QueryGroupIndex grpIdx = cls.getAnnotation(QueryGroupIndex.class);
 
             if (grpIdx != null)
                 type.addIndex(grpIdx.name(), SORTED);
 
-            CacheQueryGroupIndex.List grpIdxList = cls.getAnnotation(CacheQueryGroupIndex.List.class);
+            QueryGroupIndex.List grpIdxList = cls.getAnnotation(QueryGroupIndex.List.class);
 
             if (grpIdxList != null && !F.isEmpty(grpIdxList.value())) {
-                for (CacheQueryGroupIndex idx : grpIdxList.value())
+                for (QueryGroupIndex idx : grpIdxList.value())
                     type.addIndex(idx.name(), SORTED);
             }
         }
 
         for (Class<?> c = cls; c != null && !c.equals(Object.class); c = c.getSuperclass()) {
             for (Field field : c.getDeclaredFields()) {
-                CacheQuerySqlField sqlAnn = field.getAnnotation(CacheQuerySqlField.class);
-                CacheQueryTextField txtAnn = field.getAnnotation(CacheQueryTextField.class);
+                QuerySqlField sqlAnn = field.getAnnotation(QuerySqlField.class);
+                QueryTextField txtAnn = field.getAnnotation(QueryTextField.class);
 
                 if (sqlAnn != null || txtAnn != null) {
                     ClassProperty prop = new ClassProperty(field);
@@ -775,8 +776,8 @@ public class GridQueryProcessor extends GridProcessorAdapter {
             }
 
             for (Method mtd : c.getDeclaredMethods()) {
-                CacheQuerySqlField sqlAnn = mtd.getAnnotation(CacheQuerySqlField.class);
-                CacheQueryTextField txtAnn = mtd.getAnnotation(CacheQueryTextField.class);
+                QuerySqlField sqlAnn = mtd.getAnnotation(QuerySqlField.class);
+                QueryTextField txtAnn = mtd.getAnnotation(QueryTextField.class);
 
                 if (sqlAnn != null || txtAnn != null) {
                     if (mtd.getParameterTypes().length != 0)
@@ -806,7 +807,7 @@ public class GridQueryProcessor extends GridProcessorAdapter {
      * @param desc Class description.
      * @throws IgniteCheckedException In case of error.
      */
-    static void processAnnotation(boolean key, CacheQuerySqlField sqlAnn, CacheQueryTextField txtAnn,
+    static void processAnnotation(boolean key, QuerySqlField sqlAnn, QueryTextField txtAnn,
         Class<?> cls, ClassProperty prop, TypeDescriptor desc) throws IgniteCheckedException {
         if (sqlAnn != null) {
             processAnnotationsInClass(key, cls, desc, prop);
@@ -828,7 +829,7 @@ public class GridQueryProcessor extends GridProcessorAdapter {
             }
 
             if (!F.isEmpty(sqlAnn.orderedGroups())) {
-                for (CacheQuerySqlField.Group idx : sqlAnn.orderedGroups())
+                for (QuerySqlField.Group idx : sqlAnn.orderedGroups())
                     desc.addFieldToIndex(idx.name(), prop.name(), idx.order(), idx.descending());
             }
         }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8be3faa7/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentTxMultiNodeTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentTxMultiNodeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentTxMultiNodeTest.java
index 5cfbacf..a9d01fc 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentTxMultiNodeTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentTxMultiNodeTest.java
@@ -22,6 +22,7 @@ import org.apache.ignite.cache.*;
 import org.apache.ignite.cache.affinity.*;
 import org.apache.ignite.cache.eviction.lru.*;
 import org.apache.ignite.cache.query.*;
+import org.apache.ignite.cache.query.annotations.*;
 import org.apache.ignite.cluster.*;
 import org.apache.ignite.compute.*;
 import org.apache.ignite.configuration.*;
@@ -734,21 +735,21 @@ public class GridCacheConcurrentTxMultiNodeTest extends GridCommonAbstractTest {
     /**
      *
      */
-    @CacheQueryGroupIndex(name = "msg_tx")
+    @QueryGroupIndex(name = "msg_tx")
     @SuppressWarnings({"UnusedDeclaration"})
     private static class Request implements Serializable {
         /** */
-        @CacheQuerySqlField
+        @QuerySqlField
         private Long id;
 
         /** */
-        @CacheQuerySqlField(name = "messageId")
-        @CacheQuerySqlField.Group(name = "msg_tx", order = 3)
+        @QuerySqlField(name = "messageId")
+        @QuerySqlField.Group(name = "msg_tx", order = 3)
         private long msgId;
 
         /** */
-        @CacheQuerySqlField(name = "transactionId")
-        @CacheQuerySqlField.Group(name = "msg_tx", order = 1)
+        @QuerySqlField(name = "transactionId")
+        @QuerySqlField.Group(name = "msg_tx", order = 1)
         private long txId;
 
         /**
@@ -779,15 +780,15 @@ public class GridCacheConcurrentTxMultiNodeTest extends GridCommonAbstractTest {
     @SuppressWarnings({"UnusedDeclaration"})
     private static class Response implements Serializable {
         /** */
-        @CacheQuerySqlField
+        @QuerySqlField
         private Long id;
 
         /** */
-        @CacheQuerySqlField(name = "messageId")
+        @QuerySqlField(name = "messageId")
         private long msgId;
 
         /** */
-        @CacheQuerySqlField(name = "transactionId")
+        @QuerySqlField(name = "transactionId")
         private long txId;
 
         /**
@@ -810,7 +811,7 @@ public class GridCacheConcurrentTxMultiNodeTest extends GridCommonAbstractTest {
      */
     private static class Session implements Serializable {
         /** */
-        @CacheQuerySqlField
+        @QuerySqlField
         private String terminalId;
 
         /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8be3faa7/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheFullTextQueryMultithreadedSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheFullTextQueryMultithreadedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheFullTextQueryMultithreadedSelfTest.java
index 6d49795..c6be0a4 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheFullTextQueryMultithreadedSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheFullTextQueryMultithreadedSelfTest.java
@@ -19,6 +19,7 @@ package org.apache.ignite.internal.processors.cache;
 
 import org.apache.ignite.cache.*;
 import org.apache.ignite.cache.query.*;
+import org.apache.ignite.cache.query.annotations.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.util.typedef.*;
@@ -132,7 +133,7 @@ public class GridCacheFullTextQueryMultithreadedSelfTest extends GridCacheAbstra
      */
     private static class H2TextValue {
         /** */
-        @CacheQueryTextField
+        @QueryTextField
         private final String val;
 
         /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8be3faa7/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheLuceneQueryIndexTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheLuceneQueryIndexTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheLuceneQueryIndexTest.java
index 8831cd7..6654eeb 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheLuceneQueryIndexTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheLuceneQueryIndexTest.java
@@ -19,7 +19,7 @@ package org.apache.ignite.internal.processors.cache;
 
 import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
-import org.apache.ignite.cache.query.*;
+import org.apache.ignite.cache.query.annotations.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.util.typedef.*;
@@ -376,7 +376,7 @@ public class GridCacheLuceneQueryIndexTest extends GridCommonAbstractTest {
      */
     private static class ObjectValue implements Serializable {
         /** String value. */
-        @CacheQueryTextField
+        @QueryTextField
         private String strVal;
 
         /**
@@ -422,7 +422,7 @@ public class GridCacheLuceneQueryIndexTest extends GridCommonAbstractTest {
      */
     private static class ObjectKey implements Serializable {
         /** String key. */
-        @CacheQueryTextField
+        @QueryTextField
         private String strKey;
 
         /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8be3faa7/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapSelfTest.java
index 99d7578..78cfc8c 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapSelfTest.java
@@ -19,7 +19,7 @@ package org.apache.ignite.internal.processors.cache;
 
 import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
-import org.apache.ignite.cache.query.*;
+import org.apache.ignite.cache.query.annotations.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.events.*;
 import org.apache.ignite.internal.*;
@@ -580,7 +580,7 @@ public class GridCacheOffHeapSelfTest extends GridCommonAbstractTest {
      */
     private static class CacheValue {
         /** Value. */
-        @CacheQuerySqlField
+        @QuerySqlField
         private final int val;
 
         /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8be3faa7/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryEmbeddedValue.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryEmbeddedValue.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryEmbeddedValue.java
index 18e8e3d..b62bb7c 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryEmbeddedValue.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryEmbeddedValue.java
@@ -17,7 +17,7 @@
 
 package org.apache.ignite.internal.processors.cache;
 
-import org.apache.ignite.cache.query.*;
+import org.apache.ignite.cache.query.annotations.*;
 
 import java.io.*;
 
@@ -27,15 +27,15 @@ import java.io.*;
 @SuppressWarnings("unused")
 public class GridCacheQueryEmbeddedValue implements Serializable {
     /** Query embedded field. */
-    @CacheQuerySqlField
+    @QuerySqlField
     private int embeddedField1 = 55;
 
     /** Query embedded field. */
-    @CacheQuerySqlField(groups = {"grp1"})
+    @QuerySqlField(groups = {"grp1"})
     private int embeddedField2 = 11;
 
     /** */
-    @CacheQuerySqlField
+    @QuerySqlField
     private Val embeddedField3 = new Val();
 
     /**
@@ -43,7 +43,7 @@ public class GridCacheQueryEmbeddedValue implements Serializable {
     @SuppressWarnings("PublicInnerClass")
     public static class Val implements Serializable {
         /** */
-        @CacheQuerySqlField
+        @QuerySqlField
         private Long x = 3L;
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8be3faa7/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryIndexSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryIndexSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryIndexSelfTest.java
index dcd2acf..f119474 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryIndexSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryIndexSelfTest.java
@@ -19,6 +19,7 @@ package org.apache.ignite.internal.processors.cache;
 
 import org.apache.ignite.cache.*;
 import org.apache.ignite.cache.query.*;
+import org.apache.ignite.cache.query.annotations.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
 
 import java.util.*;
@@ -105,7 +106,7 @@ public class GridCacheQueryIndexSelfTest extends GridCacheAbstractSelfTest {
      * Test cache value.
      */
     private static class CacheValue {
-        @CacheQuerySqlField
+        @QuerySqlField
         private final int val;
 
         CacheValue(int val) {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8be3faa7/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTestValue.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTestValue.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTestValue.java
index 4aecbd1..718a6b4 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTestValue.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTestValue.java
@@ -17,7 +17,7 @@
 
 package org.apache.ignite.internal.processors.cache;
 
-import org.apache.ignite.cache.query.*;
+import org.apache.ignite.cache.query.annotations.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
 
 import java.io.*;
@@ -27,7 +27,7 @@ import java.io.*;
  */
 public class GridCacheTestValue implements Serializable, Cloneable {
     /** */
-    @CacheQuerySqlField
+    @QuerySqlField
     private String val;
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8be3faa7/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTestValue2.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTestValue2.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTestValue2.java
index 8e1b5f3..c1b1acb 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTestValue2.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTestValue2.java
@@ -17,7 +17,7 @@
 
 package org.apache.ignite.internal.processors.cache;
 
-import org.apache.ignite.cache.query.*;
+import org.apache.ignite.cache.query.annotations.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
 
 import java.io.*;
@@ -27,7 +27,7 @@ import java.io.*;
  */
 public class GridCacheTestValue2 implements Serializable {
     /** */
-    @CacheQuerySqlField
+    @QuerySqlField
     private String val;
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8be3faa7/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedQueryMultiThreadedSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedQueryMultiThreadedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedQueryMultiThreadedSelfTest.java
index b76e0f2..8cc1598 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedQueryMultiThreadedSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedQueryMultiThreadedSelfTest.java
@@ -20,6 +20,7 @@ package org.apache.ignite.internal.processors.cache.distributed.near;
 import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
 import org.apache.ignite.cache.query.*;
+import org.apache.ignite.cache.query.annotations.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.util.tostring.*;
@@ -210,16 +211,16 @@ public class GridCachePartitionedQueryMultiThreadedSelfTest extends GridCommonAb
         private UUID id = UUID.randomUUID();
 
         /** */
-        @CacheQuerySqlField
+        @QuerySqlField
         private String name;
 
         /** */
-        @CacheQuerySqlField
+        @QuerySqlField
         private int salary;
 
         /** */
-        @CacheQuerySqlField
-        @CacheQueryTextField
+        @QuerySqlField
+        @QueryTextField
         private String degree;
 
         /** Required by {@link Externalizable}. */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8be3faa7/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/reducefields/GridCacheAbstractReduceFieldsQuerySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/reducefields/GridCacheAbstractReduceFieldsQuerySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/reducefields/GridCacheAbstractReduceFieldsQuerySelfTest.java
index 40e1bd5..b4a1521 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/reducefields/GridCacheAbstractReduceFieldsQuerySelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/reducefields/GridCacheAbstractReduceFieldsQuerySelfTest.java
@@ -20,6 +20,7 @@ package org.apache.ignite.internal.processors.cache.query.reducefields;
 import org.apache.ignite.cache.*;
 import org.apache.ignite.cache.affinity.*;
 import org.apache.ignite.cache.query.*;
+import org.apache.ignite.cache.query.annotations.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.internal.util.typedef.*;
 import org.apache.ignite.lang.*;
@@ -279,15 +280,15 @@ public abstract class GridCacheAbstractReduceFieldsQuerySelfTest extends GridCom
     @SuppressWarnings("UnusedDeclaration")
     private static class Person implements Serializable {
         /** Name. */
-        @CacheQuerySqlField(index = false)
+        @QuerySqlField(index = false)
         private final String name;
 
         /** Age. */
-        @CacheQuerySqlField(index = true)
+        @QuerySqlField(index = true)
         private final int age;
 
         /** Organization ID. */
-        @CacheQuerySqlField(index = true)
+        @QuerySqlField(index = true)
         private final int orgId;
 
         /**
@@ -336,11 +337,11 @@ public abstract class GridCacheAbstractReduceFieldsQuerySelfTest extends GridCom
     @SuppressWarnings("UnusedDeclaration")
     private static class Organization implements Serializable {
         /** ID. */
-        @CacheQuerySqlField
+        @QuerySqlField
         private final int id;
 
         /** Name. */
-        @CacheQuerySqlField(index = false)
+        @QuerySqlField(index = false)
         private final String name;
 
         /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8be3faa7/modules/core/src/test/java/org/apache/ignite/loadtests/mapper/TestObject.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/loadtests/mapper/TestObject.java b/modules/core/src/test/java/org/apache/ignite/loadtests/mapper/TestObject.java
index d30f296..eccb61d 100644
--- a/modules/core/src/test/java/org/apache/ignite/loadtests/mapper/TestObject.java
+++ b/modules/core/src/test/java/org/apache/ignite/loadtests/mapper/TestObject.java
@@ -17,7 +17,7 @@
 
 package org.apache.ignite.loadtests.mapper;
 
-import org.apache.ignite.cache.query.*;
+import org.apache.ignite.cache.query.annotations.*;
 
 import java.io.*;
 
@@ -26,11 +26,11 @@ import java.io.*;
  */
 public class TestObject implements Serializable {
     /** ID. */
-    @CacheQuerySqlField
+    @QuerySqlField
     private int id;
 
     /** Text. */
-    @CacheQuerySqlField
+    @QuerySqlField
     private String txt;
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8be3faa7/modules/geospatial/src/test/java/org/apache/ignite/internal/processors/query/h2/GridH2IndexingGeoSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/geospatial/src/test/java/org/apache/ignite/internal/processors/query/h2/GridH2IndexingGeoSelfTest.java b/modules/geospatial/src/test/java/org/apache/ignite/internal/processors/query/h2/GridH2IndexingGeoSelfTest.java
index 71705d9..b76c6d7 100644
--- a/modules/geospatial/src/test/java/org/apache/ignite/internal/processors/query/h2/GridH2IndexingGeoSelfTest.java
+++ b/modules/geospatial/src/test/java/org/apache/ignite/internal/processors/query/h2/GridH2IndexingGeoSelfTest.java
@@ -21,6 +21,7 @@ import com.vividsolutions.jts.geom.*;
 import com.vividsolutions.jts.io.*;
 import org.apache.ignite.cache.*;
 import org.apache.ignite.cache.query.*;
+import org.apache.ignite.cache.query.annotations.*;
 import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.processors.cache.*;
 import org.apache.ignite.internal.util.typedef.*;
@@ -229,11 +230,11 @@ public class GridH2IndexingGeoSelfTest extends GridCacheAbstractSelfTest {
      */
     private static class EnemyCamp implements Serializable {
         /** */
-        @CacheQuerySqlField(index = true)
+        @QuerySqlField(index = true)
         private Geometry coords;
 
         /** */
-        @CacheQuerySqlField
+        @QuerySqlField
         private String name;
 
         /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8be3faa7/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
index 47c7a79..7c9da55 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
@@ -20,6 +20,7 @@ package org.apache.ignite.internal.processors.query.h2;
 import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
 import org.apache.ignite.cache.query.*;
+import org.apache.ignite.cache.query.annotations.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.processors.cache.*;
@@ -1245,7 +1246,7 @@ public class IgniteH2Indexing implements GridQueryIndexing {
 
         for (Class<?> cls : idxCustomFuncClss) {
             for (Method m : cls.getDeclaredMethods()) {
-                CacheQuerySqlFunction ann = m.getAnnotation(CacheQuerySqlFunction.class);
+                QuerySqlFunction ann = m.getAnnotation(QuerySqlFunction.class);
 
                 if (ann != null) {
                     int modifiers = m.getModifiers();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8be3faa7/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFieldsQuerySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFieldsQuerySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFieldsQuerySelfTest.java
index 5a973bb..c769520 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFieldsQuerySelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFieldsQuerySelfTest.java
@@ -21,6 +21,7 @@ import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
 import org.apache.ignite.cache.affinity.*;
 import org.apache.ignite.cache.query.*;
+import org.apache.ignite.cache.query.annotations.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.internal.processors.cache.query.*;
 import org.apache.ignite.internal.processors.datastructures.*;
@@ -1173,7 +1174,7 @@ public abstract class GridCacheAbstractFieldsQuerySelfTest extends GridCommonAbs
     @SuppressWarnings("UnusedDeclaration")
     private static class PersonKey implements Serializable {
         /** ID. */
-        @CacheQuerySqlField
+        @QuerySqlField
         private final UUID id;
 
         /** @param id ID. */
@@ -1209,15 +1210,15 @@ public abstract class GridCacheAbstractFieldsQuerySelfTest extends GridCommonAbs
     @SuppressWarnings("UnusedDeclaration")
     private static class Person implements Serializable {
         /** Name. */
-        @CacheQuerySqlField(index = false)
+        @QuerySqlField(index = false)
         private final String name;
 
         /** Age. */
-        @CacheQuerySqlField(index = true)
+        @QuerySqlField(index = true)
         private final int age;
 
         /** Organization ID. */
-        @CacheQuerySqlField(index = true)
+        @QuerySqlField(index = true)
         private final int orgId;
 
         /**
@@ -1266,11 +1267,11 @@ public abstract class GridCacheAbstractFieldsQuerySelfTest extends GridCommonAbs
     @SuppressWarnings("UnusedDeclaration")
     private static class Organization implements Serializable {
         /** ID. */
-        @CacheQuerySqlField
+        @QuerySqlField
         private final int id;
 
         /** Name. */
-        @CacheQuerySqlField(index = false)
+        @QuerySqlField(index = false)
         private final String name;
 
         /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8be3faa7/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractQuerySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractQuerySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractQuerySelfTest.java
index 0fe2fe8..abd3594 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractQuerySelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractQuerySelfTest.java
@@ -20,6 +20,7 @@ package org.apache.ignite.internal.processors.cache;
 import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
 import org.apache.ignite.cache.query.*;
+import org.apache.ignite.cache.query.annotations.*;
 import org.apache.ignite.cache.store.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.events.*;
@@ -372,7 +373,7 @@ public abstract class GridCacheAbstractQuerySelfTest extends GridCommonAbstractT
      */
     private static class Key {
         /** */
-        @CacheQuerySqlField
+        @QuerySqlField
         private final long id;
 
         /**
@@ -1151,7 +1152,7 @@ public abstract class GridCacheAbstractQuerySelfTest extends GridCommonAbstractT
         GridCache<Integer, Object> cache = ignite.cache(null);
 
         Object val = new Object() {
-            @CacheQuerySqlField
+            @QuerySqlField
             private int field1 = 10;
 
             @Override public String toString() {
@@ -1700,7 +1701,7 @@ public abstract class GridCacheAbstractQuerySelfTest extends GridCommonAbstractT
      */
     private static class ArrayObject implements Serializable {
         /** */
-        @CacheQuerySqlField
+        @QuerySqlField
         private Long[] arr;
 
         /**
@@ -1717,20 +1718,20 @@ public abstract class GridCacheAbstractQuerySelfTest extends GridCommonAbstractT
     public static class Person implements Externalizable {
         /** */
         @GridToStringExclude
-        @CacheQuerySqlField
+        @QuerySqlField
         private UUID id = UUID.randomUUID();
 
         /** */
-        @CacheQuerySqlField
-        @CacheQueryTextField
+        @QuerySqlField
+        @QueryTextField
         private String name;
 
         /** */
-        @CacheQuerySqlField
+        @QuerySqlField
         private int salary;
 
         /** */
-        @CacheQuerySqlField(index = true)
+        @QuerySqlField(index = true)
         private int fake$Field;
 
         /**
@@ -1817,11 +1818,11 @@ public abstract class GridCacheAbstractQuerySelfTest extends GridCommonAbstractT
     @SuppressWarnings("PublicInnerClass")
     public static class ObjectValue implements Serializable {
         /** String value. */
-        @CacheQueryTextField
+        @QueryTextField
         private String strVal;
 
         /** Integer value. */
-        @CacheQuerySqlField
+        @QuerySqlField
         private int intVal;
 
         /**
@@ -1881,7 +1882,7 @@ public abstract class GridCacheAbstractQuerySelfTest extends GridCommonAbstractT
      */
     private static class ObjectValueOther {
         /** Value. */
-        @CacheQueryTextField
+        @QueryTextField
         private String val;
 
         /**
@@ -1964,7 +1965,7 @@ public abstract class GridCacheAbstractQuerySelfTest extends GridCommonAbstractT
      */
     private static class BadHashKeyObject implements Serializable {
         /** */
-        @CacheQuerySqlField(index = false)
+        @QuerySqlField(index = false)
         private final String str;
 
         /**
@@ -2032,7 +2033,7 @@ public abstract class GridCacheAbstractQuerySelfTest extends GridCommonAbstractT
          * @param x Argument.
          * @return Square of given value.
          */
-        @CacheQuerySqlFunction
+        @QuerySqlFunction
         public static int square(int x) {
             return x * x;
         }
@@ -2041,7 +2042,7 @@ public abstract class GridCacheAbstractQuerySelfTest extends GridCommonAbstractT
          * @param x Argument.
          * @return Cube of given value.
          */
-        @CacheQuerySqlFunction(alias = "_cube_")
+        @QuerySqlFunction(alias = "_cube_")
         public static int cube(int x) {
             return x * x * x;
         }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8be3faa7/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheCrossCacheQuerySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheCrossCacheQuerySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheCrossCacheQuerySelfTest.java
index 3b33321..d664436 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheCrossCacheQuerySelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheCrossCacheQuerySelfTest.java
@@ -20,6 +20,7 @@ package org.apache.ignite.internal.processors.cache;
 import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
 import org.apache.ignite.cache.query.*;
+import org.apache.ignite.cache.query.annotations.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.internal.processors.cache.query.*;
 import org.apache.ignite.internal.util.typedef.*;
@@ -292,11 +293,11 @@ public class GridCacheCrossCacheQuerySelfTest extends GridCommonAbstractTest {
      */
     private static class DimProduct {
         /** Primary key. */
-        @CacheQuerySqlField
+        @QuerySqlField
         private int id;
 
         /** Product name. */
-        @CacheQuerySqlField
+        @QuerySqlField
         private String name;
 
         /**
@@ -335,11 +336,11 @@ public class GridCacheCrossCacheQuerySelfTest extends GridCommonAbstractTest {
      */
     private static class DimStore {
         /** Primary key. */
-        @CacheQuerySqlField
+        @QuerySqlField
         private int id;
 
         /** Store name. */
-        @CacheQuerySqlField
+        @QuerySqlField
         private String name;
 
         /**
@@ -378,18 +379,18 @@ public class GridCacheCrossCacheQuerySelfTest extends GridCommonAbstractTest {
      */
     private static class FactPurchase {
         /** Primary key. */
-        @CacheQuerySqlField
+        @QuerySqlField
         private int id;
 
         /** Foreign key to store at which purchase occurred. */
-        @CacheQuerySqlField
+        @QuerySqlField
         private int storeId;
 
         /** Foreign key to purchased product. */
-        @CacheQuerySqlField
+        @QuerySqlField
         private int productId;
 
-        @CacheQuerySqlField
+        @QuerySqlField
         private int price;
 
         /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8be3faa7/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryLoadSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryLoadSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryLoadSelfTest.java
index 9089fe0..820ab78 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryLoadSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryLoadSelfTest.java
@@ -19,7 +19,7 @@ package org.apache.ignite.internal.processors.cache;
 
 import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
-import org.apache.ignite.cache.query.*;
+import org.apache.ignite.cache.query.annotations.*;
 import org.apache.ignite.cache.store.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.internal.*;
@@ -428,7 +428,7 @@ public class GridCacheQueryLoadSelfTest extends GridCommonAbstractTest {
      */
     private static class ValueObject {
         /** Value. */
-        @CacheQuerySqlField
+        @QuerySqlField
         private final int val;
 
         /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8be3faa7/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryMultiThreadedSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryMultiThreadedSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryMultiThreadedSelfTest.java
index aefb354..6cb62e3 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryMultiThreadedSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryMultiThreadedSelfTest.java
@@ -21,6 +21,7 @@ import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
 import org.apache.ignite.cache.eviction.lru.*;
 import org.apache.ignite.cache.query.*;
+import org.apache.ignite.cache.query.annotations.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.processors.cache.query.*;
@@ -849,7 +850,7 @@ public class GridCacheQueryMultiThreadedSelfTest extends GridCommonAbstractTest
      */
     private static class TestValue implements Serializable {
         /** Value. */
-        @CacheQuerySqlField
+        @QuerySqlField
         private int val;
 
         /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8be3faa7/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryTestValue.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryTestValue.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryTestValue.java
index d47d838..a52864f 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryTestValue.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryTestValue.java
@@ -17,7 +17,7 @@
 
 package org.apache.ignite.internal.processors.cache;
 
-import org.apache.ignite.cache.query.*;
+import org.apache.ignite.cache.query.annotations.*;
 
 import java.io.*;
 
@@ -27,29 +27,29 @@ import java.io.*;
 @SuppressWarnings("unused")
 public class GridCacheQueryTestValue implements Serializable {
     /** */
-    @CacheQueryTextField
-    @CacheQuerySqlField(name = "fieldname")
+    @QueryTextField
+    @QuerySqlField(name = "fieldname")
     private String field1;
 
     /** */
     private int field2;
 
     /** */
-    @CacheQuerySqlField
+    @QuerySqlField
     private long field3;
 
     /** */
-    @CacheQuerySqlField(orderedGroups = {
-        @CacheQuerySqlField.Group(name = "grp1", order = 1),
-        @CacheQuerySqlField.Group(name = "grp2", order = 2)})
+    @QuerySqlField(orderedGroups = {
+        @QuerySqlField.Group(name = "grp1", order = 1),
+        @QuerySqlField.Group(name = "grp2", order = 2)})
     private long field4;
 
     /** */
-    @CacheQuerySqlField(orderedGroups = {@CacheQuerySqlField.Group(name = "grp1", order = 2)})
+    @QuerySqlField(orderedGroups = {@QuerySqlField.Group(name = "grp1", order = 2)})
     private long field5;
 
     /** */
-    @CacheQuerySqlField(orderedGroups = {@CacheQuerySqlField.Group(name = "grp1", order = 3)})
+    @QuerySqlField(orderedGroups = {@QuerySqlField.Group(name = "grp1", order = 3)})
     private GridCacheQueryEmbeddedValue field6 = new GridCacheQueryEmbeddedValue();
 
     /**
@@ -72,7 +72,7 @@ public class GridCacheQueryTestValue implements Serializable {
      *
      * @return Field.
      */
-    @CacheQuerySqlField
+    @QuerySqlField
     public int getField2() {
         return field2;
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8be3faa7/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSqlQueryMultiThreadedSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSqlQueryMultiThreadedSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSqlQueryMultiThreadedSelfTest.java
index 4681028..c39ea7b 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSqlQueryMultiThreadedSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSqlQueryMultiThreadedSelfTest.java
@@ -19,6 +19,7 @@ package org.apache.ignite.internal.processors.cache;
 
 import org.apache.ignite.cache.*;
 import org.apache.ignite.cache.query.*;
+import org.apache.ignite.cache.query.annotations.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.spi.discovery.tcp.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
@@ -120,7 +121,7 @@ public class GridCacheSqlQueryMultiThreadedSelfTest extends GridCommonAbstractTe
      */
     private static class Person implements Serializable {
         /** */
-        @CacheQuerySqlField
+        @QuerySqlField
         private int age;
 
         /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8be3faa7/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapSelfTest.java
index 3a3578f..9b8ce8e 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapSelfTest.java
@@ -19,7 +19,7 @@ package org.apache.ignite.internal.processors.cache;
 
 import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
-import org.apache.ignite.cache.query.*;
+import org.apache.ignite.cache.query.annotations.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.events.*;
 import org.apache.ignite.internal.util.typedef.*;
@@ -652,7 +652,7 @@ public class GridCacheSwapSelfTest extends GridCommonAbstractTest {
      */
     private static class CacheValue {
         /** Value. */
-        @CacheQuerySqlField
+        @QuerySqlField
         private final int val;
 
         /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8be3faa7/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedQuerySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedQuerySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedQuerySelfTest.java
index cd10674..527ca19 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedQuerySelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedQuerySelfTest.java
@@ -20,6 +20,7 @@ package org.apache.ignite.internal.processors.cache.distributed.replicated;
 import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
 import org.apache.ignite.cache.query.*;
+import org.apache.ignite.cache.query.annotations.*;
 import org.apache.ignite.cluster.*;
 import org.apache.ignite.events.*;
 import org.apache.ignite.internal.*;
@@ -613,7 +614,7 @@ public class GridCacheReplicatedQuerySelfTest extends GridCacheAbstractQuerySelf
      */
     private static class CacheValue implements Externalizable {
         /** Value. */
-        @CacheQuerySqlField
+        @QuerySqlField
         private String val;
 
         /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8be3faa7/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridH2IndexRebuildTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridH2IndexRebuildTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridH2IndexRebuildTest.java
index baf7ae7..27d49fc 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridH2IndexRebuildTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridH2IndexRebuildTest.java
@@ -19,6 +19,7 @@ package org.apache.ignite.internal.processors.query.h2;
 
 import org.apache.ignite.cache.*;
 import org.apache.ignite.cache.query.*;
+import org.apache.ignite.cache.query.annotations.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.processors.cache.*;
@@ -91,19 +92,19 @@ public class GridH2IndexRebuildTest extends GridCacheAbstractSelfTest {
     @SuppressWarnings("UnusedDeclaration")
     private static class TestValue1 {
         /** */
-        @CacheQuerySqlField(index = true)
+        @QuerySqlField(index = true)
         private long val1;
 
         /** */
-        @CacheQuerySqlField(index = true)
+        @QuerySqlField(index = true)
         private String val2;
 
         /** */
-        @CacheQuerySqlField(groups = "group1")
+        @QuerySqlField(groups = "group1")
         private int val3;
 
         /** */
-        @CacheQuerySqlField(groups = "group1")
+        @QuerySqlField(groups = "group1")
         private int val4;
 
         /**
@@ -122,11 +123,11 @@ public class GridH2IndexRebuildTest extends GridCacheAbstractSelfTest {
     @SuppressWarnings("UnusedDeclaration")
     private static class TestValue2 {
         /** */
-        @CacheQuerySqlField(index = true)
+        @QuerySqlField(index = true)
         private long val1;
 
         /** */
-        @CacheQueryTextField
+        @QueryTextField
         private String val2;
 
         /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8be3faa7/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/GridQueryParsingTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/GridQueryParsingTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/GridQueryParsingTest.java
index 8fc63ed..af1b105 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/GridQueryParsingTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/GridQueryParsingTest.java
@@ -20,6 +20,7 @@ package org.apache.ignite.internal.processors.query.h2.sql;
 import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
 import org.apache.ignite.cache.query.*;
+import org.apache.ignite.cache.query.annotations.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.processors.query.*;
@@ -265,19 +266,19 @@ public class GridQueryParsingTest extends GridCommonAbstractTest {
      *
      */
     public static class Person implements Serializable {
-        @CacheQuerySqlField(index = true)
+        @QuerySqlField(index = true)
         public Date date = new Date();
 
-        @CacheQuerySqlField(index = true)
+        @QuerySqlField(index = true)
         public String name = "Ivan";
 
-        @CacheQuerySqlField(index = true)
+        @QuerySqlField(index = true)
         public String parentName;
 
-        @CacheQuerySqlField(index = true)
+        @QuerySqlField(index = true)
         public int addrId;
 
-        @CacheQuerySqlField(index = true)
+        @QuerySqlField(index = true)
         public int old;
     }
 
@@ -285,13 +286,13 @@ public class GridQueryParsingTest extends GridCommonAbstractTest {
      *
      */
     public static class Address implements Serializable {
-        @CacheQuerySqlField(index = true)
+        @QuerySqlField(index = true)
         public int id;
 
-        @CacheQuerySqlField(index = true)
+        @QuerySqlField(index = true)
         public int streetNumber;
 
-        @CacheQuerySqlField(index = true)
+        @QuerySqlField(index = true)
         public String street = "Nevskiy";
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8be3faa7/modules/indexing/src/test/java/org/apache/ignite/loadtests/h2indexing/GridTestEntity.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/loadtests/h2indexing/GridTestEntity.java b/modules/indexing/src/test/java/org/apache/ignite/loadtests/h2indexing/GridTestEntity.java
index 39069f1..c1802c8 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/loadtests/h2indexing/GridTestEntity.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/loadtests/h2indexing/GridTestEntity.java
@@ -17,7 +17,7 @@
 
 package org.apache.ignite.loadtests.h2indexing;
 
-import org.apache.ignite.cache.query.*;
+import org.apache.ignite.cache.query.annotations.*;
 
 import java.util.*;
 
@@ -26,11 +26,11 @@ import java.util.*;
  */
 public class GridTestEntity {
     /** */
-    @CacheQuerySqlField(index = true)
+    @QuerySqlField(index = true)
     private final String name;
 
     /** */
-    @CacheQuerySqlField(index = false)
+    @QuerySqlField(index = false)
     private final Date date;
 
     /**


Mime
View raw message