You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by sc...@apache.org on 2016/11/02 18:11:01 UTC

[3/6] airavata git commit: Workflow catalog Junit

http://git-wip-us.apache.org/repos/asf/airavata/blob/8539fef4/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/appcatalog/ParallelismCommandPK.java
----------------------------------------------------------------------
diff --git a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/appcatalog/ParallelismCommandPK.java b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/appcatalog/ParallelismCommandPK.java
index 23479e4..c4472cc 100644
--- a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/appcatalog/ParallelismCommandPK.java
+++ b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/appcatalog/ParallelismCommandPK.java
@@ -1,57 +1,60 @@
-package appcatlog;
+package org.apache.airavata.registry.core.entities.appcatalog;
 
 import java.io.Serializable;
 import javax.persistence.*;
 
 /**
  * The primary key class for the parallelism_command database table.
- * 
  */
 @Embeddable
 public class ParallelismCommandPK implements Serializable {
-	//default serial version id, required for serializable classes.
-	private static final long serialVersionUID = 1L;
-
-	@Column(name="RESOURCE_JOB_MANAGER_ID", insertable=false, updatable=false)
-	private String resourceJobManagerId;
-
-	@Column(name="COMMAND_TYPE")
-	private String commandType;
-
-	public ParallelismCommandPK() {
-	}
-	public String getResourceJobManagerId() {
-		return this.resourceJobManagerId;
-	}
-	public void setResourceJobManagerId(String resourceJobManagerId) {
-		this.resourceJobManagerId = resourceJobManagerId;
-	}
-	public String getCommandType() {
-		return this.commandType;
-	}
-	public void setCommandType(String commandType) {
-		this.commandType = commandType;
-	}
-
-	public boolean equals(Object other) {
-		if (this == other) {
-			return true;
-		}
-		if (!(other instanceof ParallelismCommandPK)) {
-			return false;
-		}
-		ParallelismCommandPK castOther = (ParallelismCommandPK)other;
-		return 
-			this.resourceJobManagerId.equals(castOther.resourceJobManagerId)
-			&& this.commandType.equals(castOther.commandType);
-	}
-
-	public int hashCode() {
-		final int prime = 31;
-		int hash = 17;
-		hash = hash * prime + this.resourceJobManagerId.hashCode();
-		hash = hash * prime + this.commandType.hashCode();
-		
-		return hash;
-	}
+    //default serial version id, required for serializable classes.
+    private static final long serialVersionUID = 1L;
+
+    @Column(name = "RESOURCE_JOB_MANAGER_ID", insertable = false, updatable = false)
+    private String resourceJobManagerId;
+
+    @Column(name = "COMMAND_TYPE")
+    private String commandType;
+
+    public ParallelismCommandPK() {
+    }
+
+    public String getResourceJobManagerId() {
+        return resourceJobManagerId;
+    }
+
+    public void setResourceJobManagerId(String resourceJobManagerId) {
+        this.resourceJobManagerId = resourceJobManagerId;
+    }
+
+    public String getCommandType() {
+        return commandType;
+    }
+
+    public void setCommandType(String commandType) {
+        this.commandType = commandType;
+    }
+
+    public boolean equals(Object other) {
+        if (this == other) {
+            return true;
+        }
+        if (!(other instanceof ParallelismCommandPK)) {
+            return false;
+        }
+        ParallelismCommandPK castOther = (ParallelismCommandPK) other;
+        return
+                this.resourceJobManagerId.equals(castOther.resourceJobManagerId)
+                        && this.commandType.equals(castOther.commandType);
+    }
+
+    public int hashCode() {
+        final int prime = 31;
+        int hash = 17;
+        hash = hash * prime + this.resourceJobManagerId.hashCode();
+        hash = hash * prime + this.commandType.hashCode();
+
+        return hash;
+    }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/8539fef4/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/appcatalog/PostjobCommandEntity.java
----------------------------------------------------------------------
diff --git a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/appcatalog/PostjobCommandEntity.java b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/appcatalog/PostjobCommandEntity.java
index 40ae839..3f10311 100644
--- a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/appcatalog/PostjobCommandEntity.java
+++ b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/appcatalog/PostjobCommandEntity.java
@@ -9,14 +9,14 @@ import javax.persistence.*;
  */
 @Entity
 @Table(name = "postjob_command")
-public class PostjobCommand implements Serializable {
+public class PostjobCommandEntity implements Serializable {
     private static final long serialVersionUID = 1L;
 
     @EmbeddedId
     private PostjobCommandPK id;
 
 
-    public PostjobCommand() {
+    public PostjobCommandEntity() {
     }
 
     public PostjobCommandPK getId() {

http://git-wip-us.apache.org/repos/asf/airavata/blob/8539fef4/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/appcatalog/PostjobCommandPK.java
----------------------------------------------------------------------
diff --git a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/appcatalog/PostjobCommandPK.java b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/appcatalog/PostjobCommandPK.java
index eefd082..da5a1a7 100644
--- a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/appcatalog/PostjobCommandPK.java
+++ b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/appcatalog/PostjobCommandPK.java
@@ -1,59 +1,58 @@
-package appcatlog;
+package org.apache.airavata.registry.core.entities.appcatalog;
 
 import java.io.Serializable;
 import javax.persistence.*;
 
 /**
  * The primary key class for the postjob_command database table.
- * 
  */
 @Embeddable
 public class PostjobCommandPK implements Serializable {
-	// default serial version id, required for serializable classes.
-	private static final long serialVersionUID = 1L;
-
-	@Column(name = "APPDEPLOYMENT_ID", insertable = false, updatable = false)
-	private String appdeploymentId;
-
-	private String command;
-
-	@Column(name = "COMMAND")
-	public PostjobCommandPK() {
-	}
-
-	public String getAppdeploymentId() {
-		return this.appdeploymentId;
-	}
-
-	public void setAppdeploymentId(String appdeploymentId) {
-		this.appdeploymentId = appdeploymentId;
-	}
-
-	public String getCommand() {
-		return this.command;
-	}
-
-	public void setCommand(String command) {
-		this.command = command;
-	}
-
-	public boolean equals(Object other) {
-		if (this == other) {
-			return true;
-		}
-		if (!(other instanceof PostjobCommandPK)) {
-			return false;
-		}
-		PostjobCommandPK castOther = (PostjobCommandPK) other;
-		return this.appdeploymentId.equals(castOther.appdeploymentId) && this.command.equals(castOther.command);
-	}
-
-	public int hashCode() {
-		final int prime = 31;
-		int hash = 17;
-		hash = hash * prime + this.appdeploymentId.hashCode();
-		hash = hash * prime + this.command.hashCode();
-
-		return hash;
-	}
+    // default serial version id, required for serializable classes.
+    private static final long serialVersionUID = 1L;
+
+    @Column(name = "APPDEPLOYMENT_ID", insertable = false, updatable = false)
+    private String appdeploymentId;
+
+    @Column(name = "COMMAND")
+    private String command;
+
+    public PostjobCommandPK() {
+    }
+
+    public String getAppdeploymentId() {
+        return appdeploymentId;
+    }
+
+    public void setAppdeploymentId(String appdeploymentId) {
+        this.appdeploymentId = appdeploymentId;
+    }
+
+    public String getCommand() {
+        return command;
+    }
+
+    public void setCommand(String command) {
+        this.command = command;
+    }
+
+    public boolean equals(Object other) {
+        if (this == other) {
+            return true;
+        }
+        if (!(other instanceof PostjobCommandPK)) {
+            return false;
+        }
+        PostjobCommandPK castOther = (PostjobCommandPK) other;
+        return this.appdeploymentId.equals(castOther.appdeploymentId) && this.command.equals(castOther.command);
+    }
+
+    public int hashCode() {
+        final int prime = 31;
+        int hash = 17;
+        hash = hash * prime + this.appdeploymentId.hashCode();
+        hash = hash * prime + this.command.hashCode();
+
+        return hash;
+    }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/8539fef4/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/appcatalog/PrejobCommandEntity.java
----------------------------------------------------------------------
diff --git a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/appcatalog/PrejobCommandEntity.java b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/appcatalog/PrejobCommandEntity.java
index f223bed..fc8b803 100644
--- a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/appcatalog/PrejobCommandEntity.java
+++ b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/appcatalog/PrejobCommandEntity.java
@@ -9,15 +9,14 @@ import javax.persistence.*;
  */
 @Entity
 @Table(name = "prejob_command")
-@NamedQuery(name = "PrejobCommand.findAll", query = "SELECT p FROM PrejobCommand p")
-public class PrejobCommand implements Serializable {
+public class PrejobCommandEntity implements Serializable {
     private static final long serialVersionUID = 1L;
 
     @EmbeddedId
     private PrejobCommandPK id;
 
 
-    public PrejobCommand() {
+    public PrejobCommandEntity() {
     }
 
     public PrejobCommandPK getId() {

http://git-wip-us.apache.org/repos/asf/airavata/blob/8539fef4/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/appcatalog/PrejobCommandPK.java
----------------------------------------------------------------------
diff --git a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/appcatalog/PrejobCommandPK.java b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/appcatalog/PrejobCommandPK.java
index 8bd3994..1eca9d3 100644
--- a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/appcatalog/PrejobCommandPK.java
+++ b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/appcatalog/PrejobCommandPK.java
@@ -1,4 +1,4 @@
-package appcatlog;
+package org.apache.airavata.registry.core.entities.appcatalog;
 
 import java.io.Serializable;
 import javax.persistence.*;
@@ -15,19 +15,24 @@ public class PrejobCommandPK implements Serializable {
 	@Column(name="APPDEPLOYMENT_ID", insertable=false, updatable=false)
 	private String appdeploymentId;
 
+	@Column(name="COMMAND")
 	private String command;
 
 	public PrejobCommandPK() {
 	}
+
 	public String getAppdeploymentId() {
-		return this.appdeploymentId;
+		return appdeploymentId;
 	}
+
 	public void setAppdeploymentId(String appdeploymentId) {
 		this.appdeploymentId = appdeploymentId;
 	}
+
 	public String getCommand() {
-		return this.command;
+		return command;
 	}
+
 	public void setCommand(String command) {
 		this.command = command;
 	}

http://git-wip-us.apache.org/repos/asf/airavata/blob/8539fef4/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/appcatalog/ResourceJobManagerEntity.java
----------------------------------------------------------------------
diff --git a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/appcatalog/ResourceJobManagerEntity.java b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/appcatalog/ResourceJobManagerEntity.java
index 141f29f..5c999ea 100644
--- a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/appcatalog/ResourceJobManagerEntity.java
+++ b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/appcatalog/ResourceJobManagerEntity.java
@@ -10,7 +10,7 @@ import java.util.List;
  */
 @Entity
 @Table(name = "resource_job_manager")
-public class ResourceJobManager implements Serializable {
+public class ResourceJobManagerEntity implements Serializable {
     private static final long serialVersionUID = 1L;
 
     @Id
@@ -32,7 +32,7 @@ public class ResourceJobManager implements Serializable {
     @Column(name = "UPDATE_TIME")
     private Timestamp updateTime;
 
-    public ResourceJobManager() {
+    public ResourceJobManagerEntity() {
     }
 
     public String getResourceJobManagerId() {

http://git-wip-us.apache.org/repos/asf/airavata/blob/8539fef4/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/appcatalog/ScpDataMovementEntity.java
----------------------------------------------------------------------
diff --git a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/appcatalog/ScpDataMovementEntity.java b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/appcatalog/ScpDataMovementEntity.java
index 1746119..de80e69 100644
--- a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/appcatalog/ScpDataMovementEntity.java
+++ b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/appcatalog/ScpDataMovementEntity.java
@@ -10,7 +10,7 @@ import java.sql.Timestamp;
  */
 @Entity
 @Table(name = "scp_data_movement")
-public class ScpDataMovement implements Serializable {
+public class ScpDataMovementEntity implements Serializable {
     private static final long serialVersionUID = 1L;
 
     @Id
@@ -35,7 +35,7 @@ public class ScpDataMovement implements Serializable {
     @Column(name = "UPDATE_TIME")
     private Timestamp updateTime;
 
-    public ScpDataMovement() {
+    public ScpDataMovementEntity() {
     }
 
     public String getDataMovementInterfaceId() {

http://git-wip-us.apache.org/repos/asf/airavata/blob/8539fef4/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/appcatalog/SshJobSubmissionEntity.java
----------------------------------------------------------------------
diff --git a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/appcatalog/SshJobSubmissionEntity.java b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/appcatalog/SshJobSubmissionEntity.java
index d2c8e16..0ed8607 100644
--- a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/appcatalog/SshJobSubmissionEntity.java
+++ b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/appcatalog/SshJobSubmissionEntity.java
@@ -11,7 +11,7 @@ import java.sql.Timestamp;
  */
 @Entity
 @Table(name="ssh_job_submission")
-public class SshJobSubmission implements Serializable {
+public class SshJobSubmissionEntity implements Serializable {
 	private static final long serialVersionUID = 1L;
 
 	@Id
@@ -39,7 +39,7 @@ public class SshJobSubmission implements Serializable {
 	@Column(name="RESOURCE_JOB_MANAGER_ID")
 	private String resourceJobManagerId;
 
-	public SshJobSubmission() {
+	public SshJobSubmissionEntity() {
 	}
 
 	public String getJobSubmissionInterfaceId() {

http://git-wip-us.apache.org/repos/asf/airavata/blob/8539fef4/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/appcatalog/StorageInterfaceEntity.java
----------------------------------------------------------------------
diff --git a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/appcatalog/StorageInterfaceEntity.java b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/appcatalog/StorageInterfaceEntity.java
index 5b1c63f..a1ad646 100644
--- a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/appcatalog/StorageInterfaceEntity.java
+++ b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/appcatalog/StorageInterfaceEntity.java
@@ -9,8 +9,7 @@ import java.sql.Timestamp;
  */
 @Entity
 @Table(name = "storage_interface")
-@NamedQuery(name = "StorageInterface.findAll", query = "SELECT s FROM StorageInterface s")
-public class StorageInterface implements Serializable {
+public class StorageInterfaceEntity implements Serializable {
     private static final long serialVersionUID = 1L;
 
     @EmbeddedId
@@ -28,7 +27,7 @@ public class StorageInterface implements Serializable {
     @Column(name = "UPDATE_TIME")
     private Timestamp updateTime;
 
-    public StorageInterface() {
+    public StorageInterfaceEntity() {
     }
 
     public StorageInterfacePK getId() {

http://git-wip-us.apache.org/repos/asf/airavata/blob/8539fef4/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/appcatalog/StorageInterfacePK.java
----------------------------------------------------------------------
diff --git a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/appcatalog/StorageInterfacePK.java b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/appcatalog/StorageInterfacePK.java
index e2f10cf..5a9bcb1 100644
--- a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/appcatalog/StorageInterfacePK.java
+++ b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/appcatalog/StorageInterfacePK.java
@@ -1,4 +1,4 @@
-package appcatlog;
+package org.apache.airavata.registry.core.entities.appcatalog;
 
 import java.io.Serializable;
 import javax.persistence.*;
@@ -20,15 +20,19 @@ public class StorageInterfacePK implements Serializable {
 
 	public StorageInterfacePK() {
 	}
+
 	public String getStorageResourceId() {
-		return this.storageResourceId;
+		return storageResourceId;
 	}
+
 	public void setStorageResourceId(String storageResourceId) {
 		this.storageResourceId = storageResourceId;
 	}
+
 	public String getDataMovementInterfaceId() {
-		return this.dataMovementInterfaceId;
+		return dataMovementInterfaceId;
 	}
+
 	public void setDataMovementInterfaceId(String dataMovementInterfaceId) {
 		this.dataMovementInterfaceId = dataMovementInterfaceId;
 	}

http://git-wip-us.apache.org/repos/asf/airavata/blob/8539fef4/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/appcatalog/StorageResourceEntity.java
----------------------------------------------------------------------
diff --git a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/appcatalog/StorageResourceEntity.java b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/appcatalog/StorageResourceEntity.java
index b423ef4..a9ad6d2 100644
--- a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/appcatalog/StorageResourceEntity.java
+++ b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/appcatalog/StorageResourceEntity.java
@@ -10,7 +10,7 @@ import java.util.List;
  */
 @Entity
 @Table(name = "storage_resource")
-public class StorageResource implements Serializable {
+public class StorageResourceEntity implements Serializable {
     private static final long serialVersionUID = 1L;
 
     @Id
@@ -30,7 +30,7 @@ public class StorageResource implements Serializable {
     @Column(name = "UPDATE_TIME")
     private Timestamp updateTime;
 
-    public StorageResource() {
+    public StorageResourceEntity() {
     }
 
     public String getStorageResourceId() {

http://git-wip-us.apache.org/repos/asf/airavata/blob/8539fef4/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/appcatalog/UnicoreDatamovementEntity.java
----------------------------------------------------------------------
diff --git a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/appcatalog/UnicoreDatamovementEntity.java b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/appcatalog/UnicoreDatamovementEntity.java
index 6e01ba3..74a038c 100644
--- a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/appcatalog/UnicoreDatamovementEntity.java
+++ b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/appcatalog/UnicoreDatamovementEntity.java
@@ -10,7 +10,7 @@ import javax.persistence.*;
  */
 @Entity
 @Table(name="unicore_datamovement")
-public class UnicoreDatamovement implements Serializable {
+public class UnicoreDatamovementEntity implements Serializable {
 	private static final long serialVersionUID = 1L;
 
 	@Id
@@ -23,7 +23,7 @@ public class UnicoreDatamovement implements Serializable {
 	@Column(name="UNICORE_ENDPOINT_URL")
 	private String unicoreEndpointUrl;
 
-	public UnicoreDatamovement() {
+	public UnicoreDatamovementEntity() {
 	}
 
 	public String getDatamovementId() {

http://git-wip-us.apache.org/repos/asf/airavata/blob/8539fef4/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/appcatalog/UnicoreSubmissionEntity.java
----------------------------------------------------------------------
diff --git a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/appcatalog/UnicoreSubmissionEntity.java b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/appcatalog/UnicoreSubmissionEntity.java
index 6ccc0bd..303a512 100644
--- a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/appcatalog/UnicoreSubmissionEntity.java
+++ b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/appcatalog/UnicoreSubmissionEntity.java
@@ -10,7 +10,7 @@ import javax.persistence.*;
  */
 @Entity
 @Table(name="unicore_submission")
-public class UnicoreSubmission implements Serializable {
+public class UnicoreSubmissionEntity implements Serializable {
 	private static final long serialVersionUID = 1L;
 
 	@Id
@@ -23,7 +23,7 @@ public class UnicoreSubmission implements Serializable {
 	@Column(name="UNICORE_ENDPOINT_URL")
 	private String unicoreEndpointUrl;
 
-	public UnicoreSubmission() {
+	public UnicoreSubmissionEntity() {
 	}
 
 	public String getSubmissionId() {

http://git-wip-us.apache.org/repos/asf/airavata/blob/8539fef4/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/workflowcatalog/WorkflowEntity.java
----------------------------------------------------------------------
diff --git a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/workflowcatalog/WorkflowEntity.java b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/workflowcatalog/WorkflowEntity.java
index d1d8c46..f526be1 100644
--- a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/workflowcatalog/WorkflowEntity.java
+++ b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/workflowcatalog/WorkflowEntity.java
@@ -10,6 +10,7 @@ import java.util.List;
  * The persistent class for the workflow database table.
  */
 @Entity
+@Table(name="workflow")
 public class WorkflowEntity implements Serializable {
     private static final long serialVersionUID = 1L;
 
@@ -20,7 +21,8 @@ public class WorkflowEntity implements Serializable {
     @Column(name = "CREATED_USER")
     private String createdUser;
 
-    @Column(name = "CREATION_TIME")
+    @Column(name = "CREATION_TIME", insertable = false, updatable = false)
+    @Temporal(TemporalType.TIMESTAMP)
     private Timestamp creationTime;
 
     @Column(name = "GATEWAY_ID")
@@ -30,14 +32,13 @@ public class WorkflowEntity implements Serializable {
     private String graph;
 
     @Column(name = "IMAGE")
-    @Lob
     private byte[] image;
 
     @Column(name = "UPDATE_TIME")
     private Timestamp updateTime;
 
     @Column(name = "WORKFLOW_NAME")
-    private String workflowName;
+    private String name;
 
 
     public WorkflowEntity() {
@@ -113,15 +114,11 @@ public class WorkflowEntity implements Serializable {
         this.updateTime = updateTime;
     }
 
-    public String getWorkflowName() {
-
-        return this.workflowName;
+    public String getName() {
+        return name;
     }
 
-    public void setWorkflowName(String workflowName) {
-
-        this.workflowName = workflowName;
+    public void setName(String name) {
+        this.name = name;
     }
-
-
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/8539fef4/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/repositories/AbstractRepository.java
----------------------------------------------------------------------
diff --git a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/repositories/AbstractRepository.java b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/repositories/AbstractRepository.java
index 1e906ba..bc3a9da 100644
--- a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/repositories/AbstractRepository.java
+++ b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/repositories/AbstractRepository.java
@@ -68,7 +68,7 @@ public abstract class AbstractRepository<T, E, Id> {
     }
 
     public List<T> select(String query, int limit, int offset){
-        List resultSet = JPAUtils.execute(entityManager -> entityManager.createQuery(query).setFirstResult(offset)
+        List resultSet = (List) JPAUtils.execute(entityManager -> entityManager.createQuery(query).setFirstResult(offset)
                 .setMaxResults(offset).getResultList());
         Mapper mapper = ObjectMapperSingleton.getInstance();
         List<T> gatewayList = new ArrayList<>();

http://git-wip-us.apache.org/repos/asf/airavata/blob/8539fef4/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/repositories/workspacecatalog/GatewayRepository.java
----------------------------------------------------------------------
diff --git a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/repositories/workspacecatalog/GatewayRepository.java b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/repositories/workspacecatalog/GatewayRepository.java
index aed6681..9a1c6d6 100644
--- a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/repositories/workspacecatalog/GatewayRepository.java
+++ b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/repositories/workspacecatalog/GatewayRepository.java
@@ -31,5 +31,6 @@ public class GatewayRepository extends AbstractRepository<Gateway, GatewayEntity
 
     public GatewayRepository(Class<Gateway> thriftGenericClass, Class<GatewayEntity> dbEntityGenericClass) {
         super(thriftGenericClass, dbEntityGenericClass);
+
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/8539fef4/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/utils/JPAUtils.java
----------------------------------------------------------------------
diff --git a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/utils/JPAUtils.java b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/utils/JPAUtils.java
index 382d66b..05098c4 100644
--- a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/utils/JPAUtils.java
+++ b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/utils/JPAUtils.java
@@ -41,7 +41,7 @@ public class JPAUtils {
             String connectionProperties = "DriverClassName=com.mysql.jdbc.Driver," +
                     "Url=jdbc:mysql://localhost:3306/airavata_catalog," +
                     "Username=root," +
-                    "Password=";
+                    "Password=root";
             logger.info(connectionProperties);
             Map<String, String> properties = new HashMap<String, String>();
             properties.put("openjpa.ConnectionDriverName", "org.apache.commons.dbcp.BasicDataSource");

http://git-wip-us.apache.org/repos/asf/airavata/blob/8539fef4/modules/registry-refactoring/src/main/resources/META-INF/persistence.xml
----------------------------------------------------------------------
diff --git a/modules/registry-refactoring/src/main/resources/META-INF/persistence.xml b/modules/registry-refactoring/src/main/resources/META-INF/persistence.xml
index ac9a08f..ddc99ef 100644
--- a/modules/registry-refactoring/src/main/resources/META-INF/persistence.xml
+++ b/modules/registry-refactoring/src/main/resources/META-INF/persistence.xml
@@ -45,6 +45,22 @@
         <class>org.apache.airavata.registry.core.entities.expcatalog.TaskStatusEntity</class>
         <class>org.apache.airavata.registry.core.entities.expcatalog.JobEntity</class>
         <class>org.apache.airavata.registry.core.entities.expcatalog.JobStatusEntity</class>
+
+        <class>org.apache.airavata.registry.core.entities.workflowcatalog.WorkflowEntity</class>
+        <class>org.apache.airavata.registry.core.entities.workflowcatalog.EdgeEntity</class>
+        <class>org.apache.airavata.registry.core.entities.workflowcatalog.ComponentStatusEntity</class>
+        <class>org.apache.airavata.registry.core.entities.workflowcatalog.NodeEntity</class>
+        <class>org.apache.airavata.registry.core.entities.workflowcatalog.PortEntity</class>
+        <class>org.apache.airavata.registry.core.entities.workflowcatalog.WorkflowInputEntity</class>
+        <class>org.apache.airavata.registry.core.entities.workflowcatalog.WorkflowOutputEntity</class>
+        <class>org.apache.airavata.registry.core.entities.workflowcatalog.WorkflowStatusEntity</class>
+
+
+
+
+
+
+
         <exclude-unlisted-classes>true</exclude-unlisted-classes>
     </persistence-unit>
 </persistence>

http://git-wip-us.apache.org/repos/asf/airavata/blob/8539fef4/modules/registry-refactoring/src/test/java/org/apache/airavata/registry/core/repositories/RepositoryTest.java
----------------------------------------------------------------------
diff --git a/modules/registry-refactoring/src/test/java/org/apache/airavata/registry/core/repositories/RepositoryTest.java b/modules/registry-refactoring/src/test/java/org/apache/airavata/registry/core/repositories/RepositoryTest.java
index ec1e4a0..bc61bbb 100644
--- a/modules/registry-refactoring/src/test/java/org/apache/airavata/registry/core/repositories/RepositoryTest.java
+++ b/modules/registry-refactoring/src/test/java/org/apache/airavata/registry/core/repositories/RepositoryTest.java
@@ -20,6 +20,7 @@
 */
 package org.apache.airavata.registry.core.repositories;
 
+import org.apache.airavata.model.WorkflowModel;
 import org.apache.airavata.model.experiment.ExperimentModel;
 import org.apache.airavata.model.experiment.UserConfigurationDataModel;
 import org.apache.airavata.model.user.NSFDemographics;
@@ -29,11 +30,13 @@ import org.apache.airavata.model.workspace.GatewayApprovalStatus;
 import org.apache.airavata.model.workspace.Notification;
 import org.apache.airavata.model.workspace.Project;
 import org.apache.airavata.registry.core.entities.expcatalog.ExperimentEntity;
+import org.apache.airavata.registry.core.entities.workflowcatalog.WorkflowEntity;
 import org.apache.airavata.registry.core.entities.workspacecatalog.GatewayEntity;
 import org.apache.airavata.registry.core.entities.workspacecatalog.NotificationEntity;
 import org.apache.airavata.registry.core.entities.workspacecatalog.ProjectEntity;
 import org.apache.airavata.registry.core.entities.workspacecatalog.UserProfileEntity;
 import org.apache.airavata.registry.core.repositories.expcatalog.ExperimentRepository;
+import org.apache.airavata.registry.core.repositories.workflowcatalog.WorkflowRepository;
 import org.apache.airavata.registry.core.repositories.workspacecatalog.GatewayRepository;
 import org.apache.airavata.registry.core.repositories.workspacecatalog.NotificationRepository;
 import org.apache.airavata.registry.core.repositories.workspacecatalog.ProjectRepository;
@@ -57,11 +60,13 @@ public class RepositoryTest {
     private UserProfileRepository userProfileRepository;
     private ProjectRepository projectRepository;
     private ExperimentRepository experimentRepository;
+    private WorkflowRepository workflowRepository;
     private String gatewayId;
     private String notificationId;
     private String userId;
     private String projectId;
     private String experimentId;
+    private String templateId;
 
     private final String GATEWAY_DOMAIN = "test1.com";
     private final String NOTIFY_MESSAGE = "NotifyMe";
@@ -69,6 +74,8 @@ public class RepositoryTest {
     private final String PROJECT_DESCRIPTION = "Test Description";
     private final String EXPERIMENT_NAME = "sample experiment";
     private final String EXPERIMENT_DESCRIPTION = "sample description";
+    private final String WORKFLOW_NAME = "test Workflow";
+
 
     @Before
     public void setupRepository() {
@@ -79,12 +86,14 @@ public class RepositoryTest {
         userProfileRepository = new UserProfileRepository(UserProfile.class, UserProfileEntity.class);
         projectRepository = new ProjectRepository(Project.class, ProjectEntity.class);
         experimentRepository = new ExperimentRepository(ExperimentModel.class, ExperimentEntity.class);
+        workflowRepository = new WorkflowRepository(WorkflowModel.class, WorkflowEntity.class);
 
         gatewayId = "test.com" + System.currentTimeMillis();
         notificationId = UUID.randomUUID().toString();
         userId = "testuser" + System.currentTimeMillis();
         projectId = "project" + System.currentTimeMillis();
         experimentId = "exp" + System.currentTimeMillis();
+        templateId = "templateId" + System.currentTimeMillis();
     }
 
 
@@ -381,4 +390,80 @@ public class RepositoryTest {
 
 
     }
+
+
+    @Test
+    public void workflowRepositoryTest() {
+
+
+        System.out.println();
+		/*
+         * Creating Gateway required for UserProfile & Workflow creation
+		 */
+        Gateway gateway = new Gateway();
+        gateway.setGatewayApprovalStatus(GatewayApprovalStatus.ACTIVE);
+        gateway.setGatewayId(gatewayId);
+        gateway.setDomain(GATEWAY_DOMAIN);
+        gateway = gatewayRepository.create(gateway);
+        Assert.assertTrue(!gateway.getGatewayId().isEmpty());
+
+		/*
+         * UserProfile Instance creation required for Workflow Creation
+		 */
+        UserProfile userProfile = new UserProfile();
+        userProfile.setAiravataInternalUserId(userId);
+        userProfile.setGatewayId(gateway.getGatewayId());
+        userProfile = userProfileRepository.create(userProfile);
+        Assert.assertTrue(!userProfile.getAiravataInternalUserId().isEmpty());
+
+        /*
+         * Workflow Instance Creation
+         */
+
+        WorkflowModel workflowModel = new WorkflowModel();
+        workflowModel.setTemplateId(templateId);
+        workflowModel.setCreatedUser(userId);
+        workflowModel.setGatewayId(gatewayId);
+        workflowModel.setName(WORKFLOW_NAME);
+
+
+        /*
+         * Workflow Repository Insert Operation Test
+		 */
+        workflowModel = workflowRepository.create(workflowModel);
+        Assert.assertTrue(!workflowModel.getTemplateId().isEmpty());
+
+
+
+
+        /*
+         * Workflow Repository Update Operation Test
+		 */
+        workflowModel.setGraph("test");
+        workflowRepository.update(workflowModel);
+        workflowModel = workflowRepository.get(templateId);
+        Assert.assertEquals(workflowModel.getGraph(), "test");
+
+		/*
+         * Workflow Repository Select Operation Test
+		 */
+        workflowModel = null;
+        workflowModel = workflowRepository.get(templateId);
+        Assert.assertNotNull(workflowModel);
+
+		/*
+         * Workflow Repository Delete Operation
+		 */
+
+        boolean deleteResult = workflowRepository.delete(templateId);
+        Assert.assertTrue(deleteResult);
+
+        deleteResult = userProfileRepository.delete(userId);
+        Assert.assertTrue(deleteResult);
+
+        deleteResult = gatewayRepository.delete(gatewayId);
+        Assert.assertTrue(deleteResult);
+
+
+    }
 }
\ No newline at end of file