ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject incubator-ignite git commit: ignite-437: java doc
Date Tue, 07 Apr 2015 15:17:15 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-437-sqltests-p2 2225e4d3b -> 1622e6e44


ignite-437: java doc


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

Branch: refs/heads/ignite-437-sqltests-p2
Commit: 1622e6e44e07d6d89d675122b9c4dbd32f27434a
Parents: 2225e4d
Author: Artem Shutak <ashutak@gridgain.com>
Authored: Tue Apr 7 18:17:11 2015 +0300
Committer: Artem Shutak <ashutak@gridgain.com>
Committed: Tue Apr 7 18:17:11 2015 +0300

----------------------------------------------------------------------
 .../query/h2/sql/H2CompareBigQueryTest.java     | 48 ++++++++++++++++----
 1 file changed, 40 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1622e6e4/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/H2CompareBigQueryTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/H2CompareBigQueryTest.java
b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/H2CompareBigQueryTest.java
index 51d600d..bff8d7e 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/H2CompareBigQueryTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/H2CompareBigQueryTest.java
@@ -69,6 +69,11 @@ public class H2CompareBigQueryTest extends AbstractH2CompareQueryTest {
     /** Full the big query. */
     private String bigQry = getBigQry();
 
+    /**
+     * Extracts the big query from file.
+     *  
+     * @return Big query.
+     */
     private String getBigQry() {
         String res = "";
 
@@ -110,7 +115,7 @@ public class H2CompareBigQueryTest extends AbstractH2CompareQueryTest
{
     @Override protected void initCacheAndDbData() throws SQLException {
         final AtomicInteger idGen = new AtomicInteger();
 
-        final Collection<Integer> rootOrderIds = new ArrayList<Integer>(){{
+        final Iterable<Integer> rootOrderIds = new ArrayList<Integer>(){{
             for (int i = 0; i < ROOT_ORDER_CNT; i++)
                 add(idGen.incrementAndGet());
         }};
@@ -122,7 +127,7 @@ public class H2CompareBigQueryTest extends AbstractH2CompareQueryTest
{
                 add(new Date(curDate.getTime() - i * 24 * 60 * 60 * 1000)); // Minus i days.
         }};
 
-        final Collection<CustOrder> ords = new ArrayList<CustOrder>(){{
+        final Iterable<CustOrder> orders = new ArrayList<CustOrder>(){{
             for (int rootOrderId : rootOrderIds) {
                 // Generate 1 - 5 orders for 1 root order.
                 for (int i = 0; i < rootOrderId % 5; i++) {
@@ -141,7 +146,7 @@ public class H2CompareBigQueryTest extends AbstractH2CompareQueryTest
{
         }};
 
         final Collection<OrderParams> params = new ArrayList<OrderParams>(){{
-            for (CustOrder o : ords) {
+            for (CustOrder o : orders) {
                 OrderParams op = new OrderParams(idGen.incrementAndGet(), o.orderId, o.date,

                     o.orderId % 2 == 0 ? "Algo 1" : "Algo 2");
 
@@ -154,7 +159,7 @@ public class H2CompareBigQueryTest extends AbstractH2CompareQueryTest
{
         }};
         
         final Collection<ReplaceOrder> replaces = new ArrayList<ReplaceOrder>(){{
-            for (CustOrder o : ords) {
+            for (CustOrder o : orders) {
                 if (o.orderId % 7 == 0) {
                     ReplaceOrder replace = new ReplaceOrder(idGen.incrementAndGet(), o.orderId,
o.rootOrderId, o.alias,
                         new Date(o.date.getTime() + 12 * 60 * 60 * 1000), o.orderId); //
Plus a half of day.
@@ -169,7 +174,7 @@ public class H2CompareBigQueryTest extends AbstractH2CompareQueryTest
{
         }};
 
         final Collection<Cancel> cancels = new ArrayList<Cancel>(){{
-            for (CustOrder o : ords) {
+            for (CustOrder o : orders) {
                 if (o.orderId % 9 == 0) {
                     Cancel c = new Cancel(idGen.incrementAndGet(), o.orderId, 
                         new Date(o.date.getTime() + 12 * 60 * 60 * 1000));// Plus a half
of day.
@@ -429,6 +434,9 @@ public class H2CompareBigQueryTest extends AbstractH2CompareQueryTest
{
         }
     }
 
+    /**
+     * Custom Order.
+     */
     static class CustOrder implements Serializable {
         /** Primary key. */
         @QuerySqlField(index = true)
@@ -459,6 +467,7 @@ public class H2CompareBigQueryTest extends AbstractH2CompareQueryTest
{
          * @param rootOrderId Root order id.
          * @param date Date.
          * @param alias Alias.
+         * @param origOrderId Orig order id.
          */
         CustOrder(int orderId, int rootOrderId, Date date, String alias, int origOrderId)
{
             this.orderId = orderId;
@@ -479,6 +488,9 @@ public class H2CompareBigQueryTest extends AbstractH2CompareQueryTest
{
         }
     }
 
+    /**
+     * Replace Order.
+     */
     static class ReplaceOrder implements Serializable {
         /** Primary key. */
         @QuerySqlField(index = true)
@@ -508,6 +520,14 @@ public class H2CompareBigQueryTest extends AbstractH2CompareQueryTest
{
         @QuerySqlField
         private int archSeq = 111; // TODO: use it.
 
+        /**
+         * @param id Id.
+         * @param orderId Order id.
+         * @param rootOrderId Root order id.
+         * @param alias Alias.
+         * @param date Date.
+         * @param refOrderId Reference order id.
+         */
         ReplaceOrder(int id, int orderId, int rootOrderId, String alias, Date date, int refOrderId)
{
             this.id = id;
             this.orderId = orderId;
@@ -535,6 +555,9 @@ public class H2CompareBigQueryTest extends AbstractH2CompareQueryTest
{
         }
     }
 
+    /**
+     * Order params.
+     */
     static class OrderParams implements Serializable {
         /** Primary key. */
         @QuerySqlField(index = true)
@@ -552,9 +575,15 @@ public class H2CompareBigQueryTest extends AbstractH2CompareQueryTest
{
         @QuerySqlField
         private String parentAlgo = "CUSTOM_ALGO";
 
-         OrderParams(int id, int orderId, Date date, String parentAlgo) {
-             this.id = id;
-             this.orderId = orderId;
+        /**
+         * @param id Id.
+         * @param orderId Order id.
+         * @param date Date.
+         * @param parentAlgo Parent algo.
+         */
+        OrderParams(int id, int orderId, Date date, String parentAlgo) {
+            this.id = id;
+            this.orderId = orderId;
             this.date = date;
             this.parentAlgo = parentAlgo;
         }
@@ -577,6 +606,9 @@ public class H2CompareBigQueryTest extends AbstractH2CompareQueryTest
{
         }
     }
 
+    /**
+     * Cancel Order.
+     */
     static class Cancel implements Serializable {
         /** Primary key. */
         @QuerySqlField(index = true)


Mime
View raw message