airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chath...@apache.org
Subject [2/4] airavata git commit: add registry-tools
Date Tue, 09 Jun 2015 16:45:07 GMT
http://git-wip-us.apache.org/repos/asf/airavata/blob/6c1eebe3/modules/registry/registry-tools/jpa-gen/src/main/java/appcatalog/computeresource/LocalDataMovementGenerator.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-tools/jpa-gen/src/main/java/appcatalog/computeresource/LocalDataMovementGenerator.java b/modules/registry/registry-tools/jpa-gen/src/main/java/appcatalog/computeresource/LocalDataMovementGenerator.java
new file mode 100644
index 0000000..8bfc6ac
--- /dev/null
+++ b/modules/registry/registry-tools/jpa-gen/src/main/java/appcatalog/computeresource/LocalDataMovementGenerator.java
@@ -0,0 +1,80 @@
+/*
+ *
+ * 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 appcatalog.computeresource;
+
+import generators.JPAClassGenerator;
+import generators.JPAResourceClassGenerator;
+import generators.SQLGenerator;
+
+import java.util.Arrays;
+
+import model.JPAClassModel;
+import model.JPAResourceClassModel;
+import model.SQLData;
+
+public class LocalDataMovementGenerator {
+	private static SQLData createSQLData() {
+		SQLData data = new SQLData();
+		data.setTableName("LOCAL_DATA_MOVEMENT");
+		data.getFieldData().put("DATA_MOVEMENT_INTERFACE_ID", Arrays.asList(new String[]{"VARCHAR", "(255)", "NOT", "NULL"}));
+		data.getPrimaryKeys().add("DATA_MOVEMENT_INTERFACE_ID");
+		return data;
+	}
+	public static void testSqlGen() {
+		SQLData data = createSQLData();
+		SQLGenerator sqlGenerator = new SQLGenerator();
+		System.out.println(sqlGenerator.generateSQLCreateQuery(data));
+	}
+	
+	public static void testJPAClassGen() {
+		SQLData data = createSQLData();
+		JPAClassGenerator jpaClassGenerator = new JPAClassGenerator();
+		jpaClassGenerator.setJpaClassPackageName("org.apache.aiaravata.application.catalog.data.model");
+		JPAClassModel model = jpaClassGenerator.createJPAClassModel(data);
+		System.out.println(jpaClassGenerator.generateJPAClass(model));
+		System.out.println(jpaClassGenerator.generateJPAPKClass(model.pkClassModel));
+		System.out.println(jpaClassGenerator.generatePersistenceXmlEntry(model));
+	}
+	
+	public static void testJPAResourceClassGen() {
+		SQLData data = createSQLData();
+		JPAClassGenerator jpaClassGenerator = new JPAClassGenerator();
+		JPAClassModel model = jpaClassGenerator.createJPAClassModel(data);
+		JPAResourceClassGenerator jpaResourceClassGenerator = new JPAResourceClassGenerator();
+		jpaResourceClassGenerator.setExceptionClassName("AppCatalogException");
+		jpaResourceClassGenerator.setJpaUtilsClassName("AppCatalogJPAUtils");
+		jpaResourceClassGenerator.setResourceTypeClassName("AppCatalogResourceType");
+		jpaResourceClassGenerator.setQueryGeneratorClassName("AppCatalogQueryGenerator");
+
+		JPAResourceClassModel model2 = jpaResourceClassGenerator.createJPAResourceClassModel(model);
+		System.out.println(jpaResourceClassGenerator.generateJPAResourceClass(model2));
+		System.out.println(jpaResourceClassGenerator.generateAbstractResourceClassUpdates(model2));
+		System.out.println(jpaResourceClassGenerator.generateAppCatalogResourceTypeUpdates(model2));
+		System.out.println(jpaResourceClassGenerator.generateAppCatalogJPAUtilUpdates(model2));
+		
+	}
+	public static void main(String[] args) {
+		testSqlGen();
+		testJPAClassGen();
+		testJPAResourceClassGen();
+	}
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/6c1eebe3/modules/registry/registry-tools/jpa-gen/src/main/java/appcatalog/computeresource/LocalSubmissionGenerator.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-tools/jpa-gen/src/main/java/appcatalog/computeresource/LocalSubmissionGenerator.java b/modules/registry/registry-tools/jpa-gen/src/main/java/appcatalog/computeresource/LocalSubmissionGenerator.java
new file mode 100644
index 0000000..df1d2ce
--- /dev/null
+++ b/modules/registry/registry-tools/jpa-gen/src/main/java/appcatalog/computeresource/LocalSubmissionGenerator.java
@@ -0,0 +1,82 @@
+/*
+ *
+ * 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 appcatalog.computeresource;
+
+import generators.JPAClassGenerator;
+import generators.JPAResourceClassGenerator;
+import generators.SQLGenerator;
+
+import java.util.Arrays;
+
+import model.JPAClassModel;
+import model.JPAResourceClassModel;
+import model.SQLData;
+
+public class LocalSubmissionGenerator {
+	private static SQLData createSQLData() {
+		SQLData data = new SQLData();
+		data.setTableName("LOCAL_SUBMISSION");
+		data.getFieldData().put("JOB_SUBMISSION_INTERFACE_ID", Arrays.asList(new String[]{"VARCHAR", "(255)", "NOT", "NULL"}));
+		data.getFieldData().put("RESOURCE_JOB_MANAGER_ID", Arrays.asList(new String[]{"VARCHAR", "(255)", "NOT", "NULL"}));
+		data.getPrimaryKeys().add("JOB_SUBMISSION_INTERFACE_ID");
+		data.getForiegnKeys().put("RESOURCE_JOB_MANAGER_ID", new SQLData.ForiegnKeyData("RESOURCE_JOB_MANAGER(RESOURCE_JOB_MANAGER_ID)","ResourceJobManager","ResourceJobManagerResource"));
+		return data;
+	}
+	public static void testSqlGen() {
+		SQLData data = createSQLData();
+		SQLGenerator sqlGenerator = new SQLGenerator();
+		System.out.println(sqlGenerator.generateSQLCreateQuery(data));
+	}
+	
+	public static void testJPAClassGen() {
+		SQLData data = createSQLData();
+		JPAClassGenerator jpaClassGenerator = new JPAClassGenerator();
+		jpaClassGenerator.setJpaClassPackageName("org.apache.aiaravata.application.catalog.data.model");
+		JPAClassModel model = jpaClassGenerator.createJPAClassModel(data);
+		System.out.println(jpaClassGenerator.generateJPAClass(model));
+		System.out.println(jpaClassGenerator.generateJPAPKClass(model.pkClassModel));
+		System.out.println(jpaClassGenerator.generatePersistenceXmlEntry(model));
+	}
+	
+	public static void testJPAResourceClassGen() {
+		SQLData data = createSQLData();
+		JPAClassGenerator jpaClassGenerator = new JPAClassGenerator();
+		JPAClassModel model = jpaClassGenerator.createJPAClassModel(data);
+		JPAResourceClassGenerator jpaResourceClassGenerator = new JPAResourceClassGenerator();
+		jpaResourceClassGenerator.setExceptionClassName("AppCatalogException");
+		jpaResourceClassGenerator.setJpaUtilsClassName("AppCatalogJPAUtils");
+		jpaResourceClassGenerator.setResourceTypeClassName("AppCatalogResourceType");
+		jpaResourceClassGenerator.setQueryGeneratorClassName("AppCatalogQueryGenerator");
+
+		JPAResourceClassModel model2 = jpaResourceClassGenerator.createJPAResourceClassModel(model);
+		System.out.println(jpaResourceClassGenerator.generateJPAResourceClass(model2));
+		System.out.println(jpaResourceClassGenerator.generateAbstractResourceClassUpdates(model2));
+		System.out.println(jpaResourceClassGenerator.generateAppCatalogResourceTypeUpdates(model2));
+		System.out.println(jpaResourceClassGenerator.generateAppCatalogJPAUtilUpdates(model2));
+		
+	}
+	public static void main(String[] args) {
+		testSqlGen();
+		testJPAClassGen();
+		testJPAResourceClassGen();
+	}
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/6c1eebe3/modules/registry/registry-tools/jpa-gen/src/main/java/appcatalog/computeresource/ModuleCMDGenerator.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-tools/jpa-gen/src/main/java/appcatalog/computeresource/ModuleCMDGenerator.java b/modules/registry/registry-tools/jpa-gen/src/main/java/appcatalog/computeresource/ModuleCMDGenerator.java
new file mode 100644
index 0000000..2b08708
--- /dev/null
+++ b/modules/registry/registry-tools/jpa-gen/src/main/java/appcatalog/computeresource/ModuleCMDGenerator.java
@@ -0,0 +1,82 @@
+/*
+ *
+ * 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 appcatalog.computeresource;
+
+import generators.JPAClassGenerator;
+import generators.JPAResourceClassGenerator;
+import generators.SQLGenerator;
+import model.JPAClassModel;
+import model.JPAResourceClassModel;
+import model.SQLData;
+
+import java.util.Arrays;
+
+public class ModuleCMDGenerator {
+    private static SQLData createSQLData() {
+        SQLData data = new SQLData();
+        data.setTableName("MODULE_LOAD_CMD");
+        data.getFieldData().put("CMD", Arrays.asList(new String[]{"VARCHAR", "(255)", "NOT", "NULL"}));
+        data.getFieldData().put("APP_DEPLOYMENT_ID", Arrays.asList(new String[]{"VARCHAR", "(255)", "NOT", "NULL"}));
+        data.getPrimaryKeys().add("APP_DEPLOYMENT_ID");
+        data.getPrimaryKeys().add("CMD");
+        data.getForiegnKeys().put("APP_DEPLOYMENT_ID", new SQLData.ForiegnKeyData("APPLICATION_DEPLOYMENT(DEPLOYMENT_ID)","ApplicationDeployment","AppDeploymentResource"));
+        return data;
+    }
+    public static void testSqlGen() {
+        SQLData data = createSQLData();
+        SQLGenerator sqlGenerator = new SQLGenerator();
+        System.out.println(sqlGenerator.generateSQLCreateQuery(data));
+    }
+
+    public static void testJPAClassGen() {
+        SQLData data = createSQLData();
+        JPAClassGenerator jpaClassGenerator = new JPAClassGenerator();
+        jpaClassGenerator.setJpaClassPackageName("org.apache.aiaravata.application.catalog.data.model");
+        JPAClassModel model = jpaClassGenerator.createJPAClassModel(data);
+        System.out.println(jpaClassGenerator.generateJPAClass(model));
+        System.out.println(jpaClassGenerator.generateJPAPKClass(model.pkClassModel));
+        System.out.println(jpaClassGenerator.generatePersistenceXmlEntry(model));
+    }
+
+    public static void testJPAResourceClassGen() {
+        SQLData data = createSQLData();
+        JPAClassGenerator jpaClassGenerator = new JPAClassGenerator();
+        JPAClassModel model = jpaClassGenerator.createJPAClassModel(data);
+        JPAResourceClassGenerator jpaResourceClassGenerator = new JPAResourceClassGenerator();
+        jpaResourceClassGenerator.setExceptionClassName("AppCatalogException");
+        jpaResourceClassGenerator.setJpaUtilsClassName("AppCatalogJPAUtils");
+        jpaResourceClassGenerator.setResourceTypeClassName("AppCatalogResourceType");
+        jpaResourceClassGenerator.setQueryGeneratorClassName("AppCatalogQueryGenerator");
+
+        JPAResourceClassModel model2 = jpaResourceClassGenerator.createJPAResourceClassModel(model);
+        System.out.println(jpaResourceClassGenerator.generateJPAResourceClass(model2));
+        System.out.println(jpaResourceClassGenerator.generateAbstractResourceClassUpdates(model2));
+        System.out.println(jpaResourceClassGenerator.generateAppCatalogResourceTypeUpdates(model2));
+        System.out.println(jpaResourceClassGenerator.generateAppCatalogJPAUtilUpdates(model2));
+
+    }
+    public static void main(String[] args) {
+        testSqlGen();
+        testJPAClassGen();
+        testJPAResourceClassGen();
+    }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/6c1eebe3/modules/registry/registry-tools/jpa-gen/src/main/java/appcatalog/computeresource/ResourceJobManagerGenerator.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-tools/jpa-gen/src/main/java/appcatalog/computeresource/ResourceJobManagerGenerator.java b/modules/registry/registry-tools/jpa-gen/src/main/java/appcatalog/computeresource/ResourceJobManagerGenerator.java
new file mode 100644
index 0000000..3a1a8e0
--- /dev/null
+++ b/modules/registry/registry-tools/jpa-gen/src/main/java/appcatalog/computeresource/ResourceJobManagerGenerator.java
@@ -0,0 +1,83 @@
+/*
+ *
+ * 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 appcatalog.computeresource;
+
+import generators.JPAClassGenerator;
+import generators.JPAResourceClassGenerator;
+import generators.SQLGenerator;
+
+import java.util.Arrays;
+
+import model.JPAClassModel;
+import model.JPAResourceClassModel;
+import model.SQLData;
+
+public class ResourceJobManagerGenerator {
+	private static SQLData createSQLData() {
+		SQLData data = new SQLData();
+		data.setTableName("RESOURCE_JOB_MANAGER");
+		data.getFieldData().put("RESOURCE_JOB_MANAGER_ID", Arrays.asList(new String[]{"VARCHAR", "(255)", "NOT", "NULL"}));
+		data.getFieldData().put("RESOURCE_JOB_MANAGER_TYPE", Arrays.asList(new String[]{"VARCHAR", "(255)", "NOT", "NULL"}));
+		data.getFieldData().put("PUSH_MONITORING_ENDPOINT", Arrays.asList(new String[]{"VARCHAR", "(255)",}));
+		data.getFieldData().put("JOB_MANAGER_BIN_PATH", Arrays.asList(new String[]{"VARCHAR", "(255)",}));
+		data.getPrimaryKeys().add("RESOURCE_JOB_MANAGER_ID");
+		return data;
+	}
+	public static void testSqlGen() {
+		SQLData data = createSQLData();
+		SQLGenerator sqlGenerator = new SQLGenerator();
+		System.out.println(sqlGenerator.generateSQLCreateQuery(data));
+	}
+	
+	public static void testJPAClassGen() {
+		SQLData data = createSQLData();
+		JPAClassGenerator jpaClassGenerator = new JPAClassGenerator();
+		jpaClassGenerator.setJpaClassPackageName("org.apache.aiaravata.application.catalog.data.model");
+		JPAClassModel model = jpaClassGenerator.createJPAClassModel(data);
+		System.out.println(jpaClassGenerator.generateJPAClass(model));
+		System.out.println(jpaClassGenerator.generateJPAPKClass(model.pkClassModel));
+		System.out.println(jpaClassGenerator.generatePersistenceXmlEntry(model));
+	}
+	
+	public static void testJPAResourceClassGen() {
+		SQLData data = createSQLData();
+		JPAClassGenerator jpaClassGenerator = new JPAClassGenerator();
+		JPAClassModel model = jpaClassGenerator.createJPAClassModel(data);
+		JPAResourceClassGenerator jpaResourceClassGenerator = new JPAResourceClassGenerator();
+		jpaResourceClassGenerator.setExceptionClassName("AppCatalogException");
+		jpaResourceClassGenerator.setJpaUtilsClassName("AppCatalogJPAUtils");
+		jpaResourceClassGenerator.setResourceTypeClassName("AppCatalogResourceType");
+		jpaResourceClassGenerator.setQueryGeneratorClassName("AppCatalogQueryGenerator");
+
+		JPAResourceClassModel model2 = jpaResourceClassGenerator.createJPAResourceClassModel(model);
+		System.out.println(jpaResourceClassGenerator.generateJPAResourceClass(model2));
+		System.out.println(jpaResourceClassGenerator.generateAbstractResourceClassUpdates(model2));
+		System.out.println(jpaResourceClassGenerator.generateAppCatalogResourceTypeUpdates(model2));
+		System.out.println(jpaResourceClassGenerator.generateAppCatalogJPAUtilUpdates(model2));
+		
+	}
+	public static void main(String[] args) {
+		testSqlGen();
+		testJPAClassGen();
+		testJPAResourceClassGen();
+	}
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/6c1eebe3/modules/registry/registry-tools/jpa-gen/src/main/java/appcatalog/computeresource/SCPDataMovementGenerator.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-tools/jpa-gen/src/main/java/appcatalog/computeresource/SCPDataMovementGenerator.java b/modules/registry/registry-tools/jpa-gen/src/main/java/appcatalog/computeresource/SCPDataMovementGenerator.java
new file mode 100644
index 0000000..6c196d3
--- /dev/null
+++ b/modules/registry/registry-tools/jpa-gen/src/main/java/appcatalog/computeresource/SCPDataMovementGenerator.java
@@ -0,0 +1,83 @@
+/*
+ *
+ * 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 appcatalog.computeresource;
+
+import generators.JPAClassGenerator;
+import generators.JPAResourceClassGenerator;
+import generators.SQLGenerator;
+
+import java.util.Arrays;
+
+import model.JPAClassModel;
+import model.JPAResourceClassModel;
+import model.SQLData;
+
+public class SCPDataMovementGenerator {
+	private static SQLData createSQLData() {
+		SQLData data = new SQLData();
+		data.setTableName("SCP_DATA_MOVEMENT");
+		data.getFieldData().put("DATA_MOVEMENT_INTERFACE_ID", Arrays.asList(new String[]{"VARCHAR", "(255)", "NOT", "NULL"}));
+		data.getFieldData().put("SECURITY_PROTOCOL", Arrays.asList(new String[]{"VARCHAR", "(255)", "NOT", "NULL"}));
+		data.getFieldData().put("ALTERNATIVE_SCP_HOSTNAME", Arrays.asList(new String[]{"VARCHAR", "(255)"}));
+		data.getFieldData().put("SSH_PORT", Arrays.asList(new String[]{"INTEGER"}));
+		data.getPrimaryKeys().add("DATA_MOVEMENT_INTERFACE_ID");
+		return data;
+	}
+	public static void testSqlGen() {
+		SQLData data = createSQLData();
+		SQLGenerator sqlGenerator = new SQLGenerator();
+		System.out.println(sqlGenerator.generateSQLCreateQuery(data));
+	}
+	
+	public static void testJPAClassGen() {
+		SQLData data = createSQLData();
+		JPAClassGenerator jpaClassGenerator = new JPAClassGenerator();
+		jpaClassGenerator.setJpaClassPackageName("org.apache.aiaravata.application.catalog.data.model");
+		JPAClassModel model = jpaClassGenerator.createJPAClassModel(data);
+		System.out.println(jpaClassGenerator.generateJPAClass(model));
+		System.out.println(jpaClassGenerator.generateJPAPKClass(model.pkClassModel));
+		System.out.println(jpaClassGenerator.generatePersistenceXmlEntry(model));
+	}
+	
+	public static void testJPAResourceClassGen() {
+		SQLData data = createSQLData();
+		JPAClassGenerator jpaClassGenerator = new JPAClassGenerator();
+		JPAClassModel model = jpaClassGenerator.createJPAClassModel(data);
+		JPAResourceClassGenerator jpaResourceClassGenerator = new JPAResourceClassGenerator();
+		jpaResourceClassGenerator.setExceptionClassName("AppCatalogException");
+		jpaResourceClassGenerator.setJpaUtilsClassName("AppCatalogJPAUtils");
+		jpaResourceClassGenerator.setResourceTypeClassName("AppCatalogResourceType");
+		jpaResourceClassGenerator.setQueryGeneratorClassName("AppCatalogQueryGenerator");
+
+		JPAResourceClassModel model2 = jpaResourceClassGenerator.createJPAResourceClassModel(model);
+		System.out.println(jpaResourceClassGenerator.generateJPAResourceClass(model2));
+		System.out.println(jpaResourceClassGenerator.generateAbstractResourceClassUpdates(model2));
+		System.out.println(jpaResourceClassGenerator.generateAppCatalogResourceTypeUpdates(model2));
+		System.out.println(jpaResourceClassGenerator.generateAppCatalogJPAUtilUpdates(model2));
+		
+	}
+	public static void main(String[] args) {
+		testSqlGen();
+		testJPAClassGen();
+		testJPAResourceClassGen();
+	}
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/6c1eebe3/modules/registry/registry-tools/jpa-gen/src/main/java/appcatalog/computeresource/SSHJobSubmissionGenerator.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-tools/jpa-gen/src/main/java/appcatalog/computeresource/SSHJobSubmissionGenerator.java b/modules/registry/registry-tools/jpa-gen/src/main/java/appcatalog/computeresource/SSHJobSubmissionGenerator.java
new file mode 100644
index 0000000..50f1fd1
--- /dev/null
+++ b/modules/registry/registry-tools/jpa-gen/src/main/java/appcatalog/computeresource/SSHJobSubmissionGenerator.java
@@ -0,0 +1,85 @@
+/*
+ *
+ * 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 appcatalog.computeresource;
+
+import generators.JPAClassGenerator;
+import generators.JPAResourceClassGenerator;
+import generators.SQLGenerator;
+
+import java.util.Arrays;
+
+import model.JPAClassModel;
+import model.JPAResourceClassModel;
+import model.SQLData;
+
+public class SSHJobSubmissionGenerator {
+	private static SQLData createSQLData() {
+		SQLData data = new SQLData();
+		data.setTableName("SSH_JOB_SUBMISSION");
+		data.getFieldData().put("JOB_SUBMISSION_INTERFACE_ID", Arrays.asList(new String[]{"VARCHAR", "(255)", "NOT", "NULL"}));
+		data.getFieldData().put("SECURITY_PROTOCOL", Arrays.asList(new String[]{"VARCHAR", "(255)", "NOT", "NULL"}));
+		data.getFieldData().put("RESOURCE_JOB_MANAGER_ID", Arrays.asList(new String[]{"VARCHAR", "(255)","NOT", "NULL"}));
+		data.getFieldData().put("ALTERNATIVE_SSH_HOSTNAME", Arrays.asList(new String[]{"VARCHAR", "(255)"}));
+		data.getFieldData().put("SSH_PORT", Arrays.asList(new String[]{"INTEGER"}));
+		data.getPrimaryKeys().add("JOB_SUBMISSION_INTERFACE_ID");
+		data.getForiegnKeys().put("RESOURCE_JOB_MANAGER_ID", new SQLData.ForiegnKeyData("RESOURCE_JOB_MANAGER(RESOURCE_JOB_MANAGER_ID)","ResourceJobManager","ResourceJobManagerResource"));
+		return data;
+	}
+	public static void testSqlGen() {
+		SQLData data = createSQLData();
+		SQLGenerator sqlGenerator = new SQLGenerator();
+		System.out.println(sqlGenerator.generateSQLCreateQuery(data));
+	}
+	
+	public static void testJPAClassGen() {
+		SQLData data = createSQLData();
+		JPAClassGenerator jpaClassGenerator = new JPAClassGenerator();
+		jpaClassGenerator.setJpaClassPackageName("org.apache.aiaravata.application.catalog.data.model");
+		JPAClassModel model = jpaClassGenerator.createJPAClassModel(data);
+		System.out.println(jpaClassGenerator.generateJPAClass(model));
+		System.out.println(jpaClassGenerator.generateJPAPKClass(model.pkClassModel));
+		System.out.println(jpaClassGenerator.generatePersistenceXmlEntry(model));
+	}
+	
+	public static void testJPAResourceClassGen() {
+		SQLData data = createSQLData();
+		JPAClassGenerator jpaClassGenerator = new JPAClassGenerator();
+		JPAClassModel model = jpaClassGenerator.createJPAClassModel(data);
+		JPAResourceClassGenerator jpaResourceClassGenerator = new JPAResourceClassGenerator();
+		jpaResourceClassGenerator.setExceptionClassName("AppCatalogException");
+		jpaResourceClassGenerator.setJpaUtilsClassName("AppCatalogJPAUtils");
+		jpaResourceClassGenerator.setResourceTypeClassName("AppCatalogResourceType");
+		jpaResourceClassGenerator.setQueryGeneratorClassName("AppCatalogQueryGenerator");
+
+		JPAResourceClassModel model2 = jpaResourceClassGenerator.createJPAResourceClassModel(model);
+		System.out.println(jpaResourceClassGenerator.generateJPAResourceClass(model2));
+		System.out.println(jpaResourceClassGenerator.generateAbstractResourceClassUpdates(model2));
+		System.out.println(jpaResourceClassGenerator.generateAppCatalogResourceTypeUpdates(model2));
+		System.out.println(jpaResourceClassGenerator.generateAppCatalogJPAUtilUpdates(model2));
+		
+	}
+	public static void main(String[] args) {
+		testSqlGen();
+		testJPAClassGen();
+		testJPAResourceClassGen();
+	}
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/6c1eebe3/modules/registry/registry-tools/jpa-gen/src/main/java/generators/AbstractGenerator.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-tools/jpa-gen/src/main/java/generators/AbstractGenerator.java b/modules/registry/registry-tools/jpa-gen/src/main/java/generators/AbstractGenerator.java
new file mode 100644
index 0000000..b4fb643
--- /dev/null
+++ b/modules/registry/registry-tools/jpa-gen/src/main/java/generators/AbstractGenerator.java
@@ -0,0 +1,119 @@
+package generators;
+
+import java.util.List;
+
+/*
+ *
+ * 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.
+ *
+ */
+
+public class AbstractGenerator {
+	private static final String TAB="\t";
+	
+	protected String removeLastChar(String s) {
+		return s.substring(0, s.length()-1);
+	}
+	
+	protected String addLines(String s, String...lines){
+		for (String line : lines) {
+			s=((s==null||s.equals(""))?"":s+"\n")+line;
+		}
+		return s;
+	}
+	
+	protected String convertToJavaTitleCaseStringConvention(String s){
+		String result="";
+		String[] split = s.split("_");
+		for (String item : split) {
+			result+=(item.toUpperCase().substring(0,1)+(item.length()>1?item.toLowerCase().substring(1):""));
+		}
+		return result;
+	}
+	
+	protected String convertToJavaVariableNameCaseStringConvention(String s){
+		String result=null;
+		String[] split = s.split("_");
+		for (String item : split) {
+			result=(result==null?item.toLowerCase():result+(item.toUpperCase().substring(0,1)+(item.length()>1?item.toLowerCase().substring(1):"")));
+		}
+		return result;
+	}
+	
+	protected String convertToJavaConstantNameCaseStringConvention(String s){
+		String result="";
+		for (int i = 0; i < s.length(); i++) {
+			String c=String.valueOf(s.charAt(i));
+			result+=((c.toUpperCase().equals(c) && !result.equals(""))?"_"+c:c.toUpperCase());
+		}
+		return result;
+	}
+	
+	protected String convertToTitleCaseString(String s){
+		String result="";
+		for (int i = 0; i < s.length(); i++) {
+			String c=String.valueOf(s.charAt(i));
+			result+=((c.toUpperCase().equals(c) && !result.equals(""))?" ":"")+c;
+		}
+		return result;
+	}
+	
+	protected String tabs(int n){
+		String result="";
+		for (int i = 0; i < n; i++) {
+			result+=TAB;
+		}
+		return result;
+	}
+	
+	protected String commaSeperatedString(List<String> list, String delimiter){
+		String result=null;
+		for (String s : list) {
+			result=(result==null?s:result+delimiter+s);
+		}
+		return result;
+	}
+	
+	protected String createFieldVarString(String dataType, String fieldName){
+		return "private " + dataType + " " + fieldName + ";";
+	}
+	
+	protected String createSetterString(int indents,String fieldName,
+			String dataType, String fieldTitleString) {
+	    String setterString=null;
+		setterString=addLines(setterString, tabs(indents));
+		setterString=addLines(setterString,tabs(indents)+"public void set"+fieldTitleString+"("+dataType+" "+fieldName+") {");
+		setterString=addLines(setterString,tabs(indents+1)+"this."+fieldName+"="+fieldName+";");
+		setterString=addLines(setterString,tabs(indents)+"}");
+		return setterString;
+	}
+
+	protected String createGetterString(int indents, String fieldName,
+			String dataType, String fieldTitleString) {
+	    String getterString=null;
+		getterString=addLines(getterString, tabs(indents));
+		getterString=addLines(getterString,tabs(indents)+"public "+dataType+" get"+fieldTitleString+"() {");
+		getterString=addLines(getterString,tabs(indents+1)+"return "+fieldName+";");
+		getterString=addLines(getterString,tabs(indents)+"}");
+		return getterString;
+	}
+	
+	protected String createVarNameFromClassName(String s){
+		return s.substring(0,1).toLowerCase()+s.substring(1);
+	}
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/6c1eebe3/modules/registry/registry-tools/jpa-gen/src/main/java/generators/JPAClassGenerator.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-tools/jpa-gen/src/main/java/generators/JPAClassGenerator.java b/modules/registry/registry-tools/jpa-gen/src/main/java/generators/JPAClassGenerator.java
new file mode 100644
index 0000000..a83e43e
--- /dev/null
+++ b/modules/registry/registry-tools/jpa-gen/src/main/java/generators/JPAClassGenerator.java
@@ -0,0 +1,224 @@
+package generators;
+import java.util.ArrayList;
+import java.util.List;
+
+import model.JPAClassField;
+import model.JPAClassModel;
+import model.JPAPKClassModel;
+import model.SQLData;
+
+
+/*
+ *
+ * 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.
+ *
+ */
+
+public class JPAClassGenerator extends AbstractGenerator{
+//    private static final Logger log = LoggerFactory.getLogger(JPAClassGenerator.class);
+	private String jpaClassPackageName;
+	
+    public JPAClassModel createJPAClassModel(SQLData sqlData){
+		JPAClassModel model = new JPAClassModel();
+		model.generatePKClass=sqlData.getPrimaryKeys().size()>1;
+		model.tableName=sqlData.getTableName();
+		model.className = convertToJavaTitleCaseStringConvention(sqlData.getTableName());
+		if (model.generatePKClass) {
+			model.pkClassModel.className=model.className+"_PK";
+		}
+		for (String field : sqlData.getFieldData().keySet()) {
+		    String dataType = null;
+		    SQLGenerator.DataTypes sqlDataType = SQLGenerator.DataTypes.valueOf(sqlData.getFieldData().get(field).get(0));
+		    switch (sqlDataType){
+		    case LONGTEXT:case VARCHAR:
+		    	dataType="String"; break;
+		    case INTEGER: 
+		    	dataType="int"; break;
+		    case SMALLINT:
+		    	dataType="boolean"; break;
+		    case TIMESTAMP: 
+		    	dataType="Timestamp"; break;
+		    case CLOB:
+		    	dataType="String"; break;
+		    }
+		    String fieldTitleString = convertToJavaTitleCaseStringConvention(field);
+		    String fieldName = convertToJavaVariableNameCaseStringConvention(field);
+
+		    
+		    boolean foriegnKey = sqlData.getForiegnKeys().containsKey(field);
+			JPAClassField jpaField = new JPAClassField(field,fieldName,dataType,fieldTitleString,sqlData.getPrimaryKeys().contains(field),
+		    		foriegnKey,(foriegnKey?sqlData.getForiegnKeys().get(field).jpaClassName:null),
+		    		(foriegnKey?sqlData.getForiegnKeys().get(field).jpaResourceClassName:null));
+			model.fields.add(jpaField);
+		    if (model.generatePKClass){
+		    	if (sqlData.getPrimaryKeys().contains(field)){
+		    		model.pkClassModel.pkFields.add(jpaField);
+		    	}
+		    }
+		    
+		}
+		return model;
+	}
+    
+	public String generateJPAClass(JPAClassModel model){
+		String classStr = null;
+		String pkClassName = null;
+		classStr=addLines(classStr,"@DataCache");
+		classStr=addLines(classStr,"@Entity");
+		classStr=addLines(classStr,"@Table(name = \""+model.tableName+"\")");
+		String className = model.className;
+		if (model.generatePKClass) {
+			pkClassName=model.pkClassModel.className;
+			classStr = addLines(classStr,"@IdClass("+pkClassName+".class)");
+		}
+		classStr=addLines(classStr,"public class "+className+" implements Serializable {");
+		
+		List<String> columnFields=new ArrayList<String>();
+		List<String> fieldGetters=new ArrayList<String>();
+		List<String> fieldSetters=new ArrayList<String>();
+		for (JPAClassField jpaField : model.fields) {
+			String field=jpaField.tableColumnName;
+		    String fieldString=null;
+		    
+		    String fieldName = jpaField.fieldName;
+		    String dataType = jpaField.fieldDataType;
+		    String fieldTitleString = jpaField.fieldTitle;
+
+		    
+		    fieldString=addLines(fieldString, tabs(1));
+		    if (jpaField.primaryKey){
+		    	fieldString=addLines(fieldString,tabs(1)+"@Id");	
+		    }
+		    fieldString=addLines(fieldString,tabs(1)+"@Column(name = \""+field+"\")");
+			fieldString=addLines(fieldString,tabs(1)+createFieldVarString(dataType ,fieldName));
+		    columnFields.add(fieldString);
+		    
+		    
+		    fieldGetters.add(createGetterString(1, fieldName,dataType, fieldTitleString));
+
+		    fieldSetters.add(createSetterString(1, fieldName,dataType, fieldTitleString));
+		    
+		    if (jpaField.foriegnKey){
+			    fieldString=null;
+			    
+			    fieldName = createVarNameFromClassName(jpaField.foriegnKeyJPAClass);
+			    dataType = jpaField.foriegnKeyJPAClass;
+			    fieldTitleString = jpaField.foriegnKeyJPAClass;
+			    
+			    
+			    fieldString=addLines(fieldString, tabs(1));
+			    fieldString=addLines(fieldString,tabs(1)+"@ManyToOne(cascade= CascadeType.MERGE)");
+			    fieldString=addLines(fieldString,tabs(1)+"@JoinColumn(name = \""+jpaField.tableColumnName+"\")");
+				fieldString=addLines(fieldString,tabs(1)+createFieldVarString(dataType ,fieldName));
+				columnFields.add(fieldString);
+				
+			    fieldGetters.add(createGetterString(1, fieldName,dataType, fieldTitleString));
+
+			    fieldSetters.add(createSetterString(1, fieldName,dataType, fieldTitleString));
+		    }
+		}
+		classStr=addLines(classStr,columnFields.toArray(new String[]{}));
+		classStr=addLines(classStr,fieldGetters.toArray(new String[]{}));
+		classStr=addLines(classStr,fieldSetters.toArray(new String[]{}));
+		
+		classStr=addLines(classStr,"}");
+		return classStr;
+	}
+
+	public String generateJPAPKClass(JPAPKClassModel model){
+		if (model.pkFields.size()==0){
+			return "";
+		}
+		String classStr=null;
+		classStr=addLines(classStr,"public class "+model.className+" implements Serializable {");
+		
+		List<String> columnFields=new ArrayList<String>();
+		List<String> fieldGetters=new ArrayList<String>();
+		List<String> fieldSetters=new ArrayList<String>();
+		List<String> parameterList=new ArrayList<String>();
+		String constructorMethod=null;
+		for (JPAClassField jpaField : model.pkFields) {
+		    
+		    String dataType = jpaField.fieldDataType;
+		    String fieldTitleString = jpaField.fieldTitle;
+		    String fieldName = jpaField.fieldName;
+		    
+		    String fieldString=tabs(1)+createFieldVarString(dataType ,fieldName);
+		    columnFields.add(fieldString);
+		    
+		    
+		    fieldGetters.add(createGetterString(1, fieldName, dataType, fieldTitleString));
+
+		    fieldSetters.add(createSetterString(1, fieldName,	dataType, fieldTitleString));
+
+		    parameterList.add(dataType+" "+fieldName);
+		    constructorMethod=addLines(constructorMethod, tabs(2)+"this."+fieldName+" = "+fieldName+";");
+		}
+		classStr=addLines(classStr,columnFields.toArray(new String[]{}));
+		String constructorParametersString=commaSeperatedString(parameterList,", ");
+		constructorMethod=addLines(tabs(1), tabs(1)+"public "+model.className+"("+constructorParametersString+"){",constructorMethod);
+		constructorMethod=addLines(constructorMethod, tabs(1)+"}");
+		String emptyConstructorMethod=null;
+		emptyConstructorMethod=addLines(tabs(1),tabs(1)+"public "+model.className+"(){",tabs(1)+"}");
+		
+		classStr=addLines(classStr,emptyConstructorMethod);
+		classStr=addLines(classStr,constructorMethod);
+		
+
+
+
+		classStr=addLines(classStr,tabs(1));
+		classStr=addLines(classStr,tabs(1)+"@Override");
+		classStr=addLines(classStr,tabs(1)+"public boolean equals(Object o) {");
+		classStr=addLines(classStr,tabs(2)+"return false;");
+		classStr=addLines(classStr,tabs(1)+"}");
+
+		classStr=addLines(classStr,tabs(1));
+		classStr=addLines(classStr,tabs(1)+"@Override");
+		classStr=addLines(classStr,tabs(1)+"public int hashCode() {");
+		classStr=addLines(classStr,tabs(2)+"return 1;");
+		classStr=addLines(classStr,tabs(1)+"}");
+	    
+		classStr=addLines(classStr,fieldGetters.toArray(new String[]{}));
+		classStr=addLines(classStr,fieldSetters.toArray(new String[]{}));
+		
+		classStr=addLines(classStr,"}");
+		return classStr;
+	}
+
+	public String generatePersistenceXmlEntry(JPAClassModel model){
+		String xmlEntry=null;
+		xmlEntry=addLines(xmlEntry,"<persistence xmlns=\"http://java.sun.com/xml/ns/persistence\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" version=\"1.0\">");
+		xmlEntry=addLines(xmlEntry,tabs(1)+"<persistence-unit name=\"appcatalog_data\">");
+		xmlEntry=addLines(xmlEntry,tabs(2)+"<provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>");
+		xmlEntry=addLines(xmlEntry,tabs(2)+"<class>"+getJpaClassPackageName()+"."+model.className+"</class>");
+		xmlEntry=addLines(xmlEntry,tabs(2)+"<exclude-unlisted-classes>true</exclude-unlisted-classes>");
+		xmlEntry=addLines(xmlEntry,tabs(1)+"</persistence-unit>");
+		xmlEntry=addLines(xmlEntry,"</persistence>");
+		return xmlEntry;
+	}
+	
+	public String getJpaClassPackageName() {
+		return jpaClassPackageName;
+	}
+
+	public void setJpaClassPackageName(String jpaClassPackageName) {
+		this.jpaClassPackageName = jpaClassPackageName;
+	}
+	
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/6c1eebe3/modules/registry/registry-tools/jpa-gen/src/main/java/generators/JPAResourceClassGenerator.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-tools/jpa-gen/src/main/java/generators/JPAResourceClassGenerator.java b/modules/registry/registry-tools/jpa-gen/src/main/java/generators/JPAResourceClassGenerator.java
new file mode 100644
index 0000000..f3f8978
--- /dev/null
+++ b/modules/registry/registry-tools/jpa-gen/src/main/java/generators/JPAResourceClassGenerator.java
@@ -0,0 +1,513 @@
+package generators;
+import java.util.ArrayList;
+import java.util.List;
+
+import model.JPAClassField;
+import model.JPAClassModel;
+import model.JPAResourceClassModel;
+
+
+/*
+ *
+ * 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.
+ *
+ */
+
+public class JPAResourceClassGenerator extends AbstractGenerator {
+	private String exceptionClassName;
+	private String jpaUtilsClassName;
+	private String resourceTypeClassName;
+	private String queryGeneratorClassName;
+	
+	public JPAResourceClassModel createJPAResourceClassModel(JPAClassModel jpaClassModel){
+		JPAResourceClassModel jpaResourceClassModel = new JPAResourceClassModel();
+		jpaResourceClassModel.jpaClassModel=jpaClassModel;
+		jpaResourceClassModel.className=jpaClassModel.className+"Resource";
+		jpaClassModel.classNameConstant=convertToJavaConstantNameCaseStringConvention(jpaClassModel.className);
+		for (JPAClassField jpaField : jpaClassModel.fields) {
+			jpaField.fieldNameConstant=convertToJavaConstantNameCaseStringConvention(jpaField.fieldName);
+		}
+		jpaResourceClassModel.jpaClassConstantClassName=jpaClassModel.className+"Constants";
+		return jpaResourceClassModel;
+	}
+	
+	public String generateJPAResourceClass(JPAResourceClassModel model){
+		String classStr = null;
+		String className = model.className;
+		classStr=addLines(classStr,"public class "+className+" extends AbstractResource {");
+		classStr=addLines(classStr,tabs(1)+"private final static Logger logger = LoggerFactory.getLogger("+className+".class);");
+
+		List<String> columnFields=new ArrayList<String>();
+		List<String> fieldGetters=new ArrayList<String>();
+		List<String> fieldSetters=new ArrayList<String>();
+		for (JPAClassField jpaField : model.jpaClassModel.fields) {
+		    String fieldName = jpaField.fieldName;
+		    String dataType = jpaField.fieldDataType;
+		    String fieldTitleString = jpaField.fieldTitle;
+		    
+			String fieldString=tabs(1)+createFieldVarString(dataType, fieldName);
+		    columnFields.add(fieldString);
+		    
+		    fieldGetters.add(createGetterString(1, fieldName, dataType, fieldTitleString));
+		    fieldSetters.add(createSetterString(1, fieldName, dataType, fieldTitleString));
+		    
+		    if (jpaField.foriegnKey){
+			    fieldName = createVarNameFromClassName(jpaField.foriegnKeyJPAResourceClass);
+			    dataType = jpaField.foriegnKeyJPAResourceClass;
+			    fieldTitleString = jpaField.foriegnKeyJPAResourceClass;
+			    
+				fieldString=tabs(1)+createFieldVarString(dataType ,fieldName);
+				columnFields.add(fieldString);
+				
+			    fieldGetters.add(createGetterString(1, fieldName,dataType, fieldTitleString));
+			    fieldSetters.add(createSetterString(1, fieldName,dataType, fieldTitleString));
+		    }
+		    
+		}
+		classStr=addLines(classStr,columnFields.toArray(new String[]{}));
+		
+		//remove method
+		classStr=addLines(classStr,tabs(1));
+		classStr=addLines(classStr,tabs(1)+"@Override");
+		classStr=addLines(classStr,tabs(1)+"public void remove(Object identifier) throws "+getExceptionClassName()+" {");
+		if (model.jpaClassModel.generatePKClass){
+			classStr=addLines(classStr,tabs(2)+"HashMap<String, String> ids;");
+			classStr=addLines(classStr,tabs(2)+"if (identifier instanceof Map) {");
+			classStr=addLines(classStr,tabs(3)+"ids = (HashMap<String, String>) identifier;");
+			classStr=addLines(classStr,tabs(2)+"} else {");
+			classStr=addLines(classStr,tabs(3)+"logger.error(\"Identifier should be a map with the field name and it's value\");");
+			classStr=addLines(classStr,tabs(3)+"throw new "+getExceptionClassName()+"(\"Identifier should be a map with the field name and it's value\");");
+            classStr=addLines(classStr,tabs(2)+"}");	
+		}
+		classStr=addLines(classStr,tabs(2)+"EntityManager em = null;");
+		classStr=addLines(classStr,tabs(2)+"try {");
+		classStr=addLines(classStr,tabs(3)+"em = "+getJpaUtilsClassName()+".getEntityManager();");
+
+		classStr=addLines(classStr,tabs(3)+"em.getTransaction().begin();");
+		classStr=addLines(classStr,tabs(3)+""+getQueryGeneratorClassName()+" generator = new "+getQueryGeneratorClassName()+"("+model.jpaClassModel.classNameConstant+");");
+		if (model.jpaClassModel.generatePKClass){
+			for(JPAClassField field:model.jpaClassModel.pkClassModel.pkFields){
+				classStr=addLines(classStr,tabs(3)+"generator.setParameter("+model.jpaClassConstantClassName+"."+field.fieldNameConstant+", ids.get("+model.jpaClassConstantClassName+"."+field.fieldNameConstant+"));");
+			}
+		}else{
+			for(JPAClassField field:model.jpaClassModel.fields){
+				if (field.primaryKey){
+					classStr=addLines(classStr,tabs(3)+"generator.setParameter("+model.jpaClassConstantClassName+"."+field.fieldNameConstant+", identifier);");
+				}
+			}
+		}
+		classStr=addLines(classStr,tabs(3)+"Query q = generator.deleteQuery(em);");
+		classStr=addLines(classStr,tabs(3)+"q.executeUpdate();");
+		classStr=addLines(classStr,tabs(3)+"em.getTransaction().commit();");
+		classStr=addLines(classStr,tabs(3)+"em.close();");
+		classStr=addLines(classStr,tabs(2)+"} catch (ApplicationSettingsException e) {");
+		classStr=addLines(classStr,tabs(3)+"logger.error(e.getMessage(), e);");
+		classStr=addLines(classStr,tabs(3)+"throw new "+getExceptionClassName()+"(e);");
+		classStr=addLines(classStr,tabs(2)+"} finally {");
+		classStr=addLines(classStr,tabs(3)+"if (em != null && em.isOpen()) {");
+		classStr=addLines(classStr,tabs(4)+"if (em.getTransaction().isActive()) {");
+		classStr=addLines(classStr,tabs(5)+"em.getTransaction().rollback();");
+		classStr=addLines(classStr,tabs(4)+"}");
+		classStr=addLines(classStr,tabs(4)+"em.close();");
+		classStr=addLines(classStr,tabs(3)+"}");
+		classStr=addLines(classStr,tabs(2)+"}");
+        
+		classStr=addLines(classStr,tabs(1)+"}");
+		
+		//get method for resource class
+		classStr=addLines(classStr,tabs(1));
+		classStr=addLines(classStr,tabs(1)+"@Override");
+		classStr=addLines(classStr,tabs(1)+"public Resource get(Object identifier) throws "+getExceptionClassName()+" {");
+		
+		if (model.jpaClassModel.generatePKClass){
+			classStr=addLines(classStr,tabs(2)+"HashMap<String, String> ids;");
+			classStr=addLines(classStr,tabs(2)+"if (identifier instanceof Map) {");
+			classStr=addLines(classStr,tabs(3)+"ids = (HashMap<String, String>) identifier;");
+			classStr=addLines(classStr,tabs(2)+"} else {");
+			classStr=addLines(classStr,tabs(3)+"logger.error(\"Identifier should be a map with the field name and it's value\");");
+			classStr=addLines(classStr,tabs(3)+"throw new "+getExceptionClassName()+"(\"Identifier should be a map with the field name and it's value\");");
+            classStr=addLines(classStr,tabs(2)+"}");	
+		}
+		classStr=addLines(classStr,tabs(2)+"EntityManager em = null;");
+		classStr=addLines(classStr,tabs(2)+"try {");
+		classStr=addLines(classStr,tabs(3)+"em = "+getJpaUtilsClassName()+".getEntityManager();");
+
+		classStr=addLines(classStr,tabs(3)+"em.getTransaction().begin();");
+		classStr=addLines(classStr,tabs(3)+""+getQueryGeneratorClassName()+" generator = new "+getQueryGeneratorClassName()+"("+model.jpaClassModel.classNameConstant+");");
+		if (model.jpaClassModel.generatePKClass){
+			for(JPAClassField field:model.jpaClassModel.pkClassModel.pkFields){
+				classStr=addLines(classStr,tabs(3)+"generator.setParameter("+model.jpaClassConstantClassName+"."+field.fieldNameConstant+", ids.get("+model.jpaClassConstantClassName+"."+field.fieldNameConstant+"));");
+			}
+		}else{
+			for(JPAClassField field:model.jpaClassModel.fields){
+				if (field.primaryKey){
+					classStr=addLines(classStr,tabs(3)+"generator.setParameter("+model.jpaClassConstantClassName+"."+field.fieldNameConstant+", identifier);");
+				}
+			}
+		}
+
+		classStr=addLines(classStr,tabs(3)+"Query q = generator.selectQuery(em);");
+		String jpaObjVar=createVarNameFromClassName(model.jpaClassModel.className);
+		classStr=addLines(classStr,tabs(3)+model.jpaClassModel.className+" "+jpaObjVar+" = ("+model.jpaClassModel.className+") q.getSingleResult();");
+		String jpaObjVarResource=createVarNameFromClassName(model.className);
+		classStr=addLines(classStr,tabs(3)+model.className+" "+jpaObjVarResource+" = ("+model.className+") "+getJpaUtilsClassName()+".getResource("+getResourceTypeClassName()+"."+model.jpaClassModel.classNameConstant+", "+jpaObjVar+");");
+		classStr=addLines(classStr,tabs(3)+"em.getTransaction().commit();");
+		classStr=addLines(classStr,tabs(3)+"em.close();");
+		classStr=addLines(classStr,tabs(3)+"return "+jpaObjVarResource+";");
+		classStr=addLines(classStr,tabs(2)+"} catch (ApplicationSettingsException e) {");
+		classStr=addLines(classStr,tabs(3)+"logger.error(e.getMessage(), e);");
+		classStr=addLines(classStr,tabs(3)+"throw new "+getExceptionClassName()+"(e);");
+		classStr=addLines(classStr,tabs(2)+"} finally {");
+		classStr=addLines(classStr,tabs(3)+"if (em != null && em.isOpen()) {");
+		classStr=addLines(classStr,tabs(4)+"if (em.getTransaction().isActive()) {");
+		classStr=addLines(classStr,tabs(5)+"em.getTransaction().rollback();");
+		classStr=addLines(classStr,tabs(4)+"}");
+		classStr=addLines(classStr,tabs(4)+"em.close();");
+		classStr=addLines(classStr,tabs(3)+"}");
+		classStr=addLines(classStr,tabs(2)+"}");
+		classStr=addLines(classStr,tabs(1)+"}");
+
+		classStr=addLines(classStr,tabs(1));
+		classStr=addLines(classStr,tabs(1)+"@Override");
+		classStr=addLines(classStr,tabs(1)+"public List<Resource> get(String fieldName, Object value) throws "+getExceptionClassName()+" {");
+		
+		String resultListVarName=createVarNameFromClassName(model.className)+"s";
+		classStr=addLines(classStr,tabs(2)+"List<Resource> "+resultListVarName+" = new ArrayList<Resource>();");
+		classStr=addLines(classStr,tabs(2)+"EntityManager em = null;");
+		classStr=addLines(classStr,tabs(2)+"try {");
+		classStr=addLines(classStr,tabs(3)+"em = "+getJpaUtilsClassName()+".getEntityManager();");
+
+		classStr=addLines(classStr,tabs(3)+"em.getTransaction().begin();");
+		classStr=addLines(classStr,tabs(3)+""+getQueryGeneratorClassName()+" generator = new "+getQueryGeneratorClassName()+"("+model.jpaClassModel.classNameConstant+");");
+
+		classStr=addLines(classStr,tabs(3)+"Query q;");
+		List<String> fieldNameValidations=new ArrayList<String>();
+		for(JPAClassField field:model.jpaClassModel.fields){
+			fieldNameValidations.add("(fieldName.equals("+model.jpaClassConstantClassName+"."+field.fieldNameConstant+"))");
+		}
+		String fieldNameValidationLogic = commaSeperatedString(fieldNameValidations, " || ");
+		classStr=addLines(classStr,tabs(3)+"if ("+fieldNameValidationLogic+") {");
+		classStr=addLines(classStr,tabs(4)+"generator.setParameter(fieldName, value);");
+		classStr=addLines(classStr,tabs(4)+"q = generator.selectQuery(em);");
+		classStr=addLines(classStr,tabs(4)+"List<?> results = q.getResultList();");
+		classStr=addLines(classStr,tabs(4)+"for (Object result : results) {");
+		classStr=addLines(classStr,tabs(5)+model.jpaClassModel.className+" "+jpaObjVar+" = ("+model.jpaClassModel.className+") result;");
+		classStr=addLines(classStr,tabs(5)+model.className+" "+jpaObjVarResource+" = ("+model.className+") "+getJpaUtilsClassName()+".getResource("+getResourceTypeClassName()+"."+model.jpaClassModel.classNameConstant+", "+jpaObjVar+");");
+		classStr=addLines(classStr,tabs(5)+resultListVarName+".add("+jpaObjVarResource+");");
+		classStr=addLines(classStr,tabs(4)+"}");
+		classStr=addLines(classStr,tabs(3)+"} else {");
+		classStr=addLines(classStr,tabs(4)+"em.getTransaction().commit();");
+		classStr=addLines(classStr,tabs(5)+"em.close();");
+		classStr=addLines(classStr,tabs(4)+"logger.error(\"Unsupported field name for "+convertToTitleCaseString(model.className)+".\", new IllegalArgumentException());");
+		classStr=addLines(classStr,tabs(4)+"throw new IllegalArgumentException(\"Unsupported field name for "+convertToTitleCaseString(model.className)+".\");");
+		classStr=addLines(classStr,tabs(3)+"}");
+		classStr=addLines(classStr,tabs(3)+"em.getTransaction().commit();");
+		classStr=addLines(classStr,tabs(3)+"em.close();");
+		classStr=addLines(classStr,tabs(2)+"} catch (ApplicationSettingsException e) {");
+		classStr=addLines(classStr,tabs(3)+"logger.error(e.getMessage(), e);");
+		classStr=addLines(classStr,tabs(3)+"throw new "+getExceptionClassName()+"(e);");
+		classStr=addLines(classStr,tabs(2)+"} finally {");
+		classStr=addLines(classStr,tabs(3)+"if (em != null && em.isOpen()) {");
+		classStr=addLines(classStr,tabs(4)+"if (em.getTransaction().isActive()) {");
+		classStr=addLines(classStr,tabs(5)+"em.getTransaction().rollback();");
+		classStr=addLines(classStr,tabs(4)+"}");
+		classStr=addLines(classStr,tabs(4)+"em.close();");
+		classStr=addLines(classStr,tabs(3)+"}");
+		classStr=addLines(classStr,tabs(2)+"}");
+		classStr=addLines(classStr,tabs(2)+"return "+resultListVarName+";");
+		classStr=addLines(classStr,tabs(1)+"}");
+
+		//id list method
+		classStr=addLines(classStr,tabs(1));
+		classStr=addLines(classStr,tabs(1)+"@Override");
+		classStr=addLines(classStr,tabs(1)+"public List<String> getIds(String fieldName, Object value) throws "+getExceptionClassName()+" {");
+		
+		resultListVarName=createVarNameFromClassName(model.className)+"IDs";
+		classStr=addLines(classStr,tabs(2)+"List<String> "+resultListVarName+" = new ArrayList<String>();");
+		classStr=addLines(classStr,tabs(2)+"EntityManager em = null;");
+		classStr=addLines(classStr,tabs(2)+"try {");
+		classStr=addLines(classStr,tabs(3)+"em = "+getJpaUtilsClassName()+".getEntityManager();");
+
+		classStr=addLines(classStr,tabs(3)+"em.getTransaction().begin();");
+		classStr=addLines(classStr,tabs(3)+""+getQueryGeneratorClassName()+" generator = new "+getQueryGeneratorClassName()+"("+model.jpaClassModel.classNameConstant+");");
+
+		classStr=addLines(classStr,tabs(3)+"Query q;");
+		fieldNameValidations=new ArrayList<String>();
+		for(JPAClassField field:model.jpaClassModel.fields){
+			fieldNameValidations.add("(fieldName.equals("+model.jpaClassConstantClassName+"."+field.fieldNameConstant+"))");
+		}
+		fieldNameValidationLogic = commaSeperatedString(fieldNameValidations, " || ");
+		classStr=addLines(classStr,tabs(3)+"if ("+fieldNameValidationLogic+") {");
+		classStr=addLines(classStr,tabs(4)+"generator.setParameter(fieldName, value);");
+		classStr=addLines(classStr,tabs(4)+"q = generator.selectQuery(em);");
+		classStr=addLines(classStr,tabs(4)+"List<?> results = q.getResultList();");
+		classStr=addLines(classStr,tabs(4)+"for (Object result : results) {");
+		classStr=addLines(classStr,tabs(5)+model.jpaClassModel.className+" "+jpaObjVar+" = ("+model.jpaClassModel.className+") result;");
+		classStr=addLines(classStr,tabs(5)+model.className+" "+jpaObjVarResource+" = ("+model.className+") "+getJpaUtilsClassName()+".getResource("+getResourceTypeClassName()+"."+model.jpaClassModel.classNameConstant+", "+jpaObjVar+");");
+		String idFieldToAdd=null;
+		if (model.jpaClassModel.generatePKClass){
+			for (JPAClassField field : model.jpaClassModel.fields) {
+				if (field.foriegnKey){
+					idFieldToAdd=jpaObjVarResource+".get"+field.fieldTitle+"()";
+					break;
+				}
+			}
+		}else{
+			for (JPAClassField field : model.jpaClassModel.fields) {
+				if (field.primaryKey){
+					idFieldToAdd=jpaObjVarResource+".get"+field.fieldTitle+"()";
+				}
+			}
+		}
+		classStr=addLines(classStr,tabs(5)+resultListVarName+".add("+idFieldToAdd+");");
+		classStr=addLines(classStr,tabs(4)+"}");
+		classStr=addLines(classStr,tabs(3)+"} else {");
+		classStr=addLines(classStr,tabs(4)+"em.getTransaction().commit();");
+		classStr=addLines(classStr,tabs(5)+"em.close();");
+		classStr=addLines(classStr,tabs(4)+"logger.error(\"Unsupported field name for "+convertToTitleCaseString(model.className)+".\", new IllegalArgumentException());");
+		classStr=addLines(classStr,tabs(4)+"throw new IllegalArgumentException(\"Unsupported field name for "+convertToTitleCaseString(model.className)+".\");");
+		classStr=addLines(classStr,tabs(3)+"}");
+		classStr=addLines(classStr,tabs(3)+"em.getTransaction().commit();");
+		classStr=addLines(classStr,tabs(3)+"em.close();");
+		classStr=addLines(classStr,tabs(2)+"} catch (ApplicationSettingsException e) {");
+		classStr=addLines(classStr,tabs(3)+"logger.error(e.getMessage(), e);");
+		classStr=addLines(classStr,tabs(3)+"throw new "+getExceptionClassName()+"(e);");
+		classStr=addLines(classStr,tabs(2)+"} finally {");
+		classStr=addLines(classStr,tabs(3)+"if (em != null && em.isOpen()) {");
+		classStr=addLines(classStr,tabs(4)+"if (em.getTransaction().isActive()) {");
+		classStr=addLines(classStr,tabs(5)+"em.getTransaction().rollback();");
+		classStr=addLines(classStr,tabs(4)+"}");
+		classStr=addLines(classStr,tabs(4)+"em.close();");
+		classStr=addLines(classStr,tabs(3)+"}");
+		classStr=addLines(classStr,tabs(2)+"}");
+		classStr=addLines(classStr,tabs(2)+"return "+resultListVarName+";");
+		
+		
+		classStr=addLines(classStr,tabs(1)+"}");
+		
+		//save method
+		classStr=addLines(classStr,tabs(1));
+		classStr=addLines(classStr,tabs(1)+"@Override");
+		classStr=addLines(classStr,tabs(1)+"public void save() throws "+getExceptionClassName()+" {");
+		
+		classStr=addLines(classStr,tabs(2)+"EntityManager em = null;");
+		classStr=addLines(classStr,tabs(2)+"try {");
+		classStr=addLines(classStr,tabs(3)+"em = "+getJpaUtilsClassName()+".getEntityManager();");
+		String existingJPAObjVar="existing"+model.jpaClassModel.className;
+		
+		String primaryKeySearchString=null;
+		if (model.jpaClassModel.generatePKClass){
+			List<String> fieldStrings=new ArrayList<String>();
+			for(JPAClassField field:model.jpaClassModel.pkClassModel.pkFields){
+				fieldStrings.add(field.fieldName);
+			}
+			primaryKeySearchString="new "+model.jpaClassModel.pkClassModel.className+"("+commaSeperatedString(fieldStrings, ", ")+")";
+		}else{
+			for(JPAClassField field:model.jpaClassModel.fields){
+				if (field.primaryKey){
+					primaryKeySearchString=field.fieldName;
+				}
+			}
+		}
+		classStr=addLines(classStr,tabs(3)+model.jpaClassModel.className+" "+existingJPAObjVar+" = em.find("+model.jpaClassModel.className+".class, "+primaryKeySearchString+");");
+		classStr=addLines(classStr,tabs(3)+"em.close();");
+		classStr=addLines(classStr,tabs(3)+model.jpaClassModel.className+" "+jpaObjVar+";");
+		classStr=addLines(classStr,tabs(3)+"em = "+getJpaUtilsClassName()+".getEntityManager();");
+		classStr=addLines(classStr,tabs(3)+"em.getTransaction().begin();");
+		classStr=addLines(classStr,tabs(3)+"if ("+existingJPAObjVar+" == null) {");
+		classStr=addLines(classStr,tabs(4)+jpaObjVar+" = new "+model.jpaClassModel.className+"();");
+		classStr=addLines(classStr,tabs(3)+"} else {");
+		classStr=addLines(classStr,tabs(4)+jpaObjVar+" = "+existingJPAObjVar+";");
+		classStr=addLines(classStr,tabs(3)+"}");
+		for (JPAClassField field : model.jpaClassModel.fields) {
+			classStr=addLines(classStr,tabs(3)+jpaObjVar+".set"+field.fieldTitle+"(get"+field.fieldTitle+"());");
+			if (field.foriegnKey){
+				String varNameForForiegnKeyObj = createVarNameFromClassName(field.foriegnKeyJPAClass);
+				classStr=addLines(classStr,tabs(3)+field.foriegnKeyJPAClass+" "+varNameForForiegnKeyObj+" = em.find("+field.foriegnKeyJPAClass+".class, get"+field.fieldTitle+"());");
+				classStr=addLines(classStr,tabs(3)+jpaObjVar+".set"+field.foriegnKeyJPAClass+"("+varNameForForiegnKeyObj+");");
+			}
+		}
+		classStr=addLines(classStr,tabs(3)+"if ("+existingJPAObjVar+" == null) {");
+		classStr=addLines(classStr,tabs(4)+"em.persist("+jpaObjVar+");");
+		classStr=addLines(classStr,tabs(3)+"} else {");
+		classStr=addLines(classStr,tabs(4)+"em.merge("+jpaObjVar+");");
+		classStr=addLines(classStr,tabs(3)+"}");
+		classStr=addLines(classStr,tabs(3)+"em.getTransaction().commit();");
+		classStr=addLines(classStr,tabs(3)+"em.close();");
+		classStr=addLines(classStr,tabs(2)+"} catch (Exception e) {");
+		classStr=addLines(classStr,tabs(3)+"logger.error(e.getMessage(), e);");
+		classStr=addLines(classStr,tabs(3)+"throw new "+getExceptionClassName()+"(e);");
+		classStr=addLines(classStr,tabs(2)+"} finally {");
+		classStr=addLines(classStr,tabs(3)+"if (em != null && em.isOpen()) {");
+		classStr=addLines(classStr,tabs(4)+"if (em.getTransaction().isActive()) {");
+		classStr=addLines(classStr,tabs(5)+"em.getTransaction().rollback();");
+		classStr=addLines(classStr,tabs(4)+"}");
+		classStr=addLines(classStr,tabs(4)+"em.close();");
+		classStr=addLines(classStr,tabs(3)+"}");
+		classStr=addLines(classStr,tabs(2)+"}");
+		classStr=addLines(classStr,tabs(1)+"}");
+		
+		//isexist method
+
+		classStr=addLines(classStr,tabs(1));
+		classStr=addLines(classStr,tabs(1)+"@Override");
+		classStr=addLines(classStr,tabs(1)+"public boolean isExists(Object identifier) throws "+getExceptionClassName()+" {");
+		
+		if (model.jpaClassModel.generatePKClass){
+			classStr=addLines(classStr,tabs(2)+"HashMap<String, String> ids;");
+			classStr=addLines(classStr,tabs(2)+"if (identifier instanceof Map) {");
+			classStr=addLines(classStr,tabs(3)+"ids = (HashMap<String, String>) identifier;");
+			classStr=addLines(classStr,tabs(2)+"} else {");
+			classStr=addLines(classStr,tabs(3)+"logger.error(\"Identifier should be a map with the field name and it's value\");");
+			classStr=addLines(classStr,tabs(3)+"throw new "+getExceptionClassName()+"(\"Identifier should be a map with the field name and it's value\");");
+            classStr=addLines(classStr,tabs(2)+"}");	
+		}
+        
+		primaryKeySearchString=null;
+		if (model.jpaClassModel.generatePKClass){
+			List<String> fieldStrings=new ArrayList<String>();
+			for(JPAClassField field:model.jpaClassModel.pkClassModel.pkFields){
+				fieldStrings.add("ids.get("+model.jpaClassConstantClassName+"."+field.fieldNameConstant+")");
+			}
+			primaryKeySearchString="new "+model.jpaClassModel.pkClassModel.className+"("+commaSeperatedString(fieldStrings, ", ")+")";
+		}else{
+			for(JPAClassField field:model.jpaClassModel.fields){
+				if (field.primaryKey){
+					primaryKeySearchString="identifier";
+				}
+			}
+		}
+		classStr=addLines(classStr,tabs(2)+"EntityManager em = null;");
+		classStr=addLines(classStr,tabs(2)+"try {");
+		classStr=addLines(classStr,tabs(3)+"em = "+getJpaUtilsClassName()+".getEntityManager();");
+		classStr=addLines(classStr,tabs(3)+model.jpaClassModel.className+" "+jpaObjVar+" = em.find("+model.jpaClassModel.className+".class, "+primaryKeySearchString+");");
+
+		classStr=addLines(classStr,tabs(3)+"em.close();");
+		classStr=addLines(classStr,tabs(3)+"return "+jpaObjVar+" != null;");
+		classStr=addLines(classStr,tabs(2)+"} catch (ApplicationSettingsException e) {");
+		classStr=addLines(classStr,tabs(3)+"logger.error(e.getMessage(), e);");
+		classStr=addLines(classStr,tabs(3)+"throw new "+getExceptionClassName()+"(e);");
+		classStr=addLines(classStr,tabs(2)+"} finally {");
+		classStr=addLines(classStr,tabs(3)+"if (em != null && em.isOpen()) {");
+		classStr=addLines(classStr,tabs(4)+"if (em.getTransaction().isActive()) {");
+		classStr=addLines(classStr,tabs(5)+"em.getTransaction().rollback();");
+		classStr=addLines(classStr,tabs(4)+"}");
+		classStr=addLines(classStr,tabs(4)+"em.close();");
+		classStr=addLines(classStr,tabs(3)+"}");
+		classStr=addLines(classStr,tabs(2)+"}");
+		classStr=addLines(classStr,tabs(1)+"}");
+
+		
+		classStr=addLines(classStr,fieldGetters.toArray(new String[]{}));
+		classStr=addLines(classStr,fieldSetters.toArray(new String[]{}));
+		
+		classStr=addLines(classStr,"}");
+		return classStr;
+	}
+	
+	public String generateAbstractResourceClassUpdates(JPAResourceClassModel model){
+		String classStr = null;
+		classStr=addLines(classStr,"public abstract class AbstractResource implements Resource {");
+		
+		classStr=addLines(classStr,tabs(1)+"public static final String "+model.jpaClassModel.classNameConstant+" = \""+model.jpaClassModel.className+"\";");
+		
+		classStr=addLines(classStr,tabs(1)+"// "+convertToTitleCaseString(model.jpaClassModel.className)+" Table");
+		classStr=addLines(classStr,tabs(1)+"public final class "+model.jpaClassConstantClassName+" {");
+		for (JPAClassField jpaField : model.jpaClassModel.fields) {
+			classStr=addLines(classStr,tabs(2)+"public static final String "+jpaField.fieldNameConstant+" = \""+jpaField.fieldName+"\";");
+		}
+		classStr=addLines(classStr,tabs(1)+"}");
+		classStr=addLines(classStr,"}");
+		return classStr;
+	}
+	
+	public String generateAppCatalogJPAUtilUpdates(JPAResourceClassModel model){
+		String classStr = null;
+		String conversionMethodName="create"+model.jpaClassModel.className;
+		classStr=addLines(classStr,"public class "+getJpaUtilsClassName()+" {");
+		classStr=addLines(classStr,tabs(1)+"public static Resource getResource("+getResourceTypeClassName()+" type, Object o) {");
+		classStr=addLines(classStr,tabs(2)+"switch (type){");
+		classStr=addLines(classStr,tabs(3)+"case "+model.jpaClassModel.classNameConstant+":");
+		classStr=addLines(classStr,tabs(4)+"if (o instanceof "+model.jpaClassModel.className+"){");
+		classStr=addLines(classStr,tabs(5)+"return "+conversionMethodName+"(("+model.jpaClassModel.className+") o);");
+		classStr=addLines(classStr,tabs(4)+"}else{");
+		classStr=addLines(classStr,tabs(5)+"logger.error(\"Object should be a "+convertToTitleCaseString(model.jpaClassModel.className)+".\", new IllegalArgumentException());");
+		classStr=addLines(classStr,tabs(5)+"throw new IllegalArgumentException(\"Object should be a "+convertToTitleCaseString(model.jpaClassModel.className)+".\");");
+		classStr=addLines(classStr,tabs(4)+"}");
+		classStr=addLines(classStr,tabs(2)+"}");
+		classStr=addLines(classStr,tabs(1)+"}");
+		classStr=addLines(classStr,tabs(1));
+		
+		String resourceVariableName = createVarNameFromClassName(model.className);
+		classStr=addLines(classStr,tabs(1)+"private static Resource "+conversionMethodName+"("+model.jpaClassModel.className+" o) {");
+		classStr=addLines(classStr,tabs(2)+model.className+" "+resourceVariableName+" = new "+model.className+"();");
+		for(JPAClassField field:model.jpaClassModel.fields){
+			classStr=addLines(classStr,tabs(2)+resourceVariableName+".set"+field.fieldTitle+"(o.get"+field.fieldTitle+"());");
+			if (field.foriegnKey){
+				classStr=addLines(classStr,tabs(2)+resourceVariableName+".set"+field.foriegnKeyJPAResourceClass+"(("+field.foriegnKeyJPAResourceClass+")create"+field.foriegnKeyJPAClass+"(o.get"+field.foriegnKeyJPAClass+"()));");
+			}
+		}
+		classStr=addLines(classStr,tabs(2)+"return "+resourceVariableName+";");
+		classStr=addLines(classStr,tabs(1)+"}");
+		
+		classStr=addLines(classStr,"}");
+		return classStr;
+	}
+	
+	public String generateAppCatalogResourceTypeUpdates(JPAResourceClassModel model){
+		String classStr = null;
+		classStr=addLines(classStr,"public enum "+getResourceTypeClassName()+" {");
+		classStr=addLines(classStr,tabs(1)+model.jpaClassModel.classNameConstant);
+		classStr=addLines(classStr,"}");
+		return classStr;
+	}
+
+	public String getExceptionClassName() {
+		return exceptionClassName;
+	}
+
+	public void setExceptionClassName(String exceptionClassName) {
+		this.exceptionClassName = exceptionClassName;
+	}
+
+	public String getJpaUtilsClassName() {
+		return jpaUtilsClassName;
+	}
+
+	public void setJpaUtilsClassName(String jpaUtilsClassName) {
+		this.jpaUtilsClassName = jpaUtilsClassName;
+	}
+
+	public String getResourceTypeClassName() {
+		return resourceTypeClassName;
+	}
+
+	public void setResourceTypeClassName(String resourceTypeClassName) {
+		this.resourceTypeClassName = resourceTypeClassName;
+	}
+
+	public String getQueryGeneratorClassName() {
+		return queryGeneratorClassName;
+	}
+
+	public void setQueryGeneratorClassName(String queryGeneratorClassName) {
+		this.queryGeneratorClassName = queryGeneratorClassName;
+	}
+	
+
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/6c1eebe3/modules/registry/registry-tools/jpa-gen/src/main/java/generators/SQLGenerator.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-tools/jpa-gen/src/main/java/generators/SQLGenerator.java b/modules/registry/registry-tools/jpa-gen/src/main/java/generators/SQLGenerator.java
new file mode 100644
index 0000000..3d326ca
--- /dev/null
+++ b/modules/registry/registry-tools/jpa-gen/src/main/java/generators/SQLGenerator.java
@@ -0,0 +1,77 @@
+package generators;
+import java.util.ArrayList;
+import java.util.List;
+
+import model.SQLData;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/*
+ *
+ * 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.
+ *
+ */
+
+public class SQLGenerator extends AbstractGenerator {
+    private static final Logger log = LoggerFactory.getLogger(SQLGenerator.class);
+    
+	public static enum DataTypes{
+		VARCHAR,
+		TIMESTAMP,
+		INTEGER,
+		LONGTEXT,
+		SMALLINT,
+		CLOB,
+	}
+	
+	public String generateSQLCreateQuery(SQLData sqlData){
+		String sql = null;
+		sql="CREATE TABLE "+sqlData.getTableName()+"\n";
+		sql+="(";
+		for (String fieldName : sqlData.getFieldData().keySet()) {
+			List<String> fieldData = new ArrayList<String>();
+			fieldData.addAll(sqlData.getFieldData().get(fieldName));
+			String dataTypeStr = fieldData.get(0);
+			fieldData.remove(0);
+			DataTypes.valueOf(dataTypeStr);
+			sql+="\n\t"+fieldName+" "+dataTypeStr;
+			for (String data : fieldData) {
+				sql+=" "+data;
+			}
+			sql+=",";
+		}
+		
+		if (sqlData.getPrimaryKeys().size()>0) {
+			sql+="\n\tPRIMARY KEY (";
+			for (String primaryKey : sqlData.getPrimaryKeys()) {
+				sql+=primaryKey+",";
+			}
+			sql=removeLastChar(sql);
+			sql+="),";
+		}
+		for (String foriegnKey : sqlData.getForiegnKeys().keySet()) {
+			sql+="\n\tFOREIGN KEY ";
+			sql+="("+foriegnKey+") REFERENCES "+sqlData.getForiegnKeys().get(foriegnKey).tableAndField+",";
+		}
+		sql=removeLastChar(sql)+"\n";
+		sql+=");";
+		return sql;
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/6c1eebe3/modules/registry/registry-tools/jpa-gen/src/main/java/model/JPAClassField.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-tools/jpa-gen/src/main/java/model/JPAClassField.java b/modules/registry/registry-tools/jpa-gen/src/main/java/model/JPAClassField.java
new file mode 100644
index 0000000..b0d0090
--- /dev/null
+++ b/modules/registry/registry-tools/jpa-gen/src/main/java/model/JPAClassField.java
@@ -0,0 +1,47 @@
+package model;
+/*
+ *
+ * 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.
+ *
+ */
+
+
+public class JPAClassField{
+	public String tableColumnName;
+	public String fieldName;
+	public String fieldNameConstant;
+	public String fieldDataType;
+	public String fieldTitle;
+	public boolean primaryKey;
+	public boolean foriegnKey=false;
+	public String foriegnKeyJPAClass;
+	public String foriegnKeyJPAResourceClass;
+	public JPAClassField(String tableColumnName, String fieldName,
+			String fieldDataType, String fieldTitle, boolean primaryKey,boolean foriegnKey,String foriegnKeyJPAClass,String foriegnKeyJPAResourceClass) {
+		this.tableColumnName = tableColumnName;
+		this.fieldName = fieldName;
+		this.fieldDataType = fieldDataType;
+		this.fieldTitle = fieldTitle;
+		this.primaryKey=primaryKey;
+		this.foriegnKey=foriegnKey;
+		this.foriegnKeyJPAClass=foriegnKeyJPAClass;
+		this.foriegnKeyJPAResourceClass=foriegnKeyJPAResourceClass;
+	}
+	
+	
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/6c1eebe3/modules/registry/registry-tools/jpa-gen/src/main/java/model/JPAClassModel.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-tools/jpa-gen/src/main/java/model/JPAClassModel.java b/modules/registry/registry-tools/jpa-gen/src/main/java/model/JPAClassModel.java
new file mode 100644
index 0000000..8ac8ff8
--- /dev/null
+++ b/modules/registry/registry-tools/jpa-gen/src/main/java/model/JPAClassModel.java
@@ -0,0 +1,34 @@
+package model;
+import java.util.ArrayList;
+import java.util.List;
+
+/*
+ *
+ * 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.
+ *
+ */
+
+
+public class JPAClassModel{
+	public String className;
+	public String classNameConstant;
+	public String tableName;
+	public boolean generatePKClass=false;
+	public List<JPAClassField> fields=new ArrayList<JPAClassField>();
+	public JPAPKClassModel pkClassModel=new JPAPKClassModel();
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/6c1eebe3/modules/registry/registry-tools/jpa-gen/src/main/java/model/JPAPKClassModel.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-tools/jpa-gen/src/main/java/model/JPAPKClassModel.java b/modules/registry/registry-tools/jpa-gen/src/main/java/model/JPAPKClassModel.java
new file mode 100644
index 0000000..f09f426
--- /dev/null
+++ b/modules/registry/registry-tools/jpa-gen/src/main/java/model/JPAPKClassModel.java
@@ -0,0 +1,30 @@
+package model;
+import java.util.ArrayList;
+import java.util.List;
+
+/*
+ *
+ * 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.
+ *
+ */
+
+
+public class JPAPKClassModel{
+	public String className;
+	public List<JPAClassField> pkFields=new ArrayList<JPAClassField>();
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/6c1eebe3/modules/registry/registry-tools/jpa-gen/src/main/java/model/JPAResourceClassModel.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-tools/jpa-gen/src/main/java/model/JPAResourceClassModel.java b/modules/registry/registry-tools/jpa-gen/src/main/java/model/JPAResourceClassModel.java
new file mode 100644
index 0000000..f0b4c21
--- /dev/null
+++ b/modules/registry/registry-tools/jpa-gen/src/main/java/model/JPAResourceClassModel.java
@@ -0,0 +1,28 @@
+package model;
+/*
+ *
+ * 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.
+ *
+ */
+
+
+public class JPAResourceClassModel{
+	public String className;
+	public JPAClassModel jpaClassModel;
+	public String jpaClassConstantClassName;
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/6c1eebe3/modules/registry/registry-tools/jpa-gen/src/main/java/model/SQLData.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-tools/jpa-gen/src/main/java/model/SQLData.java b/modules/registry/registry-tools/jpa-gen/src/main/java/model/SQLData.java
new file mode 100644
index 0000000..59f0332
--- /dev/null
+++ b/modules/registry/registry-tools/jpa-gen/src/main/java/model/SQLData.java
@@ -0,0 +1,79 @@
+package model;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/*
+ *
+ * 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.
+ *
+ */
+
+public class SQLData {
+	private String tableName;
+	private Map<String,List<String>> fieldData;
+	private List<String> primaryKeys;
+	private Map<String,ForiegnKeyData> foriegnKeys;
+	
+	public static class ForiegnKeyData{
+		public String tableAndField;
+		public String jpaClassName;
+		public String jpaResourceClassName;
+		public ForiegnKeyData(String tableAndField, String jpaClassName,String jpaResourceClassName) {
+			this.tableAndField = tableAndField;
+			this.jpaClassName = jpaClassName;
+			this.jpaResourceClassName = jpaResourceClassName;
+		}
+	}
+	
+	public String getTableName() {
+		return tableName;
+	}
+	public void setTableName(String tableName) {
+		this.tableName = tableName;
+	}
+	public Map<String, List<String>> getFieldData() {
+		if (fieldData==null){
+			fieldData=new HashMap<String, List<String>>();
+		}
+		return fieldData;
+	}
+	
+	public void setFieldData(Map<String, List<String>> fieldData) {
+		this.fieldData = fieldData;
+	}
+	public List<String> getPrimaryKeys() {
+		if (primaryKeys==null){
+			primaryKeys=new ArrayList<String>();
+		}
+		return primaryKeys;
+	}
+	public void setPrimaryKeys(List<String> primaryKeys) {
+		this.primaryKeys = primaryKeys;
+	}
+	public Map<String,ForiegnKeyData> getForiegnKeys() {
+		if (foriegnKeys==null){
+			foriegnKeys=new HashMap<String, ForiegnKeyData>();
+		}
+		return foriegnKeys;
+	}
+	public void setForiegnKeys(Map<String,ForiegnKeyData> foriegnKeys) {
+		this.foriegnKeys = foriegnKeys;
+	}
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/6c1eebe3/modules/registry/registry-tools/jpa-gen/src/main/java/test/Test.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-tools/jpa-gen/src/main/java/test/Test.java b/modules/registry/registry-tools/jpa-gen/src/main/java/test/Test.java
new file mode 100644
index 0000000..9d5510d
--- /dev/null
+++ b/modules/registry/registry-tools/jpa-gen/src/main/java/test/Test.java
@@ -0,0 +1,81 @@
+package test;
+
+import generators.JPAClassGenerator;
+import generators.JPAResourceClassGenerator;
+import generators.SQLGenerator;
+
+import java.util.Arrays;
+
+import model.JPAClassModel;
+import model.JPAResourceClassModel;
+import model.SQLData;
+
+/*
+ *
+ * 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.
+ *
+ */
+
+public class Test {
+
+
+	private static SQLData createSQLData() {
+		SQLData data = new SQLData();
+		data.setTableName("COMMUNITY_USER");
+		data.getFieldData().put("GATEWAY_NAME", Arrays.asList(new String[]{"VARCHAR", "256", "NOT", "NULL"}));
+		data.getFieldData().put("COMMUNITY_USER_NAME", Arrays.asList(new String[]{"VARCHAR", "256", "NOT", "NULL"}));
+		data.getFieldData().put("TOKEN_ID", Arrays.asList(new String[]{"VARCHAR", "256", "NOT", "NULL"}));
+		data.getFieldData().put("COMMUNITY_USER_EMAIL", Arrays.asList(new String[]{"VARCHAR", "256", "NOT", "NULL"}));
+		data.getFieldData().put("CREATION_TIME", Arrays.asList(new String[]{"TIMESTAMP", "DEFAULT", "NOW()"}));
+		data.getFieldData().put("CPU_COUNT", Arrays.asList(new String[]{"INTEGER"}));
+		data.getPrimaryKeys().add("GATEWAY_NAME");
+		data.getPrimaryKeys().add("COMMUNITY_USER_NAME");
+		data.getPrimaryKeys().add("TOKEN_ID");
+		data.getForiegnKeys().put("EXPERIMENT_ID", new SQLData.ForiegnKeyData("EXPERIMENT(EXPERIMENT_ID)","Experiment","ExperimentResource"));
+		return data;
+	}
+	public static void testSqlGen() {
+		SQLData data = createSQLData();
+		SQLGenerator sqlGenerator = new SQLGenerator();
+		System.out.println(sqlGenerator.generateSQLCreateQuery(data));
+	}
+	
+	public static void testJPAClassGen() {
+		SQLData data = createSQLData();
+		JPAClassGenerator jpaClassGenerator = new JPAClassGenerator();
+		JPAClassModel model = jpaClassGenerator.createJPAClassModel(data);
+		System.out.println(jpaClassGenerator.generateJPAClass(model));
+		System.out.println(jpaClassGenerator.generateJPAPKClass(model.pkClassModel));
+	}
+	
+	public static void testJPAResourceClassGen() {
+		SQLData data = createSQLData();
+		JPAClassGenerator jpaClassGenerator = new JPAClassGenerator();
+		JPAClassModel model = jpaClassGenerator.createJPAClassModel(data);
+		JPAResourceClassGenerator jpaResourceClassGenerator = new JPAResourceClassGenerator();
+		JPAResourceClassModel model2 = jpaResourceClassGenerator.createJPAResourceClassModel(model);
+		System.out.println(jpaResourceClassGenerator.generateJPAResourceClass(model2));
+		System.out.println(jpaResourceClassGenerator.generateAbstractResourceClassUpdates(model2));
+		System.out.println(jpaResourceClassGenerator.generateAppCatalogResourceTypeUpdates(model2));
+		System.out.println(jpaResourceClassGenerator.generateAppCatalogJPAUtilUpdates(model2));
+		
+	}
+	public static void main(String[] args) {
+		testJPAResourceClassGen();
+	}
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/6c1eebe3/modules/registry/registry-tools/registry-tool/README
----------------------------------------------------------------------
diff --git a/modules/registry/registry-tools/registry-tool/README b/modules/registry/registry-tools/registry-tool/README
new file mode 100644
index 0000000..40a8e65
--- /dev/null
+++ b/modules/registry/registry-tools/registry-tool/README
@@ -0,0 +1,9 @@
+0.7 => 0.8
+==============
+
+1. Build registry-tools
+2. Copy registry-tool-0.8-SNAPSHOT.jar and commons-cli-1.1.jar (you will find this in your maven repository) to <AIRAVATA_HOME>/lib
+3. Copy db-migrate.sh file to <AIRAVATA_HOME>/bin
+4. Make sure previous version of airavata database is up and running
+5. Run db-migrate.sh script file
+        ./db-migrate.sh -url jdbc:mysql://localhost:3306/experiment_catalog -user airavata -pwd airavata -v 0.7
\ No newline at end of file


Mime
View raw message