You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by vk...@apache.org on 2022/01/25 00:49:53 UTC

[ignite-3] branch ignite-16244 updated: IGNITE-16244 - codestyle

This is an automated email from the ASF dual-hosted git repository.

vkulichenko pushed a commit to branch ignite-16244
in repository https://gitbox.apache.org/repos/asf/ignite-3.git


The following commit(s) were added to refs/heads/ignite-16244 by this push:
     new fddf7f7  IGNITE-16244 - codestyle
fddf7f7 is described below

commit fddf7f74b4c01a0e2e1a670ecf6d113e0b55146b
Author: Valentin Kulichenko <va...@gmail.com>
AuthorDate: Mon Jan 24 16:49:42 2022 -0800

    IGNITE-16244 - codestyle
---
 .../ignite/example/sql/jdbc/SqlJdbcExample.java    | 58 +++++++++++-----------
 .../ignite/example/table/KeyValueViewExample.java  | 46 ++++++++---------
 .../example/table/KeyValueViewPojoExample.java     | 46 ++++++++---------
 .../ignite/example/table/RecordViewExample.java    | 46 ++++++++---------
 .../example/table/RecordViewPojoExample.java       | 48 +++++++++---------
 .../ignite/example/tx/TransactionsExample.java     | 50 +++++++++----------
 6 files changed, 143 insertions(+), 151 deletions(-)

diff --git a/examples/src/main/java/org/apache/ignite/example/sql/jdbc/SqlJdbcExample.java b/examples/src/main/java/org/apache/ignite/example/sql/jdbc/SqlJdbcExample.java
index 9a1aab3..3a303dd 100644
--- a/examples/src/main/java/org/apache/ignite/example/sql/jdbc/SqlJdbcExample.java
+++ b/examples/src/main/java/org/apache/ignite/example/sql/jdbc/SqlJdbcExample.java
@@ -17,7 +17,11 @@
 
 package org.apache.ignite.example.sql.jdbc;
 
-import java.sql.*;
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.Statement;
 
 /**
  * This example demonstrates the usage of the Apache Ignite JDBC driver.
@@ -57,20 +61,18 @@ public class SqlJdbcExample {
 
             try (Statement stmt = conn.createStatement()) {
                 stmt.executeUpdate(
-                    "CREATE TABLE CITIES (" +
-                    "    ID   INT PRIMARY KEY," +
-                    "    NAME VARCHAR" +
-                    ")"
+                        "CREATE TABLE CITIES ("
+                                + "ID   INT PRIMARY KEY,"
+                                + "NAME VARCHAR)"
                 );
 
                 stmt.executeUpdate(
-                    "CREATE TABLE ACCOUNTS (" +
-                    "    ACCOUNT_ID INT PRIMARY KEY," +
-                    "    CITY_ID    INT," +
-                    "    FIRST_NAME VARCHAR," +
-                    "    LAST_NAME  VARCHAR," +
-                    "    BALANCE    DOUBLE" +
-                    ")"
+                        "CREATE TABLE ACCOUNTS ("
+                                + "    ACCOUNT_ID INT PRIMARY KEY,"
+                                + "    CITY_ID    INT,"
+                                + "    FIRST_NAME VARCHAR,"
+                                + "    LAST_NAME  VARCHAR,"
+                                + "    BALANCE    DOUBLE)"
                 );
             }
 
@@ -105,7 +107,7 @@ public class SqlJdbcExample {
             System.out.println("\nPopulating 'ACCOUNTS' table...");
 
             try (PreparedStatement stmt = conn.prepareStatement(
-                "INSERT INTO ACCOUNTS (ACCOUNT_ID, CITY_ID, FIRST_NAME, LAST_NAME, BALANCE) values (?, ?, ?, ?, ?)")) {
+                    "INSERT INTO ACCOUNTS (ACCOUNT_ID, CITY_ID, FIRST_NAME, LAST_NAME, BALANCE) values (?, ?, ?, ?, ?)")) {
                 stmt.setInt(1, 1);
                 stmt.setInt(2, 1);
                 stmt.setString(3, "John");
@@ -145,13 +147,13 @@ public class SqlJdbcExample {
 
             try (Statement stmt = conn.createStatement()) {
                 try (ResultSet rs = stmt.executeQuery(
-                    "SELECT a.FIRST_NAME, a.LAST_NAME, c.NAME FROM ACCOUNTS a "
-                        + "INNER JOIN CITIES c on c.ID = a.CITY_ID ORDER BY a.ACCOUNT_ID")) {
+                        "SELECT a.FIRST_NAME, a.LAST_NAME, c.NAME FROM ACCOUNTS a "
+                                + "INNER JOIN CITIES c on c.ID = a.CITY_ID ORDER BY a.ACCOUNT_ID")) {
                     while (rs.next()) {
                         System.out.println("    "
-                            + rs.getString(1) + ", "
-                            + rs.getString(2) + ", "
-                            + rs.getString(3));
+                                + rs.getString(1) + ", "
+                                + rs.getString(2) + ", "
+                                + rs.getString(3));
                     }
                 }
             }
@@ -166,13 +168,13 @@ public class SqlJdbcExample {
 
             try (Statement stmt = conn.createStatement()) {
                 try (ResultSet rs = stmt.executeQuery(
-                    "SELECT a.FIRST_NAME, a.LAST_NAME, a.BALANCE FROM ACCOUNTS a WHERE a.BALANCE < 1500.0 "
-                        + "ORDER BY a.ACCOUNT_ID")) {
+                        "SELECT a.FIRST_NAME, a.LAST_NAME, a.BALANCE FROM ACCOUNTS a WHERE a.BALANCE < 1500.0 "
+                                + "ORDER BY a.ACCOUNT_ID")) {
                     while (rs.next()) {
                         System.out.println("    "
-                            + rs.getString(1) + ", "
-                            + rs.getString(2) + ", "
-                            + rs.getDouble(3));
+                                + rs.getString(1) + ", "
+                                + rs.getString(2) + ", "
+                                + rs.getDouble(3));
                     }
                 }
             }
@@ -201,13 +203,13 @@ public class SqlJdbcExample {
 
             try (Statement stmt = conn.createStatement()) {
                 try (ResultSet rs = stmt.executeQuery(
-                    "SELECT a.FIRST_NAME, a.LAST_NAME, c.NAME FROM ACCOUNTS a "
-                            + "INNER JOIN CITIES c on c.ID = a.CITY_ID ORDER BY a.ACCOUNT_ID")) {
+                        "SELECT a.FIRST_NAME, a.LAST_NAME, c.NAME FROM ACCOUNTS a "
+                                + "INNER JOIN CITIES c on c.ID = a.CITY_ID ORDER BY a.ACCOUNT_ID")) {
                     while (rs.next()) {
                         System.out.println("    "
-                            + rs.getString(1) + ", "
-                            + rs.getString(2) + ", "
-                            + rs.getString(3));
+                                + rs.getString(1) + ", "
+                                + rs.getString(2) + ", "
+                                + rs.getString(3));
                     }
                 }
             }
diff --git a/examples/src/main/java/org/apache/ignite/example/table/KeyValueViewExample.java b/examples/src/main/java/org/apache/ignite/example/table/KeyValueViewExample.java
index 3ba05ef..dc44d1f 100644
--- a/examples/src/main/java/org/apache/ignite/example/table/KeyValueViewExample.java
+++ b/examples/src/main/java/org/apache/ignite/example/table/KeyValueViewExample.java
@@ -17,13 +17,12 @@
 
 package org.apache.ignite.example.table;
 
-import org.apache.ignite.client.IgniteClient;
-import org.apache.ignite.table.KeyValueView;
-import org.apache.ignite.table.Tuple;
-
 import java.sql.Connection;
 import java.sql.DriverManager;
 import java.sql.Statement;
+import org.apache.ignite.client.IgniteClient;
+import org.apache.ignite.table.KeyValueView;
+import org.apache.ignite.table.Tuple;
 
 /**
  * This example demonstrates the usage of the {@link KeyValueView} API.
@@ -53,16 +52,15 @@ public class KeyValueViewExample {
         //--------------------------------------------------------------------------------------
 
         try (
-            Connection conn = DriverManager.getConnection("jdbc:ignite:thin://127.0.0.1:10800/");
-            Statement stmt = conn.createStatement()
+                Connection conn = DriverManager.getConnection("jdbc:ignite:thin://127.0.0.1:10800/");
+                Statement stmt = conn.createStatement()
         ) {
             stmt.executeUpdate(
-                "CREATE TABLE accounts (" +
-                "    accountNumber INT PRIMARY KEY," +
-                "    firstName     VARCHAR," +
-                "    lastName      VARCHAR," +
-                "    balance       DOUBLE" +
-                ")"
+                    "CREATE TABLE accounts ("
+                            + "accountNumber INT PRIMARY KEY,"
+                            + "firstName     VARCHAR,"
+                            + "lastName      VARCHAR,"
+                            + "balance       DOUBLE)"
             );
         }
 
@@ -75,8 +73,8 @@ public class KeyValueViewExample {
         System.out.println("\nConnecting to server...");
 
         try (IgniteClient client = IgniteClient.builder()
-            .addresses("127.0.0.1:10800")
-            .build()
+                .addresses("127.0.0.1:10800")
+                .build()
         ) {
             //--------------------------------------------------------------------------------------
             //
@@ -95,12 +93,12 @@ public class KeyValueViewExample {
             System.out.println("\nInserting a key-value pair into the 'accounts' table...");
 
             Tuple key = Tuple.create()
-                .set("accountNumber", 123456);
+                    .set("accountNumber", 123456);
 
             Tuple value = Tuple.create()
-                .set("firstName", "Val")
-                .set("lastName", "Kulichenko")
-                .set("balance", 100.00d);
+                    .set("firstName", "Val")
+                    .set("lastName", "Kulichenko")
+                    .set("balance", 100.00d);
 
             kvView.put(null, key, value);
 
@@ -115,17 +113,17 @@ public class KeyValueViewExample {
             value = kvView.get(null, key);
 
             System.out.println(
-                "\nRetrieved value:\n" +
-                "    Account Number: " + key.intValue("accountNumber") + '\n' +
-                "    Owner: " + value.stringValue("firstName") + " " + value.stringValue("lastName") + '\n' +
-                "    Balance: $" + value.doubleValue("balance"));
+                    "\nRetrieved value:\n"
+                            + "    Account Number: " + key.intValue("accountNumber") + '\n'
+                            + "    Owner: " + value.stringValue("firstName") + " " + value.stringValue("lastName") + '\n'
+                            + "    Balance: $" + value.doubleValue("balance"));
         }
 
         System.out.println("\nDropping the table...");
 
         try (
-            Connection conn = DriverManager.getConnection("jdbc:ignite:thin://127.0.0.1:10800/");
-            Statement stmt = conn.createStatement()
+                Connection conn = DriverManager.getConnection("jdbc:ignite:thin://127.0.0.1:10800/");
+                Statement stmt = conn.createStatement()
         ) {
             stmt.executeUpdate("DROP TABLE accounts");
         }
diff --git a/examples/src/main/java/org/apache/ignite/example/table/KeyValueViewPojoExample.java b/examples/src/main/java/org/apache/ignite/example/table/KeyValueViewPojoExample.java
index c4f6063..62aa259 100644
--- a/examples/src/main/java/org/apache/ignite/example/table/KeyValueViewPojoExample.java
+++ b/examples/src/main/java/org/apache/ignite/example/table/KeyValueViewPojoExample.java
@@ -17,12 +17,11 @@
 
 package org.apache.ignite.example.table;
 
-import org.apache.ignite.client.IgniteClient;
-import org.apache.ignite.table.KeyValueView;
-
 import java.sql.Connection;
 import java.sql.DriverManager;
 import java.sql.Statement;
+import org.apache.ignite.client.IgniteClient;
+import org.apache.ignite.table.KeyValueView;
 
 /**
  * This example demonstrates the usage of the {@link KeyValueView} API.
@@ -52,16 +51,15 @@ public class KeyValueViewPojoExample {
         //--------------------------------------------------------------------------------------
 
         try (
-            Connection conn = DriverManager.getConnection("jdbc:ignite:thin://127.0.0.1:10800/");
-            Statement stmt = conn.createStatement()
+                Connection conn = DriverManager.getConnection("jdbc:ignite:thin://127.0.0.1:10800/");
+                Statement stmt = conn.createStatement()
         ) {
             stmt.executeUpdate(
-                "CREATE TABLE accounts (" +
-                "    accountNumber INT PRIMARY KEY," +
-                "    firstName     VARCHAR," +
-                "    lastName      VARCHAR," +
-                "    balance       DOUBLE" +
-                ")"
+                    "CREATE TABLE accounts ("
+                            + "accountNumber INT PRIMARY KEY,"
+                            + "firstName     VARCHAR,"
+                            + "lastName      VARCHAR,"
+                            + "balance       DOUBLE)"
             );
         }
 
@@ -74,8 +72,8 @@ public class KeyValueViewPojoExample {
         System.out.println("\nConnecting to server...");
 
         try (IgniteClient client = IgniteClient.builder()
-            .addresses("127.0.0.1:10800")
-            .build()
+                .addresses("127.0.0.1:10800")
+                .build()
         ) {
             //--------------------------------------------------------------------------------------
             //
@@ -84,8 +82,8 @@ public class KeyValueViewPojoExample {
             //--------------------------------------------------------------------------------------
 
             KeyValueView<AccountKey, Account> kvView = client.tables()
-                .table("PUBLIC.accounts")
-                .keyValueView(AccountKey.class, Account.class);
+                    .table("PUBLIC.accounts")
+                    .keyValueView(AccountKey.class, Account.class);
 
             //--------------------------------------------------------------------------------------
             //
@@ -98,9 +96,9 @@ public class KeyValueViewPojoExample {
             AccountKey key = new AccountKey(123456);
 
             Account value = new Account(
-                "Val",
-                "Kulichenko",
-                100.00d
+                    "Val",
+                    "Kulichenko",
+                    100.00d
             );
 
             kvView.put(null, key, value);
@@ -116,17 +114,17 @@ public class KeyValueViewPojoExample {
             value = kvView.get(null, key);
 
             System.out.println(
-                "\nRetrieved value:\n" +
-                "    Account Number: " + key.accountNumber + '\n' +
-                "    Owner: " + value.firstName + " " + value.lastName + '\n' +
-                "    Balance: $" + value.balance);
+                    "\nRetrieved value:\n"
+                        + "    Account Number: " + key.accountNumber + '\n'
+                        + "    Owner: " + value.firstName + " " + value.lastName + '\n'
+                        + "    Balance: $" + value.balance);
         }
 
         System.out.println("\nDropping the table...");
 
         try (
-            Connection conn = DriverManager.getConnection("jdbc:ignite:thin://127.0.0.1:10800/");
-            Statement stmt = conn.createStatement()
+                Connection conn = DriverManager.getConnection("jdbc:ignite:thin://127.0.0.1:10800/");
+                Statement stmt = conn.createStatement()
         ) {
             stmt.executeUpdate("DROP TABLE accounts");
         }
diff --git a/examples/src/main/java/org/apache/ignite/example/table/RecordViewExample.java b/examples/src/main/java/org/apache/ignite/example/table/RecordViewExample.java
index f14730c..7f3011a 100644
--- a/examples/src/main/java/org/apache/ignite/example/table/RecordViewExample.java
+++ b/examples/src/main/java/org/apache/ignite/example/table/RecordViewExample.java
@@ -17,13 +17,12 @@
 
 package org.apache.ignite.example.table;
 
-import org.apache.ignite.client.IgniteClient;
-import org.apache.ignite.table.RecordView;
-import org.apache.ignite.table.Tuple;
-
 import java.sql.Connection;
 import java.sql.DriverManager;
 import java.sql.Statement;
+import org.apache.ignite.client.IgniteClient;
+import org.apache.ignite.table.RecordView;
+import org.apache.ignite.table.Tuple;
 
 /**
  * This example demonstrates the usage of the {@link RecordView} API.
@@ -53,16 +52,15 @@ public class RecordViewExample {
         //--------------------------------------------------------------------------------------
 
         try (
-            Connection conn = DriverManager.getConnection("jdbc:ignite:thin://127.0.0.1:10800/");
-            Statement stmt = conn.createStatement()
+                Connection conn = DriverManager.getConnection("jdbc:ignite:thin://127.0.0.1:10800/");
+                Statement stmt = conn.createStatement()
         ) {
             stmt.executeUpdate(
-                "CREATE TABLE accounts (" +
-                "    accountNumber INT PRIMARY KEY," +
-                "    firstName     VARCHAR," +
-                "    lastName      VARCHAR," +
-                "    balance       DOUBLE" +
-                ")"
+                    "CREATE TABLE accounts ("
+                            + "accountNumber INT PRIMARY KEY,"
+                            + "firstName     VARCHAR,"
+                            + "lastName      VARCHAR,"
+                            + "balance       DOUBLE)"
             );
         }
 
@@ -75,8 +73,8 @@ public class RecordViewExample {
         System.out.println("\nConnecting to server...");
 
         try (IgniteClient client = IgniteClient.builder()
-            .addresses("127.0.0.1:10800")
-            .build()
+                .addresses("127.0.0.1:10800")
+                .build()
         ) {
             //--------------------------------------------------------------------------------------
             //
@@ -95,10 +93,10 @@ public class RecordViewExample {
             System.out.println("\nInserting a record into the 'accounts' table...");
 
             Tuple newAccountTuple = Tuple.create()
-                .set("accountNumber", 123456)
-                .set("firstName", "Val")
-                .set("lastName", "Kulichenko")
-                .set("balance", 100.00d);
+                    .set("accountNumber", 123456)
+                    .set("firstName", "Val")
+                    .set("lastName", "Kulichenko")
+                    .set("balance", 100.00d);
 
             accounts.insert(null, newAccountTuple);
 
@@ -115,16 +113,16 @@ public class RecordViewExample {
             Tuple accountTuple = accounts.get(null, accountNumberTuple);
 
             System.out.println(
-                "\nRetrieved record:\n" +
-                "    Account Number: " + accountTuple.intValue("accountNumber") + '\n' +
-                "    Owner: " + accountTuple.stringValue("firstName") + " " + accountTuple.stringValue("lastName") + '\n' +
-                "    Balance: $" + accountTuple.doubleValue("balance"));
+                    "\nRetrieved record:\n"
+                            + "    Account Number: " + accountTuple.intValue("accountNumber") + '\n'
+                            + "    Owner: " + accountTuple.stringValue("firstName") + " " + accountTuple.stringValue("lastName") + '\n'
+                            + "    Balance: $" + accountTuple.doubleValue("balance"));
 
             System.out.println("\nDropping the table...");
 
             try (
-                Connection conn = DriverManager.getConnection("jdbc:ignite:thin://127.0.0.1:10800/");
-                Statement stmt = conn.createStatement()
+                    Connection conn = DriverManager.getConnection("jdbc:ignite:thin://127.0.0.1:10800/");
+                    Statement stmt = conn.createStatement()
             ) {
                 stmt.executeUpdate("DROP TABLE accounts");
             }
diff --git a/examples/src/main/java/org/apache/ignite/example/table/RecordViewPojoExample.java b/examples/src/main/java/org/apache/ignite/example/table/RecordViewPojoExample.java
index c7e210e..6864d3c 100644
--- a/examples/src/main/java/org/apache/ignite/example/table/RecordViewPojoExample.java
+++ b/examples/src/main/java/org/apache/ignite/example/table/RecordViewPojoExample.java
@@ -17,12 +17,11 @@
 
 package org.apache.ignite.example.table;
 
-import org.apache.ignite.client.IgniteClient;
-import org.apache.ignite.table.RecordView;
-
 import java.sql.Connection;
 import java.sql.DriverManager;
 import java.sql.Statement;
+import org.apache.ignite.client.IgniteClient;
+import org.apache.ignite.table.RecordView;
 
 /**
  * This example demonstrates the usage of the {@link RecordView} API.
@@ -52,16 +51,15 @@ public class RecordViewPojoExample {
         //--------------------------------------------------------------------------------------
 
         try (
-            Connection conn = DriverManager.getConnection("jdbc:ignite:thin://127.0.0.1:10800/");
-            Statement stmt = conn.createStatement()
+                Connection conn = DriverManager.getConnection("jdbc:ignite:thin://127.0.0.1:10800/");
+                Statement stmt = conn.createStatement()
         ) {
             stmt.executeUpdate(
-                "CREATE TABLE accounts (" +
-                "    accountNumber INT PRIMARY KEY," +
-                "    firstName     VARCHAR," +
-                "    lastName      VARCHAR," +
-                "    balance       DOUBLE" +
-                ")"
+                    "CREATE TABLE accounts ("
+                            + "accountNumber INT PRIMARY KEY,"
+                            + "firstName     VARCHAR,"
+                            + "lastName      VARCHAR,"
+                            + "balance       DOUBLE)"
             );
         }
 
@@ -74,8 +72,8 @@ public class RecordViewPojoExample {
         System.out.println("\nConnecting to server...");
 
         try (IgniteClient client = IgniteClient.builder()
-            .addresses("127.0.0.1:10800")
-            .build()
+                .addresses("127.0.0.1:10800")
+                .build()
         ) {
             //--------------------------------------------------------------------------------------
             //
@@ -84,8 +82,8 @@ public class RecordViewPojoExample {
             //--------------------------------------------------------------------------------------
 
             RecordView<Account> accounts = client.tables()
-                .table("PUBLIC.accounts")
-                .recordView(Account.class);
+                    .table("PUBLIC.accounts")
+                    .recordView(Account.class);
 
             //--------------------------------------------------------------------------------------
             //
@@ -96,10 +94,10 @@ public class RecordViewPojoExample {
             System.out.println("\nInserting a record into the 'accounts' table...");
 
             Account newAccount = new Account(
-                123456,
-                "Val",
-                "Kulichenko",
-                100.00d
+                    123456,
+                    "Val",
+                    "Kulichenko",
+                    100.00d
             );
 
             accounts.insert(null, newAccount);
@@ -115,16 +113,16 @@ public class RecordViewPojoExample {
             Account account = accounts.get(null, new Account(123456));
 
             System.out.println(
-                "\nRetrieved record:\n" +
-                "    Account Number: " + account.accountNumber + '\n' +
-                "    Owner: " + account.firstName + " " + account.lastName + '\n' +
-                "    Balance: $" + account.balance);
+                    "\nRetrieved record:\n"
+                        + "    Account Number: " + account.accountNumber + '\n'
+                        + "    Owner: " + account.firstName + " " + account.lastName + '\n'
+                        + "    Balance: $" + account.balance);
 
             System.out.println("\nDropping the table...");
 
             try (
-                Connection conn = DriverManager.getConnection("jdbc:ignite:thin://127.0.0.1:10800/");
-                Statement stmt = conn.createStatement()
+                    Connection conn = DriverManager.getConnection("jdbc:ignite:thin://127.0.0.1:10800/");
+                    Statement stmt = conn.createStatement()
             ) {
                 stmt.executeUpdate("DROP TABLE accounts");
             }
diff --git a/examples/src/main/java/org/apache/ignite/example/tx/TransactionsExample.java b/examples/src/main/java/org/apache/ignite/example/tx/TransactionsExample.java
index 3d31409..c70246a 100644
--- a/examples/src/main/java/org/apache/ignite/example/tx/TransactionsExample.java
+++ b/examples/src/main/java/org/apache/ignite/example/tx/TransactionsExample.java
@@ -1,13 +1,12 @@
 package org.apache.ignite.example.tx;
 
-import org.apache.ignite.client.IgniteClient;
-import org.apache.ignite.table.KeyValueView;
-import org.apache.ignite.tx.IgniteTransactions;
-
 import java.sql.Connection;
 import java.sql.DriverManager;
 import java.sql.Statement;
 import java.util.concurrent.CompletableFuture;
+import org.apache.ignite.client.IgniteClient;
+import org.apache.ignite.table.KeyValueView;
+import org.apache.ignite.tx.IgniteTransactions;
 
 /**
  * This example demonstrates the usage of the {@link IgniteTransactions} API.
@@ -37,16 +36,15 @@ public class TransactionsExample {
         //--------------------------------------------------------------------------------------
 
         try (
-            Connection conn = DriverManager.getConnection("jdbc:ignite:thin://127.0.0.1:10800/");
-            Statement stmt = conn.createStatement()
+                Connection conn = DriverManager.getConnection("jdbc:ignite:thin://127.0.0.1:10800/");
+                Statement stmt = conn.createStatement()
         ) {
             stmt.executeUpdate(
-                "CREATE TABLE accounts (" +
-                "    accountNumber INT PRIMARY KEY," +
-                "    firstName     VARCHAR," +
-                "    lastName      VARCHAR," +
-                "    balance       DOUBLE" +
-                ")"
+                    "CREATE TABLE accounts ("
+                            + "accountNumber INT PRIMARY KEY,"
+                            + "firstName     VARCHAR,"
+                            + "lastName      VARCHAR,"
+                            + "balance       DOUBLE)"
             );
         }
 
@@ -59,8 +57,8 @@ public class TransactionsExample {
         System.out.println("\nConnecting to server...");
 
         try (IgniteClient client = IgniteClient.builder()
-            .addresses("127.0.0.1:10800")
-            .build()
+                .addresses("127.0.0.1:10800")
+                .build()
         ) {
             //--------------------------------------------------------------------------------------
             //
@@ -69,8 +67,8 @@ public class TransactionsExample {
             //--------------------------------------------------------------------------------------
 
             KeyValueView<AccountKey, Account> accounts = client.tables()
-                .table("PUBLIC.accounts")
-                .keyValueView(AccountKey.class, Account.class);
+                    .table("PUBLIC.accounts")
+                    .keyValueView(AccountKey.class, Account.class);
 
             final AccountKey key = new AccountKey(123);
 
@@ -101,14 +99,14 @@ public class TransactionsExample {
             //--------------------------------------------------------------------------------------
 
             CompletableFuture<Void> fut = client.transactions().beginAsync().thenCompose(tx ->
-                accounts
-                    .getAsync(tx, key)
-                    .thenCompose(account -> {
-                        account.balance += 300.0d;
-
-                        return accounts.putAsync(tx, key, account);
-                    })
-                    .thenCompose(ignored -> tx.commitAsync())
+                    accounts
+                        .getAsync(tx, key)
+                        .thenCompose(account -> {
+                            account.balance += 300.0d;
+
+                            return accounts.putAsync(tx, key, account);
+                        })
+                        .thenCompose(ignored -> tx.commitAsync())
             );
 
             // Wait for completion.
@@ -119,8 +117,8 @@ public class TransactionsExample {
             System.out.println("\nDropping the table...");
 
             try (
-                Connection conn = DriverManager.getConnection("jdbc:ignite:thin://127.0.0.1:10800/");
-                Statement stmt = conn.createStatement()
+                    Connection conn = DriverManager.getConnection("jdbc:ignite:thin://127.0.0.1:10800/");
+                    Statement stmt = conn.createStatement()
             ) {
                 stmt.executeUpdate("DROP TABLE accounts");
             }