ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From se...@apache.org
Subject [12/15] incubator-ignite git commit: ignite-sql-tests - renaming
Date Mon, 09 Feb 2015 00:02:11 GMT
ignite-sql-tests - renaming


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

Branch: refs/heads/ignite-sql-tests
Commit: c4ed31f0773811dff87c4c219df06f1ba6226865
Parents: 2a799c9
Author: S.Vladykin <svladykin@gridgain.com>
Authored: Mon Feb 9 01:51:09 2015 +0300
Committer: S.Vladykin <svladykin@gridgain.com>
Committed: Mon Feb 9 01:51:09 2015 +0300

----------------------------------------------------------------------
 .../java/org/apache/ignite/IgniteCache.java     |  16 +--
 .../org/apache/ignite/cache/query/Query.java    |  22 +--
 .../apache/ignite/cache/query/QueryScan.java    |  73 ----------
 .../org/apache/ignite/cache/query/QuerySpi.java |  61 --------
 .../org/apache/ignite/cache/query/QuerySql.java | 139 -------------------
 .../apache/ignite/cache/query/QueryText.java    | 116 ----------------
 .../apache/ignite/cache/query/ScanQuery.java    |  73 ++++++++++
 .../org/apache/ignite/cache/query/SpiQuery.java |  61 ++++++++
 .../org/apache/ignite/cache/query/SqlQuery.java | 139 +++++++++++++++++++
 .../apache/ignite/cache/query/TextQuery.java    | 116 ++++++++++++++++
 .../processors/cache/IgniteCacheProxy.java      |  20 +--
 .../IgniteCacheFieldsQueryNoDataSelfTest.java   |   2 +-
 .../cache/IgniteCacheQueryIndexSelfTest.java    |   2 +-
 .../cache/IgniteCacheAbstractQuerySelfTest.java |  22 +--
 .../cache/IgniteCacheQueryLoadSelfTest.java     |   8 +-
 .../IgniteCacheQueryMultiThreadedSelfTest.java  |  26 ++--
 ...gniteCacheSqlQueryMultiThreadedSelfTest.java |   2 +-
 .../IgniteCacheQueryNodeRestartSelfTest.java    |   2 +-
 .../IgniteCacheReplicatedQuerySelfTest.java     |  16 +--
 .../local/IgniteCacheLocalQuerySelfTest.java    |   4 +-
 20 files changed, 462 insertions(+), 458 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c4ed31f0/modules/core/src/main/java/org/apache/ignite/IgniteCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/IgniteCache.java b/modules/core/src/main/java/org/apache/ignite/IgniteCache.java
index fa0d7aa..75fb3c3 100644
--- a/modules/core/src/main/java/org/apache/ignite/IgniteCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/IgniteCache.java
@@ -199,10 +199,10 @@ public interface IgniteCache<K, V> extends javax.cache.Cache<K, V>, IgniteAsyncS
      *
      * @param qry Query.
      * @return Cursor.
-     * @see QueryScan
-     * @see QuerySql
-     * @see QueryText
-     * @see QuerySpi
+     * @see ScanQuery
+     * @see SqlQuery
+     * @see TextQuery
+     * @see SpiQuery
      */
     public QueryCursor<Entry<K, V>> query(Query qry);
 
@@ -219,10 +219,10 @@ public interface IgniteCache<K, V> extends javax.cache.Cache<K, V>, IgniteAsyncS
      *
      * @param qry Query.
      * @return Cursor.
-     * @see QueryScan
-     * @see QuerySql
-     * @see QueryText
-     * @see QuerySpi
+     * @see ScanQuery
+     * @see SqlQuery
+     * @see TextQuery
+     * @see SpiQuery
      */
     public QueryCursor<Entry<K, V>> localQuery(Query qry);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c4ed31f0/modules/core/src/main/java/org/apache/ignite/cache/query/Query.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/query/Query.java b/modules/core/src/main/java/org/apache/ignite/cache/query/Query.java
index 0cdefa2..cce59e4 100644
--- a/modules/core/src/main/java/org/apache/ignite/cache/query/Query.java
+++ b/modules/core/src/main/java/org/apache/ignite/cache/query/Query.java
@@ -27,8 +27,12 @@ import java.io.*;
 
 /**
  * Base class for all Ignite cache queries.
- * Use {@link QuerySql} and {@link QueryText} for SQL and
+ * Use {@link SqlQuery} and {@link TextQuery} for SQL and
  * text queries accordingly.
+ * <p>
+ * Also contains convenience shortcuts for query object construction:
+ * {@link #sql(Class, String)}, {@link #sql(String)}, {@link #text(Class, String)},
+ * {@link #scan(IgniteBiPredicate)} and {@link #spi()}.
  *
  * @see IgniteCache#query(Query)
  * @see IgniteCache#localQuery(Query)
@@ -63,8 +67,8 @@ public abstract class Query<T extends Query> implements Serializable {
      * @param sql SQL Query string.
      * @return SQL Query instance.
      */
-    public static QuerySql sql(Class<?> type, String sql) {
-        return new QuerySql(type, sql);
+    public static SqlQuery sql(Class<?> type, String sql) {
+        return new SqlQuery(type, sql);
     }
 
     /**
@@ -74,8 +78,8 @@ public abstract class Query<T extends Query> implements Serializable {
      * @param txt Search string.
      * @return Fulltext query.
      */
-    public static QueryText text(Class<?> type, String txt) {
-        return new QueryText(txt).setType(type);
+    public static TextQuery text(Class<?> type, String txt) {
+        return new TextQuery(txt).setType(type);
     }
 
     /**
@@ -84,8 +88,8 @@ public abstract class Query<T extends Query> implements Serializable {
      * @param filter Filter.
      * @return SPI Query.
      */
-    public static <K, V> QueryScan<K, V> scan(final IgniteBiPredicate<K, V> filter) {
-        return new QueryScan<>(filter);
+    public static <K, V> ScanQuery<K, V> scan(final IgniteBiPredicate<K, V> filter) {
+        return new ScanQuery<>(filter);
     }
 
     /**
@@ -94,8 +98,8 @@ public abstract class Query<T extends Query> implements Serializable {
      * @return SPI Query.
      * @see IndexingSpi
      */
-    public static QuerySpi spi() {
-        return new QuerySpi();
+    public static SpiQuery spi() {
+        return new SpiQuery();
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c4ed31f0/modules/core/src/main/java/org/apache/ignite/cache/query/QueryScan.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/query/QueryScan.java b/modules/core/src/main/java/org/apache/ignite/cache/query/QueryScan.java
deleted file mode 100644
index ba7f4d9..0000000
--- a/modules/core/src/main/java/org/apache/ignite/cache/query/QueryScan.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * 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;
-
-import org.apache.ignite.*;
-import org.apache.ignite.internal.util.typedef.internal.*;
-import org.apache.ignite.lang.*;
-import org.jetbrains.annotations.*;
-
-/**
- * Scan query over cache entries. Will accept all the entries if no predicate was set.
- *
- * @see IgniteCache#query(Query)
- * @see IgniteCache#localQuery(Query)
- */
-public class QueryScan<K, V> extends Query<QueryScan<K, V>> {
-    /** */
-    private IgniteBiPredicate<K,V> filter;
-
-    /**
-     * Create scan query returning all entries.
-     */
-    public QueryScan() {
-        this(null);
-    }
-
-    /**
-     * Create scan query with filter.
-     *
-     * @param filter Filter. If {@code null} then all entries will be returned.
-     */
-    public QueryScan(@Nullable IgniteBiPredicate<K,V> filter) {
-        setFilter(filter);
-    }
-
-    /**
-     * Gets filter.
-     *
-     * @return Filter.
-     */
-    public IgniteBiPredicate<K,V> getFilter() {
-        return filter;
-    }
-
-    /**
-     * Sets filter.
-     *
-     * @param filter Filter. If {@code null} then all entries will be returned.
-     */
-    public void setFilter(@Nullable IgniteBiPredicate<K,V> filter) {
-        this.filter = filter;
-    }
-
-    /** {@inheritDoc} */
-    @Override public String toString() {
-        return S.toString(QueryScan.class, this);
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c4ed31f0/modules/core/src/main/java/org/apache/ignite/cache/query/QuerySpi.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/query/QuerySpi.java b/modules/core/src/main/java/org/apache/ignite/cache/query/QuerySpi.java
deleted file mode 100644
index 31710bd..0000000
--- a/modules/core/src/main/java/org/apache/ignite/cache/query/QuerySpi.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * 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;
-
-import org.apache.ignite.*;
-import org.apache.ignite.internal.util.tostring.*;
-import org.apache.ignite.internal.util.typedef.internal.*;
-import org.apache.ignite.spi.indexing.*;
-
-/**
- * Query to be used by {@link IndexingSpi} implementations.
- *
- * @see IgniteCache#query(Query)
- * @see IgniteCache#localQuery(Query)
- */
-public final class QuerySpi extends Query<QuerySpi> {
-    /** Arguments. */
-    @GridToStringInclude
-    private Object[] args;
-
-    /**
-     * Gets SQL arguments.
-     *
-     * @return SQL arguments.
-     */
-    public Object[] getArgs() {
-        return args;
-    }
-
-    /**
-     * Sets SQL arguments.
-     *
-     * @param args SQL arguments.
-     * @return {@code this} For chaining.
-     */
-    public QuerySpi setArgs(Object... args) {
-        this.args = args;
-
-        return this;
-    }
-
-    /** {@inheritDoc} */
-    @Override public String toString() {
-        return S.toString(QuerySpi.class, this);
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c4ed31f0/modules/core/src/main/java/org/apache/ignite/cache/query/QuerySql.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/query/QuerySql.java b/modules/core/src/main/java/org/apache/ignite/cache/query/QuerySql.java
deleted file mode 100644
index c409c5b..0000000
--- a/modules/core/src/main/java/org/apache/ignite/cache/query/QuerySql.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/*
- * 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;
-
-import org.apache.ignite.*;
-import org.apache.ignite.internal.processors.query.*;
-import org.apache.ignite.internal.util.tostring.*;
-import org.apache.ignite.internal.util.typedef.internal.*;
-
-/**
- * SQL Query.
- *
- * @see IgniteCache#query(Query)
- * @see IgniteCache#localQuery(Query)
- */
-public final class QuerySql extends Query<QuerySql> {
-    /** */
-    private String type;
-
-    /** SQL clause. */
-    private String sql;
-
-    /** Arguments. */
-    @GridToStringInclude
-    private Object[] args;
-
-    /**
-     * Constructs query for the given SQL query.
-     *
-     * @param sql SQL Query.
-     */
-    public QuerySql(String sql) {
-        setSql(sql);
-    }
-
-    /**
-     * Constructs query for the given type and SQL query.
-     *
-     * @param type Type.
-     * @param sql SQL Query.
-     */
-    public QuerySql(Class<?> type, String sql) {
-        this(sql);
-
-        setType(type);
-    }
-
-    /**
-     * Gets SQL clause.
-     *
-     * @return SQL clause.
-     */
-    public String getSql() {
-        return sql;
-    }
-
-    /**
-     * Sets SQL clause.
-     *
-     * @param sql SQL clause.
-     * @return {@code this} For chaining.
-     */
-    public QuerySql setSql(String sql) {
-        A.notNull(sql, "sql");
-
-        this.sql = sql;
-
-        return this;
-    }
-
-    /**
-     * Gets SQL arguments.
-     *
-     * @return SQL arguments.
-     */
-    public Object[] getArgs() {
-        return args;
-    }
-
-    /**
-     * Sets SQL arguments.
-     *
-     * @param args SQL arguments.
-     * @return {@code this} For chaining.
-     */
-    public QuerySql setArgs(Object... args) {
-        this.args = args;
-
-        return this;
-    }
-
-    /**
-     * Gets type for query.
-     *
-     * @return Type.
-     */
-    public String getType() {
-        return type;
-    }
-
-    /**
-     * Sets type for query.
-     *
-     * @param type Type.
-     * @return {@code this} For chaining.
-     */
-    public QuerySql setType(String type) {
-        this.type = type;
-
-        return this;
-    }
-
-    /**
-     * @param type Type.
-     */
-    public QuerySql setType(Class<?> type) {
-        return setType(GridQueryProcessor.typeName(type));
-    }
-
-    /** {@inheritDoc} */
-    @Override public String toString() {
-        return S.toString(QuerySql.class, this);
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c4ed31f0/modules/core/src/main/java/org/apache/ignite/cache/query/QueryText.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/query/QueryText.java b/modules/core/src/main/java/org/apache/ignite/cache/query/QueryText.java
deleted file mode 100644
index 099837a..0000000
--- a/modules/core/src/main/java/org/apache/ignite/cache/query/QueryText.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * 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;
-
-import org.apache.ignite.*;
-import org.apache.ignite.internal.processors.query.*;
-import org.apache.ignite.internal.util.typedef.internal.*;
-
-/**
- * Query for Lucene based fulltext search.
- *
- * @see IgniteCache#query(Query)
- * @see IgniteCache#localQuery(Query)
- */
-public final class QueryText extends Query<QueryText> {
-    /** */
-    private String type;
-
-    /** SQL clause. */
-    private String txt;
-
-    /**
-     * Constructs query for the given search string.
-     *
-     * @param txt Search string.
-     */
-    public QueryText(String txt) {
-        setText(txt);
-    }
-
-    /**
-     * Constructs query for the given search string.
-     *
-     * @param type Type.
-     * @param txt Search string.
-     */
-    public QueryText(Class<?> type, String txt) {
-        this(txt);
-
-        setType(type);
-    }
-
-    /**
-     * Gets type for query.
-     *
-     * @return Type.
-     */
-    public String getType() {
-        return type;
-    }
-
-    /**
-     * Sets type for query.
-     *
-     * @param type Type.
-     * @return {@code this} For chaining.
-     */
-    public QueryText setType(Class<?> type) {
-        return setType(GridQueryProcessor.typeName(type));
-    }
-
-    /**
-     * Sets type for query.
-     *
-     * @param type Type.
-     * @return {@code this} For chaining.
-     */
-    public QueryText setType(String type) {
-        this.type = type;
-
-        return this;
-    }
-
-    /**
-     * Gets text search string.
-     *
-     * @return Text search string.
-     */
-    public String getText() {
-        return txt;
-    }
-
-    /**
-     * Sets text search string.
-     *
-     * @param txt Text search string.
-     * @return {@code this} For chaining.
-     */
-    public QueryText setText(String txt) {
-        A.notNull(txt, "txt");
-
-        this.txt = txt;
-
-        return this;
-    }
-
-    /** {@inheritDoc} */
-    @Override public String toString() {
-        return S.toString(QueryText.class, this);
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c4ed31f0/modules/core/src/main/java/org/apache/ignite/cache/query/ScanQuery.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/query/ScanQuery.java b/modules/core/src/main/java/org/apache/ignite/cache/query/ScanQuery.java
new file mode 100644
index 0000000..d425058
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/cache/query/ScanQuery.java
@@ -0,0 +1,73 @@
+/*
+ * 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;
+
+import org.apache.ignite.*;
+import org.apache.ignite.internal.util.typedef.internal.*;
+import org.apache.ignite.lang.*;
+import org.jetbrains.annotations.*;
+
+/**
+ * Scan query over cache entries. Will accept all the entries if no predicate was set.
+ *
+ * @see IgniteCache#query(Query)
+ * @see IgniteCache#localQuery(Query)
+ */
+public class ScanQuery<K, V> extends Query<ScanQuery<K, V>> {
+    /** */
+    private IgniteBiPredicate<K,V> filter;
+
+    /**
+     * Create scan query returning all entries.
+     */
+    public ScanQuery() {
+        this(null);
+    }
+
+    /**
+     * Create scan query with filter.
+     *
+     * @param filter Filter. If {@code null} then all entries will be returned.
+     */
+    public ScanQuery(@Nullable IgniteBiPredicate<K,V> filter) {
+        setFilter(filter);
+    }
+
+    /**
+     * Gets filter.
+     *
+     * @return Filter.
+     */
+    public IgniteBiPredicate<K,V> getFilter() {
+        return filter;
+    }
+
+    /**
+     * Sets filter.
+     *
+     * @param filter Filter. If {@code null} then all entries will be returned.
+     */
+    public void setFilter(@Nullable IgniteBiPredicate<K,V> filter) {
+        this.filter = filter;
+    }
+
+    /** {@inheritDoc} */
+    @Override public String toString() {
+        return S.toString(ScanQuery.class, this);
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c4ed31f0/modules/core/src/main/java/org/apache/ignite/cache/query/SpiQuery.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/query/SpiQuery.java b/modules/core/src/main/java/org/apache/ignite/cache/query/SpiQuery.java
new file mode 100644
index 0000000..a1d5ccd
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/cache/query/SpiQuery.java
@@ -0,0 +1,61 @@
+/*
+ * 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;
+
+import org.apache.ignite.*;
+import org.apache.ignite.internal.util.tostring.*;
+import org.apache.ignite.internal.util.typedef.internal.*;
+import org.apache.ignite.spi.indexing.*;
+
+/**
+ * Query to be used by {@link IndexingSpi} implementations.
+ *
+ * @see IgniteCache#query(Query)
+ * @see IgniteCache#localQuery(Query)
+ */
+public final class SpiQuery extends Query<SpiQuery> {
+    /** Arguments. */
+    @GridToStringInclude
+    private Object[] args;
+
+    /**
+     * Gets SQL arguments.
+     *
+     * @return SQL arguments.
+     */
+    public Object[] getArgs() {
+        return args;
+    }
+
+    /**
+     * Sets SQL arguments.
+     *
+     * @param args SQL arguments.
+     * @return {@code this} For chaining.
+     */
+    public SpiQuery setArgs(Object... args) {
+        this.args = args;
+
+        return this;
+    }
+
+    /** {@inheritDoc} */
+    @Override public String toString() {
+        return S.toString(SpiQuery.class, this);
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c4ed31f0/modules/core/src/main/java/org/apache/ignite/cache/query/SqlQuery.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/query/SqlQuery.java b/modules/core/src/main/java/org/apache/ignite/cache/query/SqlQuery.java
new file mode 100644
index 0000000..8271e06
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/cache/query/SqlQuery.java
@@ -0,0 +1,139 @@
+/*
+ * 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;
+
+import org.apache.ignite.*;
+import org.apache.ignite.internal.processors.query.*;
+import org.apache.ignite.internal.util.tostring.*;
+import org.apache.ignite.internal.util.typedef.internal.*;
+
+/**
+ * SQL Query.
+ *
+ * @see IgniteCache#query(Query)
+ * @see IgniteCache#localQuery(Query)
+ */
+public final class SqlQuery extends Query<SqlQuery> {
+    /** */
+    private String type;
+
+    /** SQL clause. */
+    private String sql;
+
+    /** Arguments. */
+    @GridToStringInclude
+    private Object[] args;
+
+    /**
+     * Constructs query for the given SQL query.
+     *
+     * @param sql SQL Query.
+     */
+    public SqlQuery(String sql) {
+        setSql(sql);
+    }
+
+    /**
+     * Constructs query for the given type and SQL query.
+     *
+     * @param type Type.
+     * @param sql SQL Query.
+     */
+    public SqlQuery(Class<?> type, String sql) {
+        this(sql);
+
+        setType(type);
+    }
+
+    /**
+     * Gets SQL clause.
+     *
+     * @return SQL clause.
+     */
+    public String getSql() {
+        return sql;
+    }
+
+    /**
+     * Sets SQL clause.
+     *
+     * @param sql SQL clause.
+     * @return {@code this} For chaining.
+     */
+    public SqlQuery setSql(String sql) {
+        A.notNull(sql, "sql");
+
+        this.sql = sql;
+
+        return this;
+    }
+
+    /**
+     * Gets SQL arguments.
+     *
+     * @return SQL arguments.
+     */
+    public Object[] getArgs() {
+        return args;
+    }
+
+    /**
+     * Sets SQL arguments.
+     *
+     * @param args SQL arguments.
+     * @return {@code this} For chaining.
+     */
+    public SqlQuery setArgs(Object... args) {
+        this.args = args;
+
+        return this;
+    }
+
+    /**
+     * Gets type for query.
+     *
+     * @return Type.
+     */
+    public String getType() {
+        return type;
+    }
+
+    /**
+     * Sets type for query.
+     *
+     * @param type Type.
+     * @return {@code this} For chaining.
+     */
+    public SqlQuery setType(String type) {
+        this.type = type;
+
+        return this;
+    }
+
+    /**
+     * @param type Type.
+     */
+    public SqlQuery setType(Class<?> type) {
+        return setType(GridQueryProcessor.typeName(type));
+    }
+
+    /** {@inheritDoc} */
+    @Override public String toString() {
+        return S.toString(SqlQuery.class, this);
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c4ed31f0/modules/core/src/main/java/org/apache/ignite/cache/query/TextQuery.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/query/TextQuery.java b/modules/core/src/main/java/org/apache/ignite/cache/query/TextQuery.java
new file mode 100644
index 0000000..124a77b
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/cache/query/TextQuery.java
@@ -0,0 +1,116 @@
+/*
+ * 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;
+
+import org.apache.ignite.*;
+import org.apache.ignite.internal.processors.query.*;
+import org.apache.ignite.internal.util.typedef.internal.*;
+
+/**
+ * Query for Lucene based fulltext search.
+ *
+ * @see IgniteCache#query(Query)
+ * @see IgniteCache#localQuery(Query)
+ */
+public final class TextQuery extends Query<TextQuery> {
+    /** */
+    private String type;
+
+    /** SQL clause. */
+    private String txt;
+
+    /**
+     * Constructs query for the given search string.
+     *
+     * @param txt Search string.
+     */
+    public TextQuery(String txt) {
+        setText(txt);
+    }
+
+    /**
+     * Constructs query for the given search string.
+     *
+     * @param type Type.
+     * @param txt Search string.
+     */
+    public TextQuery(Class<?> type, String txt) {
+        this(txt);
+
+        setType(type);
+    }
+
+    /**
+     * Gets type for query.
+     *
+     * @return Type.
+     */
+    public String getType() {
+        return type;
+    }
+
+    /**
+     * Sets type for query.
+     *
+     * @param type Type.
+     * @return {@code this} For chaining.
+     */
+    public TextQuery setType(Class<?> type) {
+        return setType(GridQueryProcessor.typeName(type));
+    }
+
+    /**
+     * Sets type for query.
+     *
+     * @param type Type.
+     * @return {@code this} For chaining.
+     */
+    public TextQuery setType(String type) {
+        this.type = type;
+
+        return this;
+    }
+
+    /**
+     * Gets text search string.
+     *
+     * @return Text search string.
+     */
+    public String getText() {
+        return txt;
+    }
+
+    /**
+     * Sets text search string.
+     *
+     * @param txt Text search string.
+     * @return {@code this} For chaining.
+     */
+    public TextQuery setText(String txt) {
+        A.notNull(txt, "txt");
+
+        this.txt = txt;
+
+        return this;
+    }
+
+    /** {@inheritDoc} */
+    @Override public String toString() {
+        return S.toString(TextQuery.class, this);
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c4ed31f0/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
index c2ce589..1730627 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
@@ -260,8 +260,8 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
         final CacheQuery<Map.Entry<K,V>> qry;
         final CacheQueryFuture<Map.Entry<K,V>> fut;
 
-        if (filter instanceof QueryScan) {
-            IgniteBiPredicate<K,V> p = ((QueryScan)filter).getFilter();
+        if (filter instanceof ScanQuery) {
+            IgniteBiPredicate<K,V> p = ((ScanQuery)filter).getFilter();
 
             qry = delegate.queries().createScanQuery(p != null ? p : ACCEPT_ALL);
 
@@ -270,8 +270,8 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
 
             fut = qry.execute();
         }
-        else if (filter instanceof QueryText) {
-            QueryText p = (QueryText)filter;
+        else if (filter instanceof TextQuery) {
+            TextQuery p = (TextQuery)filter;
 
             qry = delegate.queries().createFullTextQuery(p.getType(), p.getText());
 
@@ -280,13 +280,13 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
 
             fut = qry.execute();
         }
-        else if (filter instanceof QuerySpi) {
+        else if (filter instanceof SpiQuery) {
             qry = ((GridCacheQueriesEx)delegate.queries()).createSpiQuery();
 
             if (grp != null)
                 qry.projection(grp);
 
-            fut = qry.execute(((QuerySpi)filter).getArgs());
+            fut = qry.execute(((SpiQuery)filter).getArgs());
         }
         else
             throw new IgniteException("Unsupported query predicate: " + filter);
@@ -323,8 +323,8 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
         GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
 
         try {
-            if (filter instanceof QuerySql) {
-                QuerySql p = (QuerySql)filter;
+            if (filter instanceof SqlQuery) {
+                SqlQuery p = (SqlQuery)filter;
 
                 return ctx.kernalContext().query().queryTwoStep(ctx.name(), p.getType(), p.getSql(), p.getArgs());
             }
@@ -369,8 +369,8 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
         GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
 
         try {
-            if (filter instanceof QuerySql) {
-                QuerySql p = (QuerySql)filter;
+            if (filter instanceof SqlQuery) {
+                SqlQuery p = (SqlQuery)filter;
 
                 return new QueryCursorImpl<>(ctx.kernalContext().query().<K,V>queryLocal(
                     ctx.name(), p.getType(), p.getSql(), p.getArgs()));

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c4ed31f0/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheFieldsQueryNoDataSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheFieldsQueryNoDataSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheFieldsQueryNoDataSelfTest.java
index e9b0c7e..40e78bf 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheFieldsQueryNoDataSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheFieldsQueryNoDataSelfTest.java
@@ -73,7 +73,7 @@ public class IgniteCacheFieldsQueryNoDataSelfTest extends GridCommonAbstractTest
      */
     public void testQuery() throws Exception {
         Collection<Cache.Entry<Object, Object>> res = grid().jcache(null)
-            .query(new QuerySql("select _VAL from Integer")).getAll();
+            .query(new SqlQuery("select _VAL from Integer")).getAll();
 
         assert res != null;
         assert res.isEmpty();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c4ed31f0/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryIndexSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryIndexSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryIndexSelfTest.java
index 3e8d963..f4c592c 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryIndexSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryIndexSelfTest.java
@@ -98,7 +98,7 @@ public class IgniteCacheQueryIndexSelfTest extends GridCacheAbstractSelfTest {
      */
     private void checkQuery(IgniteCache<Integer, CacheValue> cache) throws Exception {
         QueryCursor<Cache.Entry<Integer, CacheValue>> qry =
-            cache.query(new QuerySql("val >= 5"));
+            cache.query(new SqlQuery("val >= 5"));
 
         Collection<Cache.Entry<Integer, CacheValue>> queried = qry.getAll();
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c4ed31f0/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractQuerySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractQuerySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractQuerySelfTest.java
index c3ea9cc..cd2a9ac 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractQuerySelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractQuerySelfTest.java
@@ -554,11 +554,11 @@ public abstract class IgniteCacheAbstractQuerySelfTest extends GridCommonAbstrac
 
         // Try to execute on empty cache first.
         QueryCursor<Cache.Entry<Integer, ObjectValue>> qry =
-            cache.query(new QueryText(ObjectValue.class, "full"));
+            cache.query(new TextQuery(ObjectValue.class, "full"));
 
         assert qry.getAll().isEmpty();
 
-        qry = cache.query(new QueryText(ObjectValue.class, "full"));
+        qry = cache.query(new TextQuery(ObjectValue.class, "full"));
 
         assert qry.getAll().isEmpty();
 
@@ -575,7 +575,7 @@ public abstract class IgniteCacheAbstractQuerySelfTest extends GridCommonAbstrac
 
         cache.put(key2, val2);
 
-        qry = cache.query(new QueryText(ObjectValue.class, "full"));
+        qry = cache.query(new TextQuery(ObjectValue.class, "full"));
 
         Collection<Cache.Entry<Integer, ObjectValue>> res = qry.getAll();
 
@@ -583,7 +583,7 @@ public abstract class IgniteCacheAbstractQuerySelfTest extends GridCommonAbstrac
 
         assert res.size() == 2;
 
-        qry = cache.query(new QueryText(ObjectValue.class, "full"));
+        qry = cache.query(new TextQuery(ObjectValue.class, "full"));
 
         res = qry.getAll();
 
@@ -638,7 +638,7 @@ public abstract class IgniteCacheAbstractQuerySelfTest extends GridCommonAbstrac
         c1.put("key", "value");
 
         // Scan query.
-        QueryCursor<Cache.Entry<String, String>> qry = c1.query(new QueryScan<String, String>());
+        QueryCursor<Cache.Entry<String, String>> qry = c1.query(new ScanQuery<String, String>());
 
         Iterator<Cache.Entry<String, String>> iter = qry.iterator();
 
@@ -667,14 +667,14 @@ public abstract class IgniteCacheAbstractQuerySelfTest extends GridCommonAbstrac
         c.put(1, new ObjectValue("ObjectValue str", 1));
         c.put("key", new ObjectValueOther("ObjectValueOther str"));
 
-        Collection<Cache.Entry<Object, Object>> res = c.query(new QueryText(ObjectValue.class, "str")).getAll();
+        Collection<Cache.Entry<Object, Object>> res = c.query(new TextQuery(ObjectValue.class, "str")).getAll();
 
         assert res != null;
         int expCnt = 1;
         assert res.size() == expCnt;
         assert F.first(res).getValue().getClass() == ObjectValue.class;
 
-        res = c.query(new QueryText(ObjectValueOther.class, "str")).getAll();
+        res = c.query(new TextQuery(ObjectValueOther.class, "str")).getAll();
 
         assert res != null;
         assert res.size() == expCnt;
@@ -742,7 +742,7 @@ public abstract class IgniteCacheAbstractQuerySelfTest extends GridCommonAbstrac
         for (int i = 0; i < 50; i++)
             cache.put(i, i);
 
-        QuerySql qry = sql(Integer.class, "_key >= 0");
+        SqlQuery qry = sql(Integer.class, "_key >= 0");
 
         qry.setPageSize(10);
 
@@ -872,7 +872,7 @@ public abstract class IgniteCacheAbstractQuerySelfTest extends GridCommonAbstrac
         cache.put(new BadHashKeyObject("test_key1"), 7);
 
         assertEquals(1005001, cache.query(sql(Integer.class, "_key = ?").setArgs(
-                new BadHashKeyObject("test_key0"))).iterator().next().getValue().intValue());
+            new BadHashKeyObject("test_key0"))).iterator().next().getValue().intValue());
     }
 
     /**
@@ -886,7 +886,7 @@ public abstract class IgniteCacheAbstractQuerySelfTest extends GridCommonAbstrac
         cache.put(new ObjectValue("test_key1", 12), 17);
 
         assertEquals(11005,
-                cache.query(new QueryText(Integer.class, "test_key0"))
+                cache.query(new TextQuery(Integer.class, "test_key0"))
                         .iterator().next().getValue().intValue());
     }
 
@@ -1285,7 +1285,7 @@ public abstract class IgniteCacheAbstractQuerySelfTest extends GridCommonAbstrac
         cache.put(3, new Person("Mike Green", 1000));
 
 
-        QueryCursor<Cache.Entry<Integer, Person>> q = cache.query(new QueryText(Person.class, "White"));
+        QueryCursor<Cache.Entry<Integer, Person>> q = cache.query(new TextQuery(Person.class, "White"));
 
         if (customSubjId)
             ((GridCacheQueryAdapter)q).subjectId(subjId);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c4ed31f0/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryLoadSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryLoadSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryLoadSelfTest.java
index 20751eb..0a62efb 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryLoadSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryLoadSelfTest.java
@@ -120,7 +120,7 @@ public class IgniteCacheQueryLoadSelfTest extends GridCommonAbstractTest {
         assert cache.size() == PUT_CNT;
 
         Collection<Cache.Entry<Integer, ValueObject>> res =
-            cache.query(new QuerySql(ValueObject.class, "val >= 0")).getAll();
+            cache.query(new SqlQuery(ValueObject.class, "val >= 0")).getAll();
 
         assertNotNull(res);
         assertEquals(PUT_CNT, res.size());
@@ -140,7 +140,7 @@ public class IgniteCacheQueryLoadSelfTest extends GridCommonAbstractTest {
         assert cache.size() == PUT_CNT;
 
         Collection<Cache.Entry<Integer, ValueObject>> res =
-            cache.query(new QuerySql(ValueObject.class, "val >= 0")).getAll();
+            cache.query(new SqlQuery(ValueObject.class, "val >= 0")).getAll();
 
         assert res != null;
         assert res.size() == PUT_CNT;
@@ -162,7 +162,7 @@ public class IgniteCacheQueryLoadSelfTest extends GridCommonAbstractTest {
         assert cache.size() == PUT_CNT - 5;
 
         Collection<Cache.Entry<Integer, ValueObject>> res =
-            cache.query(new QuerySql(ValueObject.class, "val >= 0")).getAll();
+            cache.query(new SqlQuery(ValueObject.class, "val >= 0")).getAll();
 
         assert res != null;
         assert res.size() == PUT_CNT - 5;
@@ -186,7 +186,7 @@ public class IgniteCacheQueryLoadSelfTest extends GridCommonAbstractTest {
         assert cache.size() == PUT_CNT - 5;
 
         Collection<Cache.Entry<Integer, ValueObject>> res =
-            cache.query(new QuerySql(ValueObject.class, "val >= 0")).getAll();
+            cache.query(new SqlQuery(ValueObject.class, "val >= 0")).getAll();
 
         assert res != null;
         assert res.size() == PUT_CNT - 5;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c4ed31f0/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryMultiThreadedSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryMultiThreadedSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryMultiThreadedSelfTest.java
index 614b4dd..a2e8e2e 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryMultiThreadedSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryMultiThreadedSelfTest.java
@@ -259,8 +259,8 @@ public class IgniteCacheQueryMultiThreadedSelfTest extends GridCommonAbstractTes
         final IgniteCache<Integer, Long> cl = g.jcache(null);
 
         assertEquals(0, g.cache(null).size());
-        assertEquals(0, c.query(new QuerySql(String.class, "1 = 1")).getAll().size());
-        assertEquals(0, cl.query(new QuerySql(Long.class, "1 = 1")).getAll().size());
+        assertEquals(0, c.query(new SqlQuery(String.class, "1 = 1")).getAll().size());
+        assertEquals(0, cl.query(new SqlQuery(Long.class, "1 = 1")).getAll().size());
 
         Random rnd = new Random();
 
@@ -300,7 +300,7 @@ public class IgniteCacheQueryMultiThreadedSelfTest extends GridCommonAbstractTes
                             int from = rnd.nextInt(valCnt);
 
                             QueryCursor<Cache.Entry<Integer, String>> qry = c.query(
-                                    new QuerySql(String.class, "_val between ? and ?").setArgs(
+                                    new SqlQuery(String.class, "_val between ? and ?").setArgs(
                                         String.valueOf(from), String.valueOf(from + 250)));
 
                             Collection<Cache.Entry<Integer, String>> res = qry.getAll();
@@ -340,8 +340,8 @@ public class IgniteCacheQueryMultiThreadedSelfTest extends GridCommonAbstractTes
         final IgniteCache<Integer, String> c1 = g.jcache(null);
 
         assertEquals(0, g.cache(null).size());
-        assertEquals(0, c1.query(new QuerySql(String.class, "1 = 1")).getAll().size());
-        assertEquals(0, c.query(new QuerySql(Long.class, "1 = 1")).getAll().size());
+        assertEquals(0, c1.query(new SqlQuery(String.class, "1 = 1")).getAll().size());
+        assertEquals(0, c.query(new SqlQuery(Long.class, "1 = 1")).getAll().size());
 
         Random rnd = new Random();
 
@@ -382,7 +382,7 @@ public class IgniteCacheQueryMultiThreadedSelfTest extends GridCommonAbstractTes
                         case 4:
                             int from = rnd.nextInt(valCnt);
 
-                            Collection<Cache.Entry<Integer, Long>> res = c.query(new QuerySql(Long.class,
+                            Collection<Cache.Entry<Integer, Long>> res = c.query(new SqlQuery(Long.class,
                                 "_val between ? and ?").setArgs(from, from + 250)).getAll();
 
                             for (Cache.Entry<Integer, Long> ignored : res) {
@@ -419,7 +419,7 @@ public class IgniteCacheQueryMultiThreadedSelfTest extends GridCommonAbstractTes
         final IgniteCache<Integer, Object> c = g.jcache(null);
 
         assertEquals(0, g.jcache(null).size());
-        assertEquals(0, c.query(new QuerySql(Object.class, "1 = 1")).getAll().size());
+        assertEquals(0, c.query(new SqlQuery(Object.class, "1 = 1")).getAll().size());
 
         Random rnd = new Random();
 
@@ -462,7 +462,7 @@ public class IgniteCacheQueryMultiThreadedSelfTest extends GridCommonAbstractTes
                             int from = rnd.nextInt(valCnt);
 
                             Collection<Cache.Entry<Integer, Object>> res = c.query(
-                                new QuerySql(Object.class, "_val between ? and ?").setArgs(from, from + 250))
+                                new SqlQuery(Object.class, "_val between ? and ?").setArgs(from, from + 250))
                                 .getAll();
 
                             for (Cache.Entry<Integer, Object> ignored : res) {
@@ -497,7 +497,7 @@ public class IgniteCacheQueryMultiThreadedSelfTest extends GridCommonAbstractTes
         final IgniteCache<Integer, TestValue> c = g.jcache(null);
 
         assertEquals(0, g.cache(null).size());
-        assertEquals(0, c.query(new QuerySql(TestValue.class, "1 = 1")).getAll().size());
+        assertEquals(0, c.query(new SqlQuery(TestValue.class, "1 = 1")).getAll().size());
 
         Random rnd = new Random();
 
@@ -539,7 +539,7 @@ public class IgniteCacheQueryMultiThreadedSelfTest extends GridCommonAbstractTes
                             int from = rnd.nextInt(valCnt);
 
                             Collection<Cache.Entry<Integer, TestValue>> res =
-                                c.query(new QuerySql(TestValue.class, "TestValue.val between ? and ?").setArgs(
+                                c.query(new SqlQuery(TestValue.class, "TestValue.val between ? and ?").setArgs(
                                     from, from + 250)).getAll();
 
                             for (Cache.Entry<Integer, TestValue> ignored : res) {
@@ -592,7 +592,7 @@ public class IgniteCacheQueryMultiThreadedSelfTest extends GridCommonAbstractTes
                         iter++;
 
                         Collection<Cache.Entry<Integer, Integer>> entries =
-                            c.query(new QuerySql(Integer.class, "_val >= 0")).getAll();
+                            c.query(new SqlQuery(Integer.class, "_val >= 0")).getAll();
 
                         assert entries != null;
 
@@ -654,7 +654,7 @@ public class IgniteCacheQueryMultiThreadedSelfTest extends GridCommonAbstractTes
                     iter++;
 
                     Collection<Cache.Entry<Integer, Integer>> entries =
-                        c.query(new QuerySql(Integer.class, "_val >= 0")).getAll();
+                        c.query(new SqlQuery(Integer.class, "_val >= 0")).getAll();
 
                     assert entries != null;
 
@@ -712,7 +712,7 @@ public class IgniteCacheQueryMultiThreadedSelfTest extends GridCommonAbstractTes
 
                         // Scan query.
                         Collection<Cache.Entry<Integer, Integer>> entries =
-                            c.query(new QueryScan<Integer, Integer>()).getAll();
+                            c.query(new ScanQuery<Integer, Integer>()).getAll();
 
                         assert entries != null;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c4ed31f0/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheSqlQueryMultiThreadedSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheSqlQueryMultiThreadedSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheSqlQueryMultiThreadedSelfTest.java
index f76078b..20e8259 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheSqlQueryMultiThreadedSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheSqlQueryMultiThreadedSelfTest.java
@@ -95,7 +95,7 @@ public class IgniteCacheSqlQueryMultiThreadedSelfTest extends GridCommonAbstract
             @Override public Void call() throws Exception {
                 for (int i = 0; i < 100; i++) {
                     Iterator<Cache.Entry<Integer, Person>> iter =
-                        cache.query(new QuerySql("age >= 0").setType("Person")).iterator();
+                        cache.query(new SqlQuery("age >= 0").setType("Person")).iterator();
 
                     int cnt = 0;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c4ed31f0/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheQueryNodeRestartSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheQueryNodeRestartSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheQueryNodeRestartSelfTest.java
index a7cfa44..0333cb9 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheQueryNodeRestartSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheQueryNodeRestartSelfTest.java
@@ -121,7 +121,7 @@ public class IgniteCacheQueryNodeRestartSelfTest extends GridCacheAbstractSelfTe
             @Override public void applyx() throws IgniteCheckedException {
                 while (!done.get()) {
                     Collection<Cache.Entry<Integer, Integer>> res =
-                        cache.query(new QuerySql(Integer.class, "_val >= 0")).getAll();
+                        cache.query(new SqlQuery(Integer.class, "_val >= 0")).getAll();
 
                     assertFalse(res.isEmpty());
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c4ed31f0/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/IgniteCacheReplicatedQuerySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/IgniteCacheReplicatedQuerySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/IgniteCacheReplicatedQuerySelfTest.java
index cc8bc61..7e368ca 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/IgniteCacheReplicatedQuerySelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/IgniteCacheReplicatedQuerySelfTest.java
@@ -121,7 +121,7 @@ public class IgniteCacheReplicatedQuerySelfTest extends IgniteCacheAbstractQuery
             assertEquals(0, c.size());
 
             Collection<Cache.Entry<Integer, Integer>> res =
-                c.query(new QuerySql(Integer.class, "_key >= 5 order by _key")).getAll();
+                c.query(new SqlQuery(Integer.class, "_key >= 5 order by _key")).getAll();
 
             assertEquals(5, res.size());
 
@@ -155,7 +155,7 @@ public class IgniteCacheReplicatedQuerySelfTest extends IgniteCacheAbstractQuery
         assertEquals(keyCnt, cache3.size());
 
         QueryCursor<Cache.Entry<CacheKey, CacheValue>> qry =
-            cache1.query(new QuerySql(CacheValue.class, "true"));
+            cache1.query(new SqlQuery(CacheValue.class, "true"));
 
         Iterator<Cache.Entry<CacheKey, CacheValue>> iter = qry.iterator();
 
@@ -240,13 +240,13 @@ public class IgniteCacheReplicatedQuerySelfTest extends IgniteCacheAbstractQuery
         latch.await();
 
         QueryCursor<Cache.Entry<CacheKey, CacheValue>> qry =
-            cache1.query(new QuerySql(CacheValue.class, "val > 1 and val < 4"));
+            cache1.query(new SqlQuery(CacheValue.class, "val > 1 and val < 4"));
 
         // Distributed query.
         assertEquals(6, qry.getAll().size());
 
         // Create new query, old query cannot be modified after it has been executed.
-        qry = cache3.localQuery(new QuerySql(CacheValue.class, "val > 1 and val < 4"));
+        qry = cache3.localQuery(new SqlQuery(CacheValue.class, "val > 1 and val < 4"));
 
         // Tests execute on node.
         Iterator<Cache.Entry<CacheKey, CacheValue>> iter = qry.iterator();
@@ -295,7 +295,7 @@ public class IgniteCacheReplicatedQuerySelfTest extends IgniteCacheAbstractQuery
         // Create query with key filter.
 
         QueryCursor<Cache.Entry<CacheKey, CacheValue>> qry =
-            cache1.query(new QuerySql(CacheValue.class, "val > 0"));
+            cache1.query(new SqlQuery(CacheValue.class, "val > 0"));
 
         assertEquals(keyCnt * 3, qry.getAll().size());
 
@@ -317,7 +317,7 @@ public class IgniteCacheReplicatedQuerySelfTest extends IgniteCacheAbstractQuery
 
         for (int i = 0; i < cache.getConfiguration(CacheConfiguration.class).getMaximumQueryIteratorCount() + 1; i++) {
             QueryCursor<Cache.Entry<Integer, Integer>> q =
-                cache.query(new QuerySql(Integer.class, "_key >= 0 order by _key"));
+                cache.query(new SqlQuery(Integer.class, "_key >= 0 order by _key"));
 
             assertEquals(0, (int)q.iterator().next().getKey());
 
@@ -356,7 +356,7 @@ public class IgniteCacheReplicatedQuerySelfTest extends IgniteCacheAbstractQuery
                 cache.put(i, i);
 
             QueryCursor<Cache.Entry<Integer, Integer>> q =
-                cache.query(new QuerySql(Integer.class, "_key >= 0 order by _key"));
+                cache.query(new SqlQuery(Integer.class, "_key >= 0 order by _key"));
 
             assertEquals(0, (int) q.iterator().next().getKey());
 
@@ -415,7 +415,7 @@ public class IgniteCacheReplicatedQuerySelfTest extends IgniteCacheAbstractQuery
      */
     private void checkQueryResults(IgniteCache<CacheKey, CacheValue> cache) throws Exception {
         QueryCursor<Cache.Entry<CacheKey, CacheValue>> qry =
-            cache.localQuery(new QuerySql(CacheValue.class, "val > 1 and val < 4"));
+            cache.localQuery(new SqlQuery(CacheValue.class, "val > 1 and val < 4"));
 
         Iterator<Cache.Entry<CacheKey, CacheValue>> iter = qry.iterator();
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c4ed31f0/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/local/IgniteCacheLocalQuerySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/local/IgniteCacheLocalQuerySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/local/IgniteCacheLocalQuerySelfTest.java
index 8e1a828..8a92553 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/local/IgniteCacheLocalQuerySelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/local/IgniteCacheLocalQuerySelfTest.java
@@ -55,7 +55,7 @@ public class IgniteCacheLocalQuerySelfTest extends IgniteCacheAbstractQuerySelfT
 
         // Tests equals query.
         QueryCursor<Cache.Entry<Integer, String>> qry =
-            cache.localQuery(new QuerySql(String.class, "_val='value1'"));
+            cache.localQuery(new SqlQuery(String.class, "_val='value1'"));
 
         Iterator<Cache.Entry<Integer, String>> iter = qry.iterator();
 
@@ -68,7 +68,7 @@ public class IgniteCacheLocalQuerySelfTest extends IgniteCacheAbstractQuerySelfT
         assert "value1".equals(entry.getValue());
 
         // Tests like query.
-        qry = cache.localQuery(new QuerySql(String.class, "_val like 'value%'"));
+        qry = cache.localQuery(new SqlQuery(String.class, "_val like 'value%'"));
 
         iter = qry.iterator();
 


Mime
View raw message