Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-45 ea5346130 -> c7b864532


# IGNITE-330 Move code to "schema" package in order to avoid ambiguity.


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

Branch: refs/heads/ignite-45
Commit: c7b864532ed910a27049588c25d6aee3b741fd5d
Parents: ea53461
Author: AKuznetsov <akuznet...@gridgain.com>
Authored: Sun Mar 22 19:30:19 2015 +0700
Committer: AKuznetsov <akuznet...@gridgain.com>
Committed: Sun Mar 22 19:30:19 2015 +0700

----------------------------------------------------------------------
 examples/schema-import/bin/schema-import.bat    |  2 +-
 examples/schema-import/bin/schema-import.sh     |  2 +-
 .../org/apache/ignite/ConfigurationSnippet.java | 38 -------------
 .../src/main/java/org/apache/ignite/Demo.java   | 59 -------------------
 .../src/main/java/org/apache/ignite/Person.java | 33 -----------
 .../main/java/org/apache/ignite/PersonKey.java  | 31 ----------
 .../ignite/schema/ConfigurationSnippet.java     | 38 +++++++++++++
 .../java/org/apache/ignite/schema/Demo.java     | 60 ++++++++++++++++++++
 .../java/org/apache/ignite/schema/Person.java   | 33 +++++++++++
 .../org/apache/ignite/schema/PersonKey.java     | 31 ++++++++++
 10 files changed, 164 insertions(+), 163 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c7b86453/examples/schema-import/bin/schema-import.bat
----------------------------------------------------------------------
diff --git a/examples/schema-import/bin/schema-import.bat 
b/examples/schema-import/bin/schema-import.bat
index 3016122..18bf01d 100644
--- a/examples/schema-import/bin/schema-import.bat
+++ b/examples/schema-import/bin/schema-import.bat
@@ -82,7 +82,7 @@ if exist "%IGNITE_HOME%\config" goto run
  jdbc.url="jdbc:h2:tcp://localhost/%IGNITE_HOME%\examples\schema-import\demo" ^
  jdbc.user=sa ^
  out.folder="%IGNITE_HOME%\examples\schema-import\src\main\java" ^
- pojo.package=org.apache.ignite ^
+ pojo.package=org.apache.ignite.schema ^
  pojo.constructor=true
 
 :error_finish

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c7b86453/examples/schema-import/bin/schema-import.sh
----------------------------------------------------------------------
diff --git a/examples/schema-import/bin/schema-import.sh 
b/examples/schema-import/bin/schema-import.sh
index c59ed1b..7517abb 100755
--- a/examples/schema-import/bin/schema-import.sh
+++ b/examples/schema-import/bin/schema-import.sh
@@ -53,5 +53,5 @@ setIgniteHome
  jdbc.url="jdbc:h2:tcp://localhost/${IGNITE_HOME}/examples/schema-import/demo" 
\
  jdbc.user=sa \
  out.folder="${IGNITE_HOME}/examples/schema-import/src/main/java" \
- pojo.package=org.apache.ignite \
+ pojo.package=org.apache.ignite.schema \
  pojo.constructor=true

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c7b86453/examples/schema-import/src/main/java/org/apache/ignite/ConfigurationSnippet.java
----------------------------------------------------------------------
diff --git 
a/examples/schema-import/src/main/java/org/apache/ignite/ConfigurationSnippet.java
 
b/examples/schema-import/src/main/java/org/apache/ignite/ConfigurationSnippet.java
deleted file mode 100644
index 640beb1..0000000
--- 
a/examples/schema-import/src/main/java/org/apache/ignite/ConfigurationSnippet.java
+++ /dev/null
@@ -1,38 +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;
-
-import org.apache.ignite.cache.*;
-import org.apache.ignite.cache.store.*;
-
-import java.util.*;
-
-/**
- * ConfigurationSnippet stub. Will be generated by Ignite Schema Import 
Utility.
- */
-public class ConfigurationSnippet {
-    /** Configure cache store. */
-    public static CacheStore store() {
-        throw new IllegalStateException("ConfigurationSnippet should be 
generated by Ignite Schema Import Utility");
-    }
-
-    /** Configure cache types metadata. */
-    public static Collection<CacheTypeMetadata> typeMetadata() {
-        throw new IllegalStateException("ConfigurationSnippet should be 
generated by Ignite Schema Import Utility");
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c7b86453/examples/schema-import/src/main/java/org/apache/ignite/Demo.java
----------------------------------------------------------------------
diff --git a/examples/schema-import/src/main/java/org/apache/ignite/Demo.java 
b/examples/schema-import/src/main/java/org/apache/ignite/Demo.java
deleted file mode 100644
index 8cd7818..0000000
--- a/examples/schema-import/src/main/java/org/apache/ignite/Demo.java
+++ /dev/null
@@ -1,59 +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;
-
-import org.apache.ignite.configuration.*;
-
-import javax.cache.configuration.*;
-
-/**
- * Demo for CacheJdbcPojoStore.
- */
-public class Demo {
-    public static void main(String[] args) throws IgniteException {
-        System.out.println(">>> Start demo...");
-
-        IgniteConfiguration cfg = new IgniteConfiguration();
-
-        CacheConfiguration ccfg = new CacheConfiguration<>();
-
-        // Configure cache store.
-        ccfg.setCacheStoreFactory(new 
FactoryBuilder.SingletonFactory(ConfigurationSnippet.store()));
-        ccfg.setReadThrough(true);
-        ccfg.setWriteThrough(true);
-
-        // Enable database batching.
-        ccfg.setWriteBehindEnabled(true);
-
-        // Configure cache types metadata.
-        ccfg.setTypeMetadata(ConfigurationSnippet.typeMetadata());
-
-        cfg.setCacheConfiguration(ccfg);
-
-        // Start Ignite node.
-        try (Ignite ignite = Ignition.start(cfg)) {
-            IgniteCache<PersonKey, Person> cache = ignite.jcache(null);
-
-            // Demo for load cache with custom SQL.
-            cache.loadCache(null, "org.apache.ignite.examples.demo.PersonKey",
-                "select * from PERSON where ID = 3");
-
-            System.out.println(">>> Loaded Person: " + cache.get(new 
PersonKey(3)));
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c7b86453/examples/schema-import/src/main/java/org/apache/ignite/Person.java
----------------------------------------------------------------------
diff --git a/examples/schema-import/src/main/java/org/apache/ignite/Person.java 
b/examples/schema-import/src/main/java/org/apache/ignite/Person.java
deleted file mode 100644
index 36a0128..0000000
--- a/examples/schema-import/src/main/java/org/apache/ignite/Person.java
+++ /dev/null
@@ -1,33 +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;
-
-import java.io.*;
-
-/**
- * Person stub.  Will be generated by Ignite Schema Import Utility.
- */
-public class Person {
-    /**
-     * Empty constructor.
-     */
-    public Person() {
-        throw new IllegalStateException("Person should be generated by Ignite 
Schema Import Utility");
-    }
-}
-

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c7b86453/examples/schema-import/src/main/java/org/apache/ignite/PersonKey.java
----------------------------------------------------------------------
diff --git 
a/examples/schema-import/src/main/java/org/apache/ignite/PersonKey.java 
b/examples/schema-import/src/main/java/org/apache/ignite/PersonKey.java
deleted file mode 100644
index 948f974..0000000
--- a/examples/schema-import/src/main/java/org/apache/ignite/PersonKey.java
+++ /dev/null
@@ -1,31 +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;
-
-/**
- * PersonKey definition.
- */
-public class PersonKey implements Serializable {
-    /**
-     * Full constructor.
-     */
-    public PersonKey(int id) {
-        throw new IllegalStateException("PersonKey should be generated by 
Ignite Schema Import Utility");
-    }
-}
-

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c7b86453/examples/schema-import/src/main/java/org/apache/ignite/schema/ConfigurationSnippet.java
----------------------------------------------------------------------
diff --git 
a/examples/schema-import/src/main/java/org/apache/ignite/schema/ConfigurationSnippet.java
 
b/examples/schema-import/src/main/java/org/apache/ignite/schema/ConfigurationSnippet.java
new file mode 100644
index 0000000..c2029ea
--- /dev/null
+++ 
b/examples/schema-import/src/main/java/org/apache/ignite/schema/ConfigurationSnippet.java
@@ -0,0 +1,38 @@
+/*
+ * 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;
+
+import org.apache.ignite.cache.*;
+import org.apache.ignite.cache.store.*;
+
+import java.util.*;
+
+/**
+ * ConfigurationSnippet stub. Will be generated by Ignite Schema Import 
Utility.
+ */
+public class ConfigurationSnippet {
+    /** Configure cache store. */
+    public static CacheStore store() {
+        throw new IllegalStateException("ConfigurationSnippet should be 
generated by Ignite Schema Import Utility");
+    }
+
+    /** Configure cache types metadata. */
+    public static Collection<CacheTypeMetadata> typeMetadata() {
+        throw new IllegalStateException("ConfigurationSnippet should be 
generated by Ignite Schema Import Utility");
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c7b86453/examples/schema-import/src/main/java/org/apache/ignite/schema/Demo.java
----------------------------------------------------------------------
diff --git 
a/examples/schema-import/src/main/java/org/apache/ignite/schema/Demo.java 
b/examples/schema-import/src/main/java/org/apache/ignite/schema/Demo.java
new file mode 100644
index 0000000..450148c
--- /dev/null
+++ b/examples/schema-import/src/main/java/org/apache/ignite/schema/Demo.java
@@ -0,0 +1,60 @@
+/*
+ * 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;
+
+import org.apache.ignite.*;
+import org.apache.ignite.configuration.*;
+
+import javax.cache.configuration.*;
+
+/**
+ * Demo for CacheJdbcPojoStore.
+ */
+public class Demo {
+    public static void main(String[] args) throws IgniteException {
+        System.out.println(">>> Start demo...");
+
+        IgniteConfiguration cfg = new IgniteConfiguration();
+
+        CacheConfiguration ccfg = new CacheConfiguration<>();
+
+        // Configure cache store.
+        ccfg.setCacheStoreFactory(new 
FactoryBuilder.SingletonFactory(ConfigurationSnippet.store()));
+        ccfg.setReadThrough(true);
+        ccfg.setWriteThrough(true);
+
+        // Enable database batching.
+        ccfg.setWriteBehindEnabled(true);
+
+        // Configure cache types metadata.
+        ccfg.setTypeMetadata(ConfigurationSnippet.typeMetadata());
+
+        cfg.setCacheConfiguration(ccfg);
+
+        // Start Ignite node.
+        try (Ignite ignite = Ignition.start(cfg)) {
+            IgniteCache<PersonKey, Person> cache = ignite.jcache(null);
+
+            // Demo for load cache with custom SQL.
+            cache.loadCache(null, "org.apache.ignite.examples.demo.PersonKey",
+                "select * from PERSON where ID = 3");
+
+            System.out.println(">>> Loaded Person: " + cache.get(new 
PersonKey(3)));
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c7b86453/examples/schema-import/src/main/java/org/apache/ignite/schema/Person.java
----------------------------------------------------------------------
diff --git 
a/examples/schema-import/src/main/java/org/apache/ignite/schema/Person.java 
b/examples/schema-import/src/main/java/org/apache/ignite/schema/Person.java
new file mode 100644
index 0000000..6b2b312
--- /dev/null
+++ b/examples/schema-import/src/main/java/org/apache/ignite/schema/Person.java
@@ -0,0 +1,33 @@
+/*
+ * 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;
+
+import java.io.*;
+
+/**
+ * Person stub.  Will be generated by Ignite Schema Import Utility.
+ */
+public class Person {
+    /**
+     * Empty constructor.
+     */
+    public Person() {
+        throw new IllegalStateException("Person should be generated by Ignite 
Schema Import Utility");
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c7b86453/examples/schema-import/src/main/java/org/apache/ignite/schema/PersonKey.java
----------------------------------------------------------------------
diff --git 
a/examples/schema-import/src/main/java/org/apache/ignite/schema/PersonKey.java 
b/examples/schema-import/src/main/java/org/apache/ignite/schema/PersonKey.java
new file mode 100644
index 0000000..919b96b
--- /dev/null
+++ 
b/examples/schema-import/src/main/java/org/apache/ignite/schema/PersonKey.java
@@ -0,0 +1,31 @@
+/*
+ * 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;
+
+/**
+ * PersonKey definition.
+ */
+public class PersonKey {
+    /**
+     * Full constructor.
+     */
+    public PersonKey(int id) {
+        throw new IllegalStateException("PersonKey should be generated by 
Ignite Schema Import Utility");
+    }
+}
+

Reply via email to