You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by ak...@apache.org on 2017/04/08 11:20:10 UTC
[3/7] ignite git commit: IGNITE-4349 Discontinue the schema-import
utility.
http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/modules/schema-import/src/main/java/org/apache/ignite/schema/ui/TextColumnValidator.java
----------------------------------------------------------------------
diff --git a/modules/schema-import/src/main/java/org/apache/ignite/schema/ui/TextColumnValidator.java b/modules/schema-import/src/main/java/org/apache/ignite/schema/ui/TextColumnValidator.java
deleted file mode 100644
index 6ec044d..0000000
--- a/modules/schema-import/src/main/java/org/apache/ignite/schema/ui/TextColumnValidator.java
+++ /dev/null
@@ -1,32 +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.schema.ui;
-
-/**
- * Validator for editable table view text column.
- */
-public interface TextColumnValidator<T> {
- /**
- * Validate new value of text.
- *
- * @param rowVal Row value.
- * @param newVal New value of text.
- * @return {@code true} if text is valid.
- */
- public boolean valid(T rowVal, String newVal);
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/modules/schema-import/src/test/java/org/apache/ignite/schema/test/AbstractSchemaImportTest.java
----------------------------------------------------------------------
diff --git a/modules/schema-import/src/test/java/org/apache/ignite/schema/test/AbstractSchemaImportTest.java b/modules/schema-import/src/test/java/org/apache/ignite/schema/test/AbstractSchemaImportTest.java
deleted file mode 100644
index 8cb1196..0000000
--- a/modules/schema-import/src/test/java/org/apache/ignite/schema/test/AbstractSchemaImportTest.java
+++ /dev/null
@@ -1,181 +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.schema.test;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.sql.Connection;
-import java.sql.DriverManager;
-import java.sql.Statement;
-import java.util.ArrayList;
-import java.util.List;
-import junit.framework.TestCase;
-import org.apache.ignite.internal.util.typedef.internal.U;
-import org.apache.ignite.schema.model.PojoDescriptor;
-import org.apache.ignite.schema.parser.DatabaseMetadataParser;
-import org.apache.ignite.schema.ui.ConfirmCallable;
-import org.apache.ignite.schema.ui.MessageBox;
-
-/**
- * Base functional for Ignite Schema Import utility tests.
- */
-public abstract class AbstractSchemaImportTest extends TestCase {
- /** DB connection URL. */
- private static final String CONN_URL = "jdbc:h2:mem:autoCacheStore;DB_CLOSE_DELAY=-1";
-
- /** Path to temp folder where generated POJOs will be saved. */
- protected static final String OUT_DIR_PATH = System.getProperty("java.io.tmpdir") + "/ignite-schema-import/out";
-
- /** Auto confirmation of file conflicts. */
- protected static final ConfirmCallable YES_TO_ALL = new ConfirmCallable(null, "") {
- @Override public MessageBox.Result confirm(String msg) {
- return MessageBox.Result.YES_TO_ALL;
- }
- };
-
- /** List of ALL object parsed from test database. */
- protected List<PojoDescriptor> all;
-
- /** List of ONLY POJO descriptors. */
- protected List<PojoDescriptor> pojos;
-
- /** {@inheritDoc} */
- @Override public void setUp() throws Exception {
- Class.forName("org.h2.Driver");
-
- Connection conn = DriverManager.getConnection(CONN_URL, "sa", "");
-
- Statement stmt = conn.createStatement();
-
- stmt.executeUpdate("CREATE TABLE IF NOT EXISTS PRIMITIVES (pk INTEGER PRIMARY KEY, " +
- " boolCol BOOLEAN NOT NULL," +
- " byteCol TINYINT NOT NULL," +
- " shortCol SMALLINT NOT NULL," +
- " intCol INTEGER NOT NULL, " +
- " longCol BIGINT NOT NULL," +
- " floatCol REAL NOT NULL," +
- " doubleCol DOUBLE NOT NULL," +
- " doubleCol2 DOUBLE NOT NULL, " +
- " bigDecimalCol DECIMAL(10, 0)," +
- " strCol VARCHAR(10)," +
- " dateCol DATE," +
- " timeCol TIME," +
- " tsCol TIMESTAMP, " +
- " arrCol BINARY(10)," +
- " FIELD_WITH_ALIAS VARCHAR(10))");
-
- stmt.executeUpdate("CREATE TABLE IF NOT EXISTS OBJECTS (pk INTEGER PRIMARY KEY, " +
- " boolCol BOOLEAN," +
- " byteCol TINYINT," +
- " shortCol SMALLINT," +
- " intCol INTEGER," +
- " longCol BIGINT," +
- " floatCol REAL," +
- " doubleCol DOUBLE," +
- " doubleCol2 DOUBLE," +
- " bigDecimalCol DECIMAL(10, 0)," +
- " strCol VARCHAR(10), " +
- " dateCol DATE," +
- " timeCol TIME," +
- " tsCol TIMESTAMP," +
- " arrCol BINARY(10)," +
- " FIELD_WITH_ALIAS VARCHAR(10))");
-
- stmt.executeUpdate("CREATE INDEX IF NOT EXISTS IDX_1 ON OBJECTS (INTCOL ASC, LONGCOL ASC)");
-
- stmt.executeUpdate("CREATE INDEX IF NOT EXISTS IDX_2 ON OBJECTS (INTCOL ASC, LONGCOL DESC)");
-
- stmt.executeUpdate("CREATE SCHEMA IF NOT EXISTS TESTSCHEMA");
-
- stmt.executeUpdate("CREATE TABLE IF NOT EXISTS TESTSCHEMA.TST(pk INTEGER PRIMARY KEY, " +
- " boolCol BOOLEAN NOT NULL," +
- " byteCol TINYINT NOT NULL," +
- " shortCol SMALLINT NOT NULL," +
- " intCol INTEGER NOT NULL, " +
- " longCol BIGINT NOT NULL," +
- " floatCol REAL NOT NULL," +
- " doubleCol DOUBLE NOT NULL," +
- " doubleCol2 DOUBLE NOT NULL, " +
- " bigDecimalCol DECIMAL(10, 0)," +
- " strCol VARCHAR(10)," +
- " dateCol DATE," +
- " timeCol TIME," +
- " tsCol TIMESTAMP, " +
- " arrCol BINARY(10)," +
- " FIELD_WITH_ALIAS VARCHAR(10))");
-
- stmt.executeUpdate("CREATE INDEX IF NOT EXISTS IDX_3 ON TESTSCHEMA.TST (INTCOL ASC, LONGCOL ASC)");
-
- stmt.executeUpdate("CREATE INDEX IF NOT EXISTS IDX_4 ON TESTSCHEMA.TST (INTCOL ASC, LONGCOL DESC)");
-
- conn.commit();
-
- U.closeQuiet(stmt);
-
- List<String> schemas = new ArrayList<>();
-
- all = DatabaseMetadataParser.parse(conn, schemas, false);
-
- pojos = new ArrayList<>();
-
- for (PojoDescriptor pojo : all)
- if (pojo.parent() != null)
- pojos.add(pojo);
-
- U.closeQuiet(conn);
- }
-
- /**
- * Compare files by lines.
- *
- * @param exp Stream to read of expected file from test resources.
- * @param generated Generated file instance.
- * @param excludePtrn Marker string to exclude lines from comparing.
- * @return true if generated file correspond to expected.
- */
- protected boolean compareFilesInt(InputStream exp, File generated, String excludePtrn) {
- try (BufferedReader baseReader = new BufferedReader(new InputStreamReader(exp))) {
- try (BufferedReader generatedReader = new BufferedReader(new FileReader(generated))) {
- String baseLine;
-
- while ((baseLine = baseReader.readLine()) != null) {
- String generatedLine = generatedReader.readLine();
-
- if (!baseLine.equals(generatedLine) && !baseLine.contains(excludePtrn)
- && !generatedLine.contains(excludePtrn)) {
- System.out.println("Generated file: " + generated.toString());
- System.out.println("Expected: " + baseLine);
- System.out.println("Generated: " + generatedLine);
-
- return false;
- }
- }
-
- return true;
- }
- } catch (IOException e) {
- e.printStackTrace();
-
- return false;
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/modules/schema-import/src/test/java/org/apache/ignite/schema/test/generator/CodeGeneratorTest.java
----------------------------------------------------------------------
diff --git a/modules/schema-import/src/test/java/org/apache/ignite/schema/test/generator/CodeGeneratorTest.java b/modules/schema-import/src/test/java/org/apache/ignite/schema/test/generator/CodeGeneratorTest.java
deleted file mode 100644
index 0917139..0000000
--- a/modules/schema-import/src/test/java/org/apache/ignite/schema/test/generator/CodeGeneratorTest.java
+++ /dev/null
@@ -1,81 +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.schema.test.generator;
-
-import java.io.File;
-import org.apache.ignite.schema.generator.CodeGenerator;
-import org.apache.ignite.schema.model.PojoDescriptor;
-import org.apache.ignite.schema.test.AbstractSchemaImportTest;
-
-/**
- * Tests for POJO generator.
- */
-public class CodeGeneratorTest extends AbstractSchemaImportTest {
- /** Marker string to skip date generation while comparing.*/
- private static final String GEN_PTRN = "Code generated by Apache Ignite Schema Import utility";
-
- /** Test package. */
- private static final String TEST_PACKAGE = "org.apache.ignite.schema.test.model";
-
- /** Path to generated model. */
- private static final String TEST_PATH = "org/apache/ignite/schema/test/model";
-
- /**
- * Test that POJOs generated correctly.
- */
- public void testPojoGeneration() throws Exception {
- Boolean containsSchema = false;
-
- for (PojoDescriptor pojo : all) {
- if (pojo.valueClassName().isEmpty())
- containsSchema = true;
- else {
- CodeGenerator.pojos(pojo, OUT_DIR_PATH, TEST_PACKAGE, true, true, YES_TO_ALL);
-
- assertTrue("Generated key class POJO content is differ from expected for type " + pojo.keyClassName(),
- compareFiles(pojo.keyClassName(), TEST_PATH, GEN_PTRN));
-
- assertTrue("Generated value class POJO content is differ from expected for type " + pojo.valueClassName(),
- compareFiles(pojo.valueClassName(), TEST_PATH, GEN_PTRN));
- }
- }
-
- assertTrue("Generated POJOs does not contains schema.", containsSchema);
- }
-
- /**
- * Test that configuration generated correctly.
- */
- public void testConfigGeneration() throws Exception {
- CodeGenerator.snippet(pojos, TEST_PACKAGE, true, true, OUT_DIR_PATH, YES_TO_ALL);
-
- assertTrue("Generated configuration is differ from expected", compareFiles("CacheConfig", TEST_PATH, GEN_PTRN));
- }
-
- /**
- * @param typeName Type name.
- * @param intPath Internal path.
- * @return {@code true} if generated POJO as expected.
- */
- private boolean compareFiles(String typeName, String intPath, String excludePtrn) {
- String relPath = intPath + "/" + typeName;
-
- return compareFilesInt(getClass().getResourceAsStream("/" + relPath + ".txt"),
- new File(OUT_DIR_PATH + "/" + relPath + ".java"), excludePtrn);
- }
-}
http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/modules/schema-import/src/test/java/org/apache/ignite/schema/test/generator/XmlGeneratorTest.java
----------------------------------------------------------------------
diff --git a/modules/schema-import/src/test/java/org/apache/ignite/schema/test/generator/XmlGeneratorTest.java b/modules/schema-import/src/test/java/org/apache/ignite/schema/test/generator/XmlGeneratorTest.java
deleted file mode 100644
index 8b12392..0000000
--- a/modules/schema-import/src/test/java/org/apache/ignite/schema/test/generator/XmlGeneratorTest.java
+++ /dev/null
@@ -1,42 +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.schema.test.generator;
-
-import java.io.File;
-import org.apache.ignite.schema.generator.XmlGenerator;
-import org.apache.ignite.schema.test.AbstractSchemaImportTest;
-
-/**
- * Tests for XML generator.
- */
-public class XmlGeneratorTest extends AbstractSchemaImportTest {
- /** */
- private static final String TEST_XML_FILE_NAME = "ignite-type-metadata.xml";
-
- /**
- * Test that XML generated correctly.
- */
- public void testXmlGeneration() throws Exception {
- XmlGenerator.generate("org.apache.ignite.schema.test.model", pojos, true, true,
- new File(OUT_DIR_PATH, TEST_XML_FILE_NAME), YES_TO_ALL);
-
- assertTrue("Generated XML file content is differ from expected one",
- compareFilesInt(getClass().getResourceAsStream("/org/apache/ignite/schema/test/model/" + TEST_XML_FILE_NAME),
- new File(OUT_DIR_PATH, TEST_XML_FILE_NAME), "XML generated by Apache Ignite Schema Import utility"));
- }
-}
http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/modules/schema-import/src/test/java/org/apache/ignite/schema/test/model/CacheConfig.txt
----------------------------------------------------------------------
diff --git a/modules/schema-import/src/test/java/org/apache/ignite/schema/test/model/CacheConfig.txt b/modules/schema-import/src/test/java/org/apache/ignite/schema/test/model/CacheConfig.txt
deleted file mode 100644
index 9573eb7..0000000
--- a/modules/schema-import/src/test/java/org/apache/ignite/schema/test/model/CacheConfig.txt
+++ /dev/null
@@ -1,409 +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.schema.test.model;
-
-import java.sql.*;
-import java.util.*;
-
-import org.apache.ignite.cache.*;
-import org.apache.ignite.cache.store.jdbc.*;
-import org.apache.ignite.configuration.*;
-
-/**
- * CacheConfig definition.
- *
- * Code generated by Apache Ignite Schema Import utility: 08/18/2016.
- */
-public class CacheConfig {
- /**
- * Create JDBC type for OBJECTS.
- *
- * @param cacheName Cache name.
- * @return Configured JDBC type.
- */
- private static JdbcType jdbcTypeObjects(String cacheName) {
- JdbcType jdbcType = new JdbcType();
-
- jdbcType.setCacheName(cacheName);
- jdbcType.setDatabaseSchema("PUBLIC");
- jdbcType.setDatabaseTable("OBJECTS");
- jdbcType.setKeyType("org.apache.ignite.schema.test.model.ObjectsKey");
- jdbcType.setValueType("org.apache.ignite.schema.test.model.Objects");
-
- // Key fields for OBJECTS.
- Collection<JdbcTypeField> keys = new ArrayList<>();
- keys.add(new JdbcTypeField(Types.INTEGER, "PK", int.class, "pk"));
- jdbcType.setKeyFields(keys.toArray(new JdbcTypeField[keys.size()]));
-
- // Value fields for OBJECTS.
- Collection<JdbcTypeField> vals = new ArrayList<>();
- vals.add(new JdbcTypeField(Types.INTEGER, "PK", int.class, "pk"));
- vals.add(new JdbcTypeField(Types.BOOLEAN, "BOOLCOL", Boolean.class, "boolcol"));
- vals.add(new JdbcTypeField(Types.TINYINT, "BYTECOL", Byte.class, "bytecol"));
- vals.add(new JdbcTypeField(Types.SMALLINT, "SHORTCOL", Short.class, "shortcol"));
- vals.add(new JdbcTypeField(Types.INTEGER, "INTCOL", Integer.class, "intcol"));
- vals.add(new JdbcTypeField(Types.BIGINT, "LONGCOL", Long.class, "longcol"));
- vals.add(new JdbcTypeField(Types.REAL, "FLOATCOL", Float.class, "floatcol"));
- vals.add(new JdbcTypeField(Types.DOUBLE, "DOUBLECOL", Double.class, "doublecol"));
- vals.add(new JdbcTypeField(Types.DOUBLE, "DOUBLECOL2", Double.class, "doublecol2"));
- vals.add(new JdbcTypeField(Types.DECIMAL, "BIGDECIMALCOL", java.math.BigDecimal.class, "bigdecimalcol"));
- vals.add(new JdbcTypeField(Types.VARCHAR, "STRCOL", String.class, "strcol"));
- vals.add(new JdbcTypeField(Types.DATE, "DATECOL", java.sql.Date.class, "datecol"));
- vals.add(new JdbcTypeField(Types.TIME, "TIMECOL", java.sql.Time.class, "timecol"));
- vals.add(new JdbcTypeField(Types.TIMESTAMP, "TSCOL", java.sql.Timestamp.class, "tscol"));
- vals.add(new JdbcTypeField(Types.VARBINARY, "ARRCOL", Object.class, "arrcol"));
- vals.add(new JdbcTypeField(Types.VARCHAR, "FIELD_WITH_ALIAS", String.class, "fieldWithAlias"));
- jdbcType.setValueFields(vals.toArray(new JdbcTypeField[vals.size()]));
-
- return jdbcType;
- }
-
- /**
- * Create SQL Query descriptor for OBJECTS.
- *
- * @return Configured query entity.
- */
- private static QueryEntity queryEntityObjects() {
- QueryEntity qryEntity = new QueryEntity();
-
- qryEntity.setKeyType("org.apache.ignite.schema.test.model.ObjectsKey");
- qryEntity.setValueType("org.apache.ignite.schema.test.model.Objects");
-
- // Query fields for OBJECTS.
- LinkedHashMap<String, String> fields = new LinkedHashMap<>();
-
- fields.put("pk", "java.lang.Integer");
- fields.put("boolcol", "java.lang.Boolean");
- fields.put("bytecol", "java.lang.Byte");
- fields.put("shortcol", "java.lang.Short");
- fields.put("intcol", "java.lang.Integer");
- fields.put("longcol", "java.lang.Long");
- fields.put("floatcol", "java.lang.Float");
- fields.put("doublecol", "java.lang.Double");
- fields.put("doublecol2", "java.lang.Double");
- fields.put("bigdecimalcol", "java.math.BigDecimal");
- fields.put("strcol", "java.lang.String");
- fields.put("datecol", "java.sql.Date");
- fields.put("timecol", "java.sql.Time");
- fields.put("tscol", "java.sql.Timestamp");
- fields.put("arrcol", "java.lang.Object");
- fields.put("fieldWithAlias", "java.lang.String");
-
- qryEntity.setFields(fields);
-
- // Aliases for fields.
- Map<String, String> aliases = new HashMap<>();
-
- aliases.put("fieldWithAlias", "FIELD_WITH_ALIAS");
-
- qryEntity.setAliases(aliases);
-
- // Indexes for OBJECTS.
- Collection<QueryIndex> idxs = new ArrayList<>();
-
- idxs.add(new QueryIndex("pk", true, "PRIMARY_KEY_C"));
-
- QueryIndex idx = new QueryIndex();
-
- idx.setName("IDX_1");
-
- idx.setIndexType(QueryIndexType.SORTED);
-
- LinkedHashMap<String, Boolean> idxFlds = new LinkedHashMap<>();
-
- idxFlds.put("intcol", true);
- idxFlds.put("longcol", true);
-
- idx.setFields(idxFlds);
-
- idxs.add(idx);
-
- idx = new QueryIndex();
-
- idx.setName("IDX_2");
-
- idx.setIndexType(QueryIndexType.SORTED);
-
- idxFlds = new LinkedHashMap<>();
-
- idxFlds.put("intcol", true);
- idxFlds.put("longcol", false);
-
- idx.setFields(idxFlds);
-
- idxs.add(idx);
-
- qryEntity.setIndexes(idxs);
-
- return qryEntity;
- }
-
- /**
- * Create JDBC type for PRIMITIVES.
- *
- * @param cacheName Cache name.
- * @return Configured JDBC type.
- */
- private static JdbcType jdbcTypePrimitives(String cacheName) {
- JdbcType jdbcType = new JdbcType();
-
- jdbcType.setCacheName(cacheName);
- jdbcType.setDatabaseSchema("PUBLIC");
- jdbcType.setDatabaseTable("PRIMITIVES");
- jdbcType.setKeyType("org.apache.ignite.schema.test.model.PrimitivesKey");
- jdbcType.setValueType("org.apache.ignite.schema.test.model.Primitives");
-
- // Key fields for PRIMITIVES.
- Collection<JdbcTypeField> keys = new ArrayList<>();
- keys.add(new JdbcTypeField(Types.INTEGER, "PK", int.class, "pk"));
- jdbcType.setKeyFields(keys.toArray(new JdbcTypeField[keys.size()]));
-
- // Value fields for PRIMITIVES.
- Collection<JdbcTypeField> vals = new ArrayList<>();
- vals.add(new JdbcTypeField(Types.INTEGER, "PK", int.class, "pk"));
- vals.add(new JdbcTypeField(Types.BOOLEAN, "BOOLCOL", boolean.class, "boolcol"));
- vals.add(new JdbcTypeField(Types.TINYINT, "BYTECOL", byte.class, "bytecol"));
- vals.add(new JdbcTypeField(Types.SMALLINT, "SHORTCOL", short.class, "shortcol"));
- vals.add(new JdbcTypeField(Types.INTEGER, "INTCOL", int.class, "intcol"));
- vals.add(new JdbcTypeField(Types.BIGINT, "LONGCOL", long.class, "longcol"));
- vals.add(new JdbcTypeField(Types.REAL, "FLOATCOL", float.class, "floatcol"));
- vals.add(new JdbcTypeField(Types.DOUBLE, "DOUBLECOL", double.class, "doublecol"));
- vals.add(new JdbcTypeField(Types.DOUBLE, "DOUBLECOL2", double.class, "doublecol2"));
- vals.add(new JdbcTypeField(Types.DECIMAL, "BIGDECIMALCOL", java.math.BigDecimal.class, "bigdecimalcol"));
- vals.add(new JdbcTypeField(Types.VARCHAR, "STRCOL", String.class, "strcol"));
- vals.add(new JdbcTypeField(Types.DATE, "DATECOL", java.sql.Date.class, "datecol"));
- vals.add(new JdbcTypeField(Types.TIME, "TIMECOL", java.sql.Time.class, "timecol"));
- vals.add(new JdbcTypeField(Types.TIMESTAMP, "TSCOL", java.sql.Timestamp.class, "tscol"));
- vals.add(new JdbcTypeField(Types.VARBINARY, "ARRCOL", Object.class, "arrcol"));
- vals.add(new JdbcTypeField(Types.VARCHAR, "FIELD_WITH_ALIAS", String.class, "fieldWithAlias"));
- jdbcType.setValueFields(vals.toArray(new JdbcTypeField[vals.size()]));
-
- return jdbcType;
- }
-
- /**
- * Create SQL Query descriptor for PRIMITIVES.
- *
- * @return Configured query entity.
- */
- private static QueryEntity queryEntityPrimitives() {
- QueryEntity qryEntity = new QueryEntity();
-
- qryEntity.setKeyType("org.apache.ignite.schema.test.model.PrimitivesKey");
- qryEntity.setValueType("org.apache.ignite.schema.test.model.Primitives");
-
- // Query fields for PRIMITIVES.
- LinkedHashMap<String, String> fields = new LinkedHashMap<>();
-
- fields.put("pk", "java.lang.Integer");
- fields.put("boolcol", "java.lang.Boolean");
- fields.put("bytecol", "java.lang.Byte");
- fields.put("shortcol", "java.lang.Short");
- fields.put("intcol", "java.lang.Integer");
- fields.put("longcol", "java.lang.Long");
- fields.put("floatcol", "java.lang.Float");
- fields.put("doublecol", "java.lang.Double");
- fields.put("doublecol2", "java.lang.Double");
- fields.put("bigdecimalcol", "java.math.BigDecimal");
- fields.put("strcol", "java.lang.String");
- fields.put("datecol", "java.sql.Date");
- fields.put("timecol", "java.sql.Time");
- fields.put("tscol", "java.sql.Timestamp");
- fields.put("arrcol", "java.lang.Object");
- fields.put("fieldWithAlias", "java.lang.String");
-
- qryEntity.setFields(fields);
-
- // Aliases for fields.
- Map<String, String> aliases = new HashMap<>();
-
- aliases.put("fieldWithAlias", "FIELD_WITH_ALIAS");
-
- qryEntity.setAliases(aliases);
-
- // Indexes for PRIMITIVES.
- Collection<QueryIndex> idxs = new ArrayList<>();
-
- idxs.add(new QueryIndex("pk", true, "PRIMARY_KEY_D"));
-
- qryEntity.setIndexes(idxs);
-
- return qryEntity;
- }
-
- /**
- * Create JDBC type for TST.
- *
- * @param cacheName Cache name.
- * @return Configured JDBC type.
- */
- private static JdbcType jdbcTypeTst(String cacheName) {
- JdbcType jdbcType = new JdbcType();
-
- jdbcType.setCacheName(cacheName);
- jdbcType.setDatabaseSchema("TESTSCHEMA");
- jdbcType.setDatabaseTable("TST");
- jdbcType.setKeyType("org.apache.ignite.schema.test.model.TstKey");
- jdbcType.setValueType("org.apache.ignite.schema.test.model.Tst");
-
- // Key fields for TST.
- Collection<JdbcTypeField> keys = new ArrayList<>();
- keys.add(new JdbcTypeField(Types.INTEGER, "PK", int.class, "pk"));
- jdbcType.setKeyFields(keys.toArray(new JdbcTypeField[keys.size()]));
-
- // Value fields for TST.
- Collection<JdbcTypeField> vals = new ArrayList<>();
- vals.add(new JdbcTypeField(Types.INTEGER, "PK", int.class, "pk"));
- vals.add(new JdbcTypeField(Types.BOOLEAN, "BOOLCOL", boolean.class, "boolcol"));
- vals.add(new JdbcTypeField(Types.TINYINT, "BYTECOL", byte.class, "bytecol"));
- vals.add(new JdbcTypeField(Types.SMALLINT, "SHORTCOL", short.class, "shortcol"));
- vals.add(new JdbcTypeField(Types.INTEGER, "INTCOL", int.class, "intcol"));
- vals.add(new JdbcTypeField(Types.BIGINT, "LONGCOL", long.class, "longcol"));
- vals.add(new JdbcTypeField(Types.REAL, "FLOATCOL", float.class, "floatcol"));
- vals.add(new JdbcTypeField(Types.DOUBLE, "DOUBLECOL", double.class, "doublecol"));
- vals.add(new JdbcTypeField(Types.DOUBLE, "DOUBLECOL2", double.class, "doublecol2"));
- vals.add(new JdbcTypeField(Types.DECIMAL, "BIGDECIMALCOL", java.math.BigDecimal.class, "bigdecimalcol"));
- vals.add(new JdbcTypeField(Types.VARCHAR, "STRCOL", String.class, "strcol"));
- vals.add(new JdbcTypeField(Types.DATE, "DATECOL", java.sql.Date.class, "datecol"));
- vals.add(new JdbcTypeField(Types.TIME, "TIMECOL", java.sql.Time.class, "timecol"));
- vals.add(new JdbcTypeField(Types.TIMESTAMP, "TSCOL", java.sql.Timestamp.class, "tscol"));
- vals.add(new JdbcTypeField(Types.VARBINARY, "ARRCOL", Object.class, "arrcol"));
- vals.add(new JdbcTypeField(Types.VARCHAR, "FIELD_WITH_ALIAS", String.class, "fieldWithAlias"));
- jdbcType.setValueFields(vals.toArray(new JdbcTypeField[vals.size()]));
-
- return jdbcType;
- }
-
- /**
- * Create SQL Query descriptor for TST.
- *
- * @return Configured query entity.
- */
- private static QueryEntity queryEntityTst() {
- QueryEntity qryEntity = new QueryEntity();
-
- qryEntity.setKeyType("org.apache.ignite.schema.test.model.TstKey");
- qryEntity.setValueType("org.apache.ignite.schema.test.model.Tst");
-
- // Query fields for TST.
- LinkedHashMap<String, String> fields = new LinkedHashMap<>();
-
- fields.put("pk", "java.lang.Integer");
- fields.put("boolcol", "java.lang.Boolean");
- fields.put("bytecol", "java.lang.Byte");
- fields.put("shortcol", "java.lang.Short");
- fields.put("intcol", "java.lang.Integer");
- fields.put("longcol", "java.lang.Long");
- fields.put("floatcol", "java.lang.Float");
- fields.put("doublecol", "java.lang.Double");
- fields.put("doublecol2", "java.lang.Double");
- fields.put("bigdecimalcol", "java.math.BigDecimal");
- fields.put("strcol", "java.lang.String");
- fields.put("datecol", "java.sql.Date");
- fields.put("timecol", "java.sql.Time");
- fields.put("tscol", "java.sql.Timestamp");
- fields.put("arrcol", "java.lang.Object");
- fields.put("fieldWithAlias", "java.lang.String");
-
- qryEntity.setFields(fields);
-
- // Aliases for fields.
- Map<String, String> aliases = new HashMap<>();
-
- aliases.put("fieldWithAlias", "FIELD_WITH_ALIAS");
-
- qryEntity.setAliases(aliases);
-
- // Indexes for TST.
- Collection<QueryIndex> idxs = new ArrayList<>();
-
- idxs.add(new QueryIndex("pk", true, "PRIMARY_KEY_1"));
-
- QueryIndex idx = new QueryIndex();
-
- idx.setName("IDX_3");
-
- idx.setIndexType(QueryIndexType.SORTED);
-
- LinkedHashMap<String, Boolean> idxFlds = new LinkedHashMap<>();
-
- idxFlds.put("intcol", true);
- idxFlds.put("longcol", true);
-
- idx.setFields(idxFlds);
-
- idxs.add(idx);
-
- idx = new QueryIndex();
-
- idx.setName("IDX_4");
-
- idx.setIndexType(QueryIndexType.SORTED);
-
- idxFlds = new LinkedHashMap<>();
-
- idxFlds.put("intcol", true);
- idxFlds.put("longcol", false);
-
- idx.setFields(idxFlds);
-
- idxs.add(idx);
-
- qryEntity.setIndexes(idxs);
-
- return qryEntity;
- }
-
- /**
- * Configure cache.
- *
- * @param cacheName Cache name.
- * @param storeFactory Cache store factory.
- * @return Cache configuration.
- */
- public static <K, V> CacheConfiguration<K, V> cache(String cacheName, CacheJdbcPojoStoreFactory<K, V> storeFactory) {
- if (storeFactory == null)
- throw new IllegalArgumentException("Cache store factory cannot be null.");
-
- CacheConfiguration<K, V> ccfg = new CacheConfiguration<>(cacheName);
-
- ccfg.setCacheStoreFactory(storeFactory);
- ccfg.setReadThrough(true);
- ccfg.setWriteThrough(true);
-
- // Configure JDBC types.
- Collection<JdbcType> jdbcTypes = new ArrayList<>();
-
- jdbcTypes.add(jdbcTypeObjects(cacheName));
- jdbcTypes.add(jdbcTypePrimitives(cacheName));
- jdbcTypes.add(jdbcTypeTst(cacheName));
-
- storeFactory.setTypes(jdbcTypes.toArray(new JdbcType[jdbcTypes.size()]));
-
- // Configure query entities.
- Collection<QueryEntity> qryEntities = new ArrayList<>();
-
- qryEntities.add(queryEntityObjects());
- qryEntities.add(queryEntityPrimitives());
- qryEntities.add(queryEntityTst());
-
- ccfg.setQueryEntities(qryEntities);
-
- return ccfg;
- }
-}
http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/modules/schema-import/src/test/java/org/apache/ignite/schema/test/model/Objects.txt
----------------------------------------------------------------------
diff --git a/modules/schema-import/src/test/java/org/apache/ignite/schema/test/model/Objects.txt b/modules/schema-import/src/test/java/org/apache/ignite/schema/test/model/Objects.txt
deleted file mode 100644
index 380191b..0000000
--- a/modules/schema-import/src/test/java/org/apache/ignite/schema/test/model/Objects.txt
+++ /dev/null
@@ -1,531 +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.schema.test.model;
-
-import java.io.*;
-
-/**
- * Objects definition.
- *
- * Code generated by Apache Ignite Schema Import utility: 01/27/2015.
- */
-public class Objects implements Serializable {
- /** */
- private static final long serialVersionUID = 0L;
-
- /** Value for pk. */
- private int pk;
-
- /** Value for boolcol. */
- private Boolean boolcol;
-
- /** Value for bytecol. */
- private Byte bytecol;
-
- /** Value for shortcol. */
- private Short shortcol;
-
- /** Value for intcol. */
- private Integer intcol;
-
- /** Value for longcol. */
- private Long longcol;
-
- /** Value for floatcol. */
- private Float floatcol;
-
- /** Value for doublecol. */
- private Double doublecol;
-
- /** Value for doublecol2. */
- private Double doublecol2;
-
- /** Value for bigdecimalcol. */
- private java.math.BigDecimal bigdecimalcol;
-
- /** Value for strcol. */
- private String strcol;
-
- /** Value for datecol. */
- private java.sql.Date datecol;
-
- /** Value for timecol. */
- private java.sql.Time timecol;
-
- /** Value for tscol. */
- private java.sql.Timestamp tscol;
-
- /** Value for arrcol. */
- private Object arrcol;
-
- /** Value for fieldWithAlias. */
- private String fieldWithAlias;
-
- /**
- * Empty constructor.
- */
- public Objects() {
- // No-op.
- }
-
- /**
- * Full constructor.
- */
- public Objects(
- int pk,
- Boolean boolcol,
- Byte bytecol,
- Short shortcol,
- Integer intcol,
- Long longcol,
- Float floatcol,
- Double doublecol,
- Double doublecol2,
- java.math.BigDecimal bigdecimalcol,
- String strcol,
- java.sql.Date datecol,
- java.sql.Time timecol,
- java.sql.Timestamp tscol,
- Object arrcol,
- String fieldWithAlias
- ) {
- this.pk = pk;
- this.boolcol = boolcol;
- this.bytecol = bytecol;
- this.shortcol = shortcol;
- this.intcol = intcol;
- this.longcol = longcol;
- this.floatcol = floatcol;
- this.doublecol = doublecol;
- this.doublecol2 = doublecol2;
- this.bigdecimalcol = bigdecimalcol;
- this.strcol = strcol;
- this.datecol = datecol;
- this.timecol = timecol;
- this.tscol = tscol;
- this.arrcol = arrcol;
- this.fieldWithAlias = fieldWithAlias;
- }
-
- /**
- * Gets pk.
- *
- * @return Value for pk.
- */
- public int getPk() {
- return pk;
- }
-
- /**
- * Sets pk.
- *
- * @param pk New value for pk.
- */
- public void setPk(int pk) {
- this.pk = pk;
- }
-
- /**
- * Gets boolcol.
- *
- * @return Value for boolcol.
- */
- public Boolean getBoolcol() {
- return boolcol;
- }
-
- /**
- * Sets boolcol.
- *
- * @param boolcol New value for boolcol.
- */
- public void setBoolcol(Boolean boolcol) {
- this.boolcol = boolcol;
- }
-
- /**
- * Gets bytecol.
- *
- * @return Value for bytecol.
- */
- public Byte getBytecol() {
- return bytecol;
- }
-
- /**
- * Sets bytecol.
- *
- * @param bytecol New value for bytecol.
- */
- public void setBytecol(Byte bytecol) {
- this.bytecol = bytecol;
- }
-
- /**
- * Gets shortcol.
- *
- * @return Value for shortcol.
- */
- public Short getShortcol() {
- return shortcol;
- }
-
- /**
- * Sets shortcol.
- *
- * @param shortcol New value for shortcol.
- */
- public void setShortcol(Short shortcol) {
- this.shortcol = shortcol;
- }
-
- /**
- * Gets intcol.
- *
- * @return Value for intcol.
- */
- public Integer getIntcol() {
- return intcol;
- }
-
- /**
- * Sets intcol.
- *
- * @param intcol New value for intcol.
- */
- public void setIntcol(Integer intcol) {
- this.intcol = intcol;
- }
-
- /**
- * Gets longcol.
- *
- * @return Value for longcol.
- */
- public Long getLongcol() {
- return longcol;
- }
-
- /**
- * Sets longcol.
- *
- * @param longcol New value for longcol.
- */
- public void setLongcol(Long longcol) {
- this.longcol = longcol;
- }
-
- /**
- * Gets floatcol.
- *
- * @return Value for floatcol.
- */
- public Float getFloatcol() {
- return floatcol;
- }
-
- /**
- * Sets floatcol.
- *
- * @param floatcol New value for floatcol.
- */
- public void setFloatcol(Float floatcol) {
- this.floatcol = floatcol;
- }
-
- /**
- * Gets doublecol.
- *
- * @return Value for doublecol.
- */
- public Double getDoublecol() {
- return doublecol;
- }
-
- /**
- * Sets doublecol.
- *
- * @param doublecol New value for doublecol.
- */
- public void setDoublecol(Double doublecol) {
- this.doublecol = doublecol;
- }
-
- /**
- * Gets doublecol2.
- *
- * @return Value for doublecol2.
- */
- public Double getDoublecol2() {
- return doublecol2;
- }
-
- /**
- * Sets doublecol2.
- *
- * @param doublecol2 New value for doublecol2.
- */
- public void setDoublecol2(Double doublecol2) {
- this.doublecol2 = doublecol2;
- }
-
- /**
- * Gets bigdecimalcol.
- *
- * @return Value for bigdecimalcol.
- */
- public java.math.BigDecimal getBigdecimalcol() {
- return bigdecimalcol;
- }
-
- /**
- * Sets bigdecimalcol.
- *
- * @param bigdecimalcol New value for bigdecimalcol.
- */
- public void setBigdecimalcol(java.math.BigDecimal bigdecimalcol) {
- this.bigdecimalcol = bigdecimalcol;
- }
-
- /**
- * Gets strcol.
- *
- * @return Value for strcol.
- */
- public String getStrcol() {
- return strcol;
- }
-
- /**
- * Sets strcol.
- *
- * @param strcol New value for strcol.
- */
- public void setStrcol(String strcol) {
- this.strcol = strcol;
- }
-
- /**
- * Gets datecol.
- *
- * @return Value for datecol.
- */
- public java.sql.Date getDatecol() {
- return datecol;
- }
-
- /**
- * Sets datecol.
- *
- * @param datecol New value for datecol.
- */
- public void setDatecol(java.sql.Date datecol) {
- this.datecol = datecol;
- }
-
- /**
- * Gets timecol.
- *
- * @return Value for timecol.
- */
- public java.sql.Time getTimecol() {
- return timecol;
- }
-
- /**
- * Sets timecol.
- *
- * @param timecol New value for timecol.
- */
- public void setTimecol(java.sql.Time timecol) {
- this.timecol = timecol;
- }
-
- /**
- * Gets tscol.
- *
- * @return Value for tscol.
- */
- public java.sql.Timestamp getTscol() {
- return tscol;
- }
-
- /**
- * Sets tscol.
- *
- * @param tscol New value for tscol.
- */
- public void setTscol(java.sql.Timestamp tscol) {
- this.tscol = tscol;
- }
-
- /**
- * Gets arrcol.
- *
- * @return Value for arrcol.
- */
- public Object getArrcol() {
- return arrcol;
- }
-
- /**
- * Sets arrcol.
- *
- * @param arrcol New value for arrcol.
- */
- public void setArrcol(Object arrcol) {
- this.arrcol = arrcol;
- }
-
- /**
- * Gets fieldWithAlias.
- *
- * @return Value for fieldWithAlias.
- */
- public String getFieldWithAlias() {
- return fieldWithAlias;
- }
-
- /**
- * Sets fieldWithAlias.
- *
- * @param fieldWithAlias New value for fieldWithAlias.
- */
- public void setFieldWithAlias(String fieldWithAlias) {
- this.fieldWithAlias = fieldWithAlias;
- }
-
- /** {@inheritDoc} */
- @Override public boolean equals(Object o) {
- if (this == o)
- return true;
-
- if (!(o instanceof Objects))
- return false;
-
- Objects that = (Objects)o;
-
- if (pk != that.pk)
- return false;
-
- if (boolcol != null ? !boolcol.equals(that.boolcol) : that.boolcol != null)
- return false;
-
- if (bytecol != null ? !bytecol.equals(that.bytecol) : that.bytecol != null)
- return false;
-
- if (shortcol != null ? !shortcol.equals(that.shortcol) : that.shortcol != null)
- return false;
-
- if (intcol != null ? !intcol.equals(that.intcol) : that.intcol != null)
- return false;
-
- if (longcol != null ? !longcol.equals(that.longcol) : that.longcol != null)
- return false;
-
- if (floatcol != null ? !floatcol.equals(that.floatcol) : that.floatcol != null)
- return false;
-
- if (doublecol != null ? !doublecol.equals(that.doublecol) : that.doublecol != null)
- return false;
-
- if (doublecol2 != null ? !doublecol2.equals(that.doublecol2) : that.doublecol2 != null)
- return false;
-
- if (bigdecimalcol != null ? !bigdecimalcol.equals(that.bigdecimalcol) : that.bigdecimalcol != null)
- return false;
-
- if (strcol != null ? !strcol.equals(that.strcol) : that.strcol != null)
- return false;
-
- if (datecol != null ? !datecol.equals(that.datecol) : that.datecol != null)
- return false;
-
- if (timecol != null ? !timecol.equals(that.timecol) : that.timecol != null)
- return false;
-
- if (tscol != null ? !tscol.equals(that.tscol) : that.tscol != null)
- return false;
-
- if (arrcol != null ? !arrcol.equals(that.arrcol) : that.arrcol != null)
- return false;
-
- if (fieldWithAlias != null ? !fieldWithAlias.equals(that.fieldWithAlias) : that.fieldWithAlias != null)
- return false;
-
- return true;
- }
-
- /** {@inheritDoc} */
- @Override public int hashCode() {
- int res = pk;
-
- res = 31 * res + (boolcol != null ? boolcol.hashCode() : 0);
-
- res = 31 * res + (bytecol != null ? bytecol.hashCode() : 0);
-
- res = 31 * res + (shortcol != null ? shortcol.hashCode() : 0);
-
- res = 31 * res + (intcol != null ? intcol.hashCode() : 0);
-
- res = 31 * res + (longcol != null ? longcol.hashCode() : 0);
-
- res = 31 * res + (floatcol != null ? floatcol.hashCode() : 0);
-
- res = 31 * res + (doublecol != null ? doublecol.hashCode() : 0);
-
- res = 31 * res + (doublecol2 != null ? doublecol2.hashCode() : 0);
-
- res = 31 * res + (bigdecimalcol != null ? bigdecimalcol.hashCode() : 0);
-
- res = 31 * res + (strcol != null ? strcol.hashCode() : 0);
-
- res = 31 * res + (datecol != null ? datecol.hashCode() : 0);
-
- res = 31 * res + (timecol != null ? timecol.hashCode() : 0);
-
- res = 31 * res + (tscol != null ? tscol.hashCode() : 0);
-
- res = 31 * res + (arrcol != null ? arrcol.hashCode() : 0);
-
- res = 31 * res + (fieldWithAlias != null ? fieldWithAlias.hashCode() : 0);
-
- return res;
- }
-
- /** {@inheritDoc} */
- @Override public String toString() {
- return "Objects [pk=" + pk +
- ", boolcol=" + boolcol +
- ", bytecol=" + bytecol +
- ", shortcol=" + shortcol +
- ", intcol=" + intcol +
- ", longcol=" + longcol +
- ", floatcol=" + floatcol +
- ", doublecol=" + doublecol +
- ", doublecol2=" + doublecol2 +
- ", bigdecimalcol=" + bigdecimalcol +
- ", strcol=" + strcol +
- ", datecol=" + datecol +
- ", timecol=" + timecol +
- ", tscol=" + tscol +
- ", arrcol=" + arrcol +
- ", fieldWithAlias=" + fieldWithAlias +
- "]";
- }
-}
http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/modules/schema-import/src/test/java/org/apache/ignite/schema/test/model/ObjectsKey.txt
----------------------------------------------------------------------
diff --git a/modules/schema-import/src/test/java/org/apache/ignite/schema/test/model/ObjectsKey.txt b/modules/schema-import/src/test/java/org/apache/ignite/schema/test/model/ObjectsKey.txt
deleted file mode 100644
index cad109c..0000000
--- a/modules/schema-import/src/test/java/org/apache/ignite/schema/test/model/ObjectsKey.txt
+++ /dev/null
@@ -1,96 +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.schema.test.model;
-
-import java.io.*;
-
-/**
- * ObjectsKey definition.
- *
- * Code generated by Apache Ignite Schema Import utility: 01/27/2015.
- */
-public class ObjectsKey implements Serializable {
- /** */
- private static final long serialVersionUID = 0L;
-
- /** Value for pk. */
- private int pk;
-
- /**
- * Empty constructor.
- */
- public ObjectsKey() {
- // No-op.
- }
-
- /**
- * Full constructor.
- */
- public ObjectsKey(
- int pk
- ) {
- this.pk = pk;
- }
-
- /**
- * Gets pk.
- *
- * @return Value for pk.
- */
- public int getPk() {
- return pk;
- }
-
- /**
- * Sets pk.
- *
- * @param pk New value for pk.
- */
- public void setPk(int pk) {
- this.pk = pk;
- }
-
- /** {@inheritDoc} */
- @Override public boolean equals(Object o) {
- if (this == o)
- return true;
-
- if (!(o instanceof ObjectsKey))
- return false;
-
- ObjectsKey that = (ObjectsKey)o;
-
- if (pk != that.pk)
- return false;
-
- return true;
- }
-
- /** {@inheritDoc} */
- @Override public int hashCode() {
- int res = pk;
-
- return res;
- }
-
- /** {@inheritDoc} */
- @Override public String toString() {
- return "ObjectsKey [pk=" + pk +
- "]";
- }
-}
http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/modules/schema-import/src/test/java/org/apache/ignite/schema/test/model/Primitives.txt
----------------------------------------------------------------------
diff --git a/modules/schema-import/src/test/java/org/apache/ignite/schema/test/model/Primitives.txt b/modules/schema-import/src/test/java/org/apache/ignite/schema/test/model/Primitives.txt
deleted file mode 100644
index a07b379..0000000
--- a/modules/schema-import/src/test/java/org/apache/ignite/schema/test/model/Primitives.txt
+++ /dev/null
@@ -1,535 +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.schema.test.model;
-
-import java.io.*;
-
-/**
- * Primitives definition.
- *
- * Code generated by Apache Ignite Schema Import utility: 01/27/2015.
- */
-public class Primitives implements Serializable {
- /** */
- private static final long serialVersionUID = 0L;
-
- /** Value for pk. */
- private int pk;
-
- /** Value for boolcol. */
- private boolean boolcol;
-
- /** Value for bytecol. */
- private byte bytecol;
-
- /** Value for shortcol. */
- private short shortcol;
-
- /** Value for intcol. */
- private int intcol;
-
- /** Value for longcol. */
- private long longcol;
-
- /** Value for floatcol. */
- private float floatcol;
-
- /** Value for doublecol. */
- private double doublecol;
-
- /** Value for doublecol2. */
- private double doublecol2;
-
- /** Value for bigdecimalcol. */
- private java.math.BigDecimal bigdecimalcol;
-
- /** Value for strcol. */
- private String strcol;
-
- /** Value for datecol. */
- private java.sql.Date datecol;
-
- /** Value for timecol. */
- private java.sql.Time timecol;
-
- /** Value for tscol. */
- private java.sql.Timestamp tscol;
-
- /** Value for arrcol. */
- private Object arrcol;
-
- /** Value for fieldWithAlias. */
- private String fieldWithAlias;
-
- /**
- * Empty constructor.
- */
- public Primitives() {
- // No-op.
- }
-
- /**
- * Full constructor.
- */
- public Primitives(
- int pk,
- boolean boolcol,
- byte bytecol,
- short shortcol,
- int intcol,
- long longcol,
- float floatcol,
- double doublecol,
- double doublecol2,
- java.math.BigDecimal bigdecimalcol,
- String strcol,
- java.sql.Date datecol,
- java.sql.Time timecol,
- java.sql.Timestamp tscol,
- Object arrcol,
- String fieldWithAlias
- ) {
- this.pk = pk;
- this.boolcol = boolcol;
- this.bytecol = bytecol;
- this.shortcol = shortcol;
- this.intcol = intcol;
- this.longcol = longcol;
- this.floatcol = floatcol;
- this.doublecol = doublecol;
- this.doublecol2 = doublecol2;
- this.bigdecimalcol = bigdecimalcol;
- this.strcol = strcol;
- this.datecol = datecol;
- this.timecol = timecol;
- this.tscol = tscol;
- this.arrcol = arrcol;
- this.fieldWithAlias = fieldWithAlias;
- }
-
- /**
- * Gets pk.
- *
- * @return Value for pk.
- */
- public int getPk() {
- return pk;
- }
-
- /**
- * Sets pk.
- *
- * @param pk New value for pk.
- */
- public void setPk(int pk) {
- this.pk = pk;
- }
-
- /**
- * Gets boolcol.
- *
- * @return Value for boolcol.
- */
- public boolean getBoolcol() {
- return boolcol;
- }
-
- /**
- * Sets boolcol.
- *
- * @param boolcol New value for boolcol.
- */
- public void setBoolcol(boolean boolcol) {
- this.boolcol = boolcol;
- }
-
- /**
- * Gets bytecol.
- *
- * @return Value for bytecol.
- */
- public byte getBytecol() {
- return bytecol;
- }
-
- /**
- * Sets bytecol.
- *
- * @param bytecol New value for bytecol.
- */
- public void setBytecol(byte bytecol) {
- this.bytecol = bytecol;
- }
-
- /**
- * Gets shortcol.
- *
- * @return Value for shortcol.
- */
- public short getShortcol() {
- return shortcol;
- }
-
- /**
- * Sets shortcol.
- *
- * @param shortcol New value for shortcol.
- */
- public void setShortcol(short shortcol) {
- this.shortcol = shortcol;
- }
-
- /**
- * Gets intcol.
- *
- * @return Value for intcol.
- */
- public int getIntcol() {
- return intcol;
- }
-
- /**
- * Sets intcol.
- *
- * @param intcol New value for intcol.
- */
- public void setIntcol(int intcol) {
- this.intcol = intcol;
- }
-
- /**
- * Gets longcol.
- *
- * @return Value for longcol.
- */
- public long getLongcol() {
- return longcol;
- }
-
- /**
- * Sets longcol.
- *
- * @param longcol New value for longcol.
- */
- public void setLongcol(long longcol) {
- this.longcol = longcol;
- }
-
- /**
- * Gets floatcol.
- *
- * @return Value for floatcol.
- */
- public float getFloatcol() {
- return floatcol;
- }
-
- /**
- * Sets floatcol.
- *
- * @param floatcol New value for floatcol.
- */
- public void setFloatcol(float floatcol) {
- this.floatcol = floatcol;
- }
-
- /**
- * Gets doublecol.
- *
- * @return Value for doublecol.
- */
- public double getDoublecol() {
- return doublecol;
- }
-
- /**
- * Sets doublecol.
- *
- * @param doublecol New value for doublecol.
- */
- public void setDoublecol(double doublecol) {
- this.doublecol = doublecol;
- }
-
- /**
- * Gets doublecol2.
- *
- * @return Value for doublecol2.
- */
- public double getDoublecol2() {
- return doublecol2;
- }
-
- /**
- * Sets doublecol2.
- *
- * @param doublecol2 New value for doublecol2.
- */
- public void setDoublecol2(double doublecol2) {
- this.doublecol2 = doublecol2;
- }
-
- /**
- * Gets bigdecimalcol.
- *
- * @return Value for bigdecimalcol.
- */
- public java.math.BigDecimal getBigdecimalcol() {
- return bigdecimalcol;
- }
-
- /**
- * Sets bigdecimalcol.
- *
- * @param bigdecimalcol New value for bigdecimalcol.
- */
- public void setBigdecimalcol(java.math.BigDecimal bigdecimalcol) {
- this.bigdecimalcol = bigdecimalcol;
- }
-
- /**
- * Gets strcol.
- *
- * @return Value for strcol.
- */
- public String getStrcol() {
- return strcol;
- }
-
- /**
- * Sets strcol.
- *
- * @param strcol New value for strcol.
- */
- public void setStrcol(String strcol) {
- this.strcol = strcol;
- }
-
- /**
- * Gets datecol.
- *
- * @return Value for datecol.
- */
- public java.sql.Date getDatecol() {
- return datecol;
- }
-
- /**
- * Sets datecol.
- *
- * @param datecol New value for datecol.
- */
- public void setDatecol(java.sql.Date datecol) {
- this.datecol = datecol;
- }
-
- /**
- * Gets timecol.
- *
- * @return Value for timecol.
- */
- public java.sql.Time getTimecol() {
- return timecol;
- }
-
- /**
- * Sets timecol.
- *
- * @param timecol New value for timecol.
- */
- public void setTimecol(java.sql.Time timecol) {
- this.timecol = timecol;
- }
-
- /**
- * Gets tscol.
- *
- * @return Value for tscol.
- */
- public java.sql.Timestamp getTscol() {
- return tscol;
- }
-
- /**
- * Sets tscol.
- *
- * @param tscol New value for tscol.
- */
- public void setTscol(java.sql.Timestamp tscol) {
- this.tscol = tscol;
- }
-
- /**
- * Gets arrcol.
- *
- * @return Value for arrcol.
- */
- public Object getArrcol() {
- return arrcol;
- }
-
- /**
- * Sets arrcol.
- *
- * @param arrcol New value for arrcol.
- */
- public void setArrcol(Object arrcol) {
- this.arrcol = arrcol;
- }
-
- /**
- * Gets fieldWithAlias.
- *
- * @return Value for fieldWithAlias.
- */
- public String getFieldWithAlias() {
- return fieldWithAlias;
- }
-
- /**
- * Sets fieldWithAlias.
- *
- * @param fieldWithAlias New value for fieldWithAlias.
- */
- public void setFieldWithAlias(String fieldWithAlias) {
- this.fieldWithAlias = fieldWithAlias;
- }
-
- /** {@inheritDoc} */
- @Override public boolean equals(Object o) {
- if (this == o)
- return true;
-
- if (!(o instanceof Primitives))
- return false;
-
- Primitives that = (Primitives)o;
-
- if (pk != that.pk)
- return false;
-
- if (boolcol != that.boolcol)
- return false;
-
- if (bytecol != that.bytecol)
- return false;
-
- if (shortcol != that.shortcol)
- return false;
-
- if (intcol != that.intcol)
- return false;
-
- if (longcol != that.longcol)
- return false;
-
- if (Float.compare(floatcol, that.floatcol) != 0)
- return false;
-
- if (Double.compare(doublecol, that.doublecol) != 0)
- return false;
-
- if (Double.compare(doublecol2, that.doublecol2) != 0)
- return false;
-
- if (bigdecimalcol != null ? !bigdecimalcol.equals(that.bigdecimalcol) : that.bigdecimalcol != null)
- return false;
-
- if (strcol != null ? !strcol.equals(that.strcol) : that.strcol != null)
- return false;
-
- if (datecol != null ? !datecol.equals(that.datecol) : that.datecol != null)
- return false;
-
- if (timecol != null ? !timecol.equals(that.timecol) : that.timecol != null)
- return false;
-
- if (tscol != null ? !tscol.equals(that.tscol) : that.tscol != null)
- return false;
-
- if (arrcol != null ? !arrcol.equals(that.arrcol) : that.arrcol != null)
- return false;
-
- if (fieldWithAlias != null ? !fieldWithAlias.equals(that.fieldWithAlias) : that.fieldWithAlias != null)
- return false;
-
- return true;
- }
-
- /** {@inheritDoc} */
- @Override public int hashCode() {
- int res = pk;
-
- res = 31 * res + (boolcol ? 1 : 0);
-
- res = 31 * res + (int)bytecol;
-
- res = 31 * res + (int)shortcol;
-
- res = 31 * res + intcol;
-
- res = 31 * res + (int)(longcol ^ (longcol >>> 32));
-
- res = 31 * res + (floatcol != +0.0f ? Float.floatToIntBits(floatcol) : 0);
-
- long ig_hash_temp = Double.doubleToLongBits(doublecol);
-
- res = 31 * res + (int)(ig_hash_temp ^ (ig_hash_temp >>> 32));
-
- ig_hash_temp = Double.doubleToLongBits(doublecol2);
-
- res = 31 * res + (int)(ig_hash_temp ^ (ig_hash_temp >>> 32));
-
- res = 31 * res + (bigdecimalcol != null ? bigdecimalcol.hashCode() : 0);
-
- res = 31 * res + (strcol != null ? strcol.hashCode() : 0);
-
- res = 31 * res + (datecol != null ? datecol.hashCode() : 0);
-
- res = 31 * res + (timecol != null ? timecol.hashCode() : 0);
-
- res = 31 * res + (tscol != null ? tscol.hashCode() : 0);
-
- res = 31 * res + (arrcol != null ? arrcol.hashCode() : 0);
-
- res = 31 * res + (fieldWithAlias != null ? fieldWithAlias.hashCode() : 0);
-
- return res;
- }
-
- /** {@inheritDoc} */
- @Override public String toString() {
- return "Primitives [pk=" + pk +
- ", boolcol=" + boolcol +
- ", bytecol=" + bytecol +
- ", shortcol=" + shortcol +
- ", intcol=" + intcol +
- ", longcol=" + longcol +
- ", floatcol=" + floatcol +
- ", doublecol=" + doublecol +
- ", doublecol2=" + doublecol2 +
- ", bigdecimalcol=" + bigdecimalcol +
- ", strcol=" + strcol +
- ", datecol=" + datecol +
- ", timecol=" + timecol +
- ", tscol=" + tscol +
- ", arrcol=" + arrcol +
- ", fieldWithAlias=" + fieldWithAlias +
- "]";
- }
-}
http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/modules/schema-import/src/test/java/org/apache/ignite/schema/test/model/PrimitivesKey.txt
----------------------------------------------------------------------
diff --git a/modules/schema-import/src/test/java/org/apache/ignite/schema/test/model/PrimitivesKey.txt b/modules/schema-import/src/test/java/org/apache/ignite/schema/test/model/PrimitivesKey.txt
deleted file mode 100644
index 0844e63..0000000
--- a/modules/schema-import/src/test/java/org/apache/ignite/schema/test/model/PrimitivesKey.txt
+++ /dev/null
@@ -1,96 +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.schema.test.model;
-
-import java.io.*;
-
-/**
- * PrimitivesKey definition.
- *
- * Code generated by Apache Ignite Schema Import utility: 01/27/2015.
- */
-public class PrimitivesKey implements Serializable {
- /** */
- private static final long serialVersionUID = 0L;
-
- /** Value for pk. */
- private int pk;
-
- /**
- * Empty constructor.
- */
- public PrimitivesKey() {
- // No-op.
- }
-
- /**
- * Full constructor.
- */
- public PrimitivesKey(
- int pk
- ) {
- this.pk = pk;
- }
-
- /**
- * Gets pk.
- *
- * @return Value for pk.
- */
- public int getPk() {
- return pk;
- }
-
- /**
- * Sets pk.
- *
- * @param pk New value for pk.
- */
- public void setPk(int pk) {
- this.pk = pk;
- }
-
- /** {@inheritDoc} */
- @Override public boolean equals(Object o) {
- if (this == o)
- return true;
-
- if (!(o instanceof PrimitivesKey))
- return false;
-
- PrimitivesKey that = (PrimitivesKey)o;
-
- if (pk != that.pk)
- return false;
-
- return true;
- }
-
- /** {@inheritDoc} */
- @Override public int hashCode() {
- int res = pk;
-
- return res;
- }
-
- /** {@inheritDoc} */
- @Override public String toString() {
- return "PrimitivesKey [pk=" + pk +
- "]";
- }
-}
http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/modules/schema-import/src/test/java/org/apache/ignite/schema/test/model/Tst.txt
----------------------------------------------------------------------
diff --git a/modules/schema-import/src/test/java/org/apache/ignite/schema/test/model/Tst.txt b/modules/schema-import/src/test/java/org/apache/ignite/schema/test/model/Tst.txt
deleted file mode 100644
index f1db255..0000000
--- a/modules/schema-import/src/test/java/org/apache/ignite/schema/test/model/Tst.txt
+++ /dev/null
@@ -1,535 +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.schema.test.model;
-
-import java.io.*;
-
-/**
- * Tst definition.
- *
- * Code generated by Apache Ignite Schema Import utility: 01/27/2015.
- */
-public class Tst implements Serializable {
- /** */
- private static final long serialVersionUID = 0L;
-
- /** Value for pk. */
- private int pk;
-
- /** Value for boolcol. */
- private boolean boolcol;
-
- /** Value for bytecol. */
- private byte bytecol;
-
- /** Value for shortcol. */
- private short shortcol;
-
- /** Value for intcol. */
- private int intcol;
-
- /** Value for longcol. */
- private long longcol;
-
- /** Value for floatcol. */
- private float floatcol;
-
- /** Value for doublecol. */
- private double doublecol;
-
- /** Value for doublecol2. */
- private double doublecol2;
-
- /** Value for bigdecimalcol. */
- private java.math.BigDecimal bigdecimalcol;
-
- /** Value for strcol. */
- private String strcol;
-
- /** Value for datecol. */
- private java.sql.Date datecol;
-
- /** Value for timecol. */
- private java.sql.Time timecol;
-
- /** Value for tscol. */
- private java.sql.Timestamp tscol;
-
- /** Value for arrcol. */
- private Object arrcol;
-
- /** Value for fieldWithAlias. */
- private String fieldWithAlias;
-
- /**
- * Empty constructor.
- */
- public Tst() {
- // No-op.
- }
-
- /**
- * Full constructor.
- */
- public Tst(
- int pk,
- boolean boolcol,
- byte bytecol,
- short shortcol,
- int intcol,
- long longcol,
- float floatcol,
- double doublecol,
- double doublecol2,
- java.math.BigDecimal bigdecimalcol,
- String strcol,
- java.sql.Date datecol,
- java.sql.Time timecol,
- java.sql.Timestamp tscol,
- Object arrcol,
- String fieldWithAlias
- ) {
- this.pk = pk;
- this.boolcol = boolcol;
- this.bytecol = bytecol;
- this.shortcol = shortcol;
- this.intcol = intcol;
- this.longcol = longcol;
- this.floatcol = floatcol;
- this.doublecol = doublecol;
- this.doublecol2 = doublecol2;
- this.bigdecimalcol = bigdecimalcol;
- this.strcol = strcol;
- this.datecol = datecol;
- this.timecol = timecol;
- this.tscol = tscol;
- this.arrcol = arrcol;
- this.fieldWithAlias = fieldWithAlias;
- }
-
- /**
- * Gets pk.
- *
- * @return Value for pk.
- */
- public int getPk() {
- return pk;
- }
-
- /**
- * Sets pk.
- *
- * @param pk New value for pk.
- */
- public void setPk(int pk) {
- this.pk = pk;
- }
-
- /**
- * Gets boolcol.
- *
- * @return Value for boolcol.
- */
- public boolean getBoolcol() {
- return boolcol;
- }
-
- /**
- * Sets boolcol.
- *
- * @param boolcol New value for boolcol.
- */
- public void setBoolcol(boolean boolcol) {
- this.boolcol = boolcol;
- }
-
- /**
- * Gets bytecol.
- *
- * @return Value for bytecol.
- */
- public byte getBytecol() {
- return bytecol;
- }
-
- /**
- * Sets bytecol.
- *
- * @param bytecol New value for bytecol.
- */
- public void setBytecol(byte bytecol) {
- this.bytecol = bytecol;
- }
-
- /**
- * Gets shortcol.
- *
- * @return Value for shortcol.
- */
- public short getShortcol() {
- return shortcol;
- }
-
- /**
- * Sets shortcol.
- *
- * @param shortcol New value for shortcol.
- */
- public void setShortcol(short shortcol) {
- this.shortcol = shortcol;
- }
-
- /**
- * Gets intcol.
- *
- * @return Value for intcol.
- */
- public int getIntcol() {
- return intcol;
- }
-
- /**
- * Sets intcol.
- *
- * @param intcol New value for intcol.
- */
- public void setIntcol(int intcol) {
- this.intcol = intcol;
- }
-
- /**
- * Gets longcol.
- *
- * @return Value for longcol.
- */
- public long getLongcol() {
- return longcol;
- }
-
- /**
- * Sets longcol.
- *
- * @param longcol New value for longcol.
- */
- public void setLongcol(long longcol) {
- this.longcol = longcol;
- }
-
- /**
- * Gets floatcol.
- *
- * @return Value for floatcol.
- */
- public float getFloatcol() {
- return floatcol;
- }
-
- /**
- * Sets floatcol.
- *
- * @param floatcol New value for floatcol.
- */
- public void setFloatcol(float floatcol) {
- this.floatcol = floatcol;
- }
-
- /**
- * Gets doublecol.
- *
- * @return Value for doublecol.
- */
- public double getDoublecol() {
- return doublecol;
- }
-
- /**
- * Sets doublecol.
- *
- * @param doublecol New value for doublecol.
- */
- public void setDoublecol(double doublecol) {
- this.doublecol = doublecol;
- }
-
- /**
- * Gets doublecol2.
- *
- * @return Value for doublecol2.
- */
- public double getDoublecol2() {
- return doublecol2;
- }
-
- /**
- * Sets doublecol2.
- *
- * @param doublecol2 New value for doublecol2.
- */
- public void setDoublecol2(double doublecol2) {
- this.doublecol2 = doublecol2;
- }
-
- /**
- * Gets bigdecimalcol.
- *
- * @return Value for bigdecimalcol.
- */
- public java.math.BigDecimal getBigdecimalcol() {
- return bigdecimalcol;
- }
-
- /**
- * Sets bigdecimalcol.
- *
- * @param bigdecimalcol New value for bigdecimalcol.
- */
- public void setBigdecimalcol(java.math.BigDecimal bigdecimalcol) {
- this.bigdecimalcol = bigdecimalcol;
- }
-
- /**
- * Gets strcol.
- *
- * @return Value for strcol.
- */
- public String getStrcol() {
- return strcol;
- }
-
- /**
- * Sets strcol.
- *
- * @param strcol New value for strcol.
- */
- public void setStrcol(String strcol) {
- this.strcol = strcol;
- }
-
- /**
- * Gets datecol.
- *
- * @return Value for datecol.
- */
- public java.sql.Date getDatecol() {
- return datecol;
- }
-
- /**
- * Sets datecol.
- *
- * @param datecol New value for datecol.
- */
- public void setDatecol(java.sql.Date datecol) {
- this.datecol = datecol;
- }
-
- /**
- * Gets timecol.
- *
- * @return Value for timecol.
- */
- public java.sql.Time getTimecol() {
- return timecol;
- }
-
- /**
- * Sets timecol.
- *
- * @param timecol New value for timecol.
- */
- public void setTimecol(java.sql.Time timecol) {
- this.timecol = timecol;
- }
-
- /**
- * Gets tscol.
- *
- * @return Value for tscol.
- */
- public java.sql.Timestamp getTscol() {
- return tscol;
- }
-
- /**
- * Sets tscol.
- *
- * @param tscol New value for tscol.
- */
- public void setTscol(java.sql.Timestamp tscol) {
- this.tscol = tscol;
- }
-
- /**
- * Gets arrcol.
- *
- * @return Value for arrcol.
- */
- public Object getArrcol() {
- return arrcol;
- }
-
- /**
- * Sets arrcol.
- *
- * @param arrcol New value for arrcol.
- */
- public void setArrcol(Object arrcol) {
- this.arrcol = arrcol;
- }
-
- /**
- * Gets fieldWithAlias.
- *
- * @return Value for fieldWithAlias.
- */
- public String getFieldWithAlias() {
- return fieldWithAlias;
- }
-
- /**
- * Sets fieldWithAlias.
- *
- * @param fieldWithAlias New value for fieldWithAlias.
- */
- public void setFieldWithAlias(String fieldWithAlias) {
- this.fieldWithAlias = fieldWithAlias;
- }
-
- /** {@inheritDoc} */
- @Override public boolean equals(Object o) {
- if (this == o)
- return true;
-
- if (!(o instanceof Tst))
- return false;
-
- Tst that = (Tst)o;
-
- if (pk != that.pk)
- return false;
-
- if (boolcol != that.boolcol)
- return false;
-
- if (bytecol != that.bytecol)
- return false;
-
- if (shortcol != that.shortcol)
- return false;
-
- if (intcol != that.intcol)
- return false;
-
- if (longcol != that.longcol)
- return false;
-
- if (Float.compare(floatcol, that.floatcol) != 0)
- return false;
-
- if (Double.compare(doublecol, that.doublecol) != 0)
- return false;
-
- if (Double.compare(doublecol2, that.doublecol2) != 0)
- return false;
-
- if (bigdecimalcol != null ? !bigdecimalcol.equals(that.bigdecimalcol) : that.bigdecimalcol != null)
- return false;
-
- if (strcol != null ? !strcol.equals(that.strcol) : that.strcol != null)
- return false;
-
- if (datecol != null ? !datecol.equals(that.datecol) : that.datecol != null)
- return false;
-
- if (timecol != null ? !timecol.equals(that.timecol) : that.timecol != null)
- return false;
-
- if (tscol != null ? !tscol.equals(that.tscol) : that.tscol != null)
- return false;
-
- if (arrcol != null ? !arrcol.equals(that.arrcol) : that.arrcol != null)
- return false;
-
- if (fieldWithAlias != null ? !fieldWithAlias.equals(that.fieldWithAlias) : that.fieldWithAlias != null)
- return false;
-
- return true;
- }
-
- /** {@inheritDoc} */
- @Override public int hashCode() {
- int res = pk;
-
- res = 31 * res + (boolcol ? 1 : 0);
-
- res = 31 * res + (int)bytecol;
-
- res = 31 * res + (int)shortcol;
-
- res = 31 * res + intcol;
-
- res = 31 * res + (int)(longcol ^ (longcol >>> 32));
-
- res = 31 * res + (floatcol != +0.0f ? Float.floatToIntBits(floatcol) : 0);
-
- long ig_hash_temp = Double.doubleToLongBits(doublecol);
-
- res = 31 * res + (int)(ig_hash_temp ^ (ig_hash_temp >>> 32));
-
- ig_hash_temp = Double.doubleToLongBits(doublecol2);
-
- res = 31 * res + (int)(ig_hash_temp ^ (ig_hash_temp >>> 32));
-
- res = 31 * res + (bigdecimalcol != null ? bigdecimalcol.hashCode() : 0);
-
- res = 31 * res + (strcol != null ? strcol.hashCode() : 0);
-
- res = 31 * res + (datecol != null ? datecol.hashCode() : 0);
-
- res = 31 * res + (timecol != null ? timecol.hashCode() : 0);
-
- res = 31 * res + (tscol != null ? tscol.hashCode() : 0);
-
- res = 31 * res + (arrcol != null ? arrcol.hashCode() : 0);
-
- res = 31 * res + (fieldWithAlias != null ? fieldWithAlias.hashCode() : 0);
-
- return res;
- }
-
- /** {@inheritDoc} */
- @Override public String toString() {
- return "Tst [pk=" + pk +
- ", boolcol=" + boolcol +
- ", bytecol=" + bytecol +
- ", shortcol=" + shortcol +
- ", intcol=" + intcol +
- ", longcol=" + longcol +
- ", floatcol=" + floatcol +
- ", doublecol=" + doublecol +
- ", doublecol2=" + doublecol2 +
- ", bigdecimalcol=" + bigdecimalcol +
- ", strcol=" + strcol +
- ", datecol=" + datecol +
- ", timecol=" + timecol +
- ", tscol=" + tscol +
- ", arrcol=" + arrcol +
- ", fieldWithAlias=" + fieldWithAlias +
- "]";
- }
-}
http://git-wip-us.apache.org/repos/asf/ignite/blob/f6ee9c0f/modules/schema-import/src/test/java/org/apache/ignite/schema/test/model/TstKey.txt
----------------------------------------------------------------------
diff --git a/modules/schema-import/src/test/java/org/apache/ignite/schema/test/model/TstKey.txt b/modules/schema-import/src/test/java/org/apache/ignite/schema/test/model/TstKey.txt
deleted file mode 100644
index e2ce3c0..0000000
--- a/modules/schema-import/src/test/java/org/apache/ignite/schema/test/model/TstKey.txt
+++ /dev/null
@@ -1,96 +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.schema.test.model;
-
-import java.io.*;
-
-/**
- * TstKey definition.
- *
- * Code generated by Apache Ignite Schema Import utility: 01/27/2015.
- */
-public class TstKey implements Serializable {
- /** */
- private static final long serialVersionUID = 0L;
-
- /** Value for pk. */
- private int pk;
-
- /**
- * Empty constructor.
- */
- public TstKey() {
- // No-op.
- }
-
- /**
- * Full constructor.
- */
- public TstKey(
- int pk
- ) {
- this.pk = pk;
- }
-
- /**
- * Gets pk.
- *
- * @return Value for pk.
- */
- public int getPk() {
- return pk;
- }
-
- /**
- * Sets pk.
- *
- * @param pk New value for pk.
- */
- public void setPk(int pk) {
- this.pk = pk;
- }
-
- /** {@inheritDoc} */
- @Override public boolean equals(Object o) {
- if (this == o)
- return true;
-
- if (!(o instanceof TstKey))
- return false;
-
- TstKey that = (TstKey)o;
-
- if (pk != that.pk)
- return false;
-
- return true;
- }
-
- /** {@inheritDoc} */
- @Override public int hashCode() {
- int res = pk;
-
- return res;
- }
-
- /** {@inheritDoc} */
- @Override public String toString() {
- return "TstKey [pk=" + pk +
- "]";
- }
-}