[ 
https://issues.apache.org/jira/browse/AIRAVATA-2719?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16416096#comment-16416096
 ] 

ASF GitHub Bot commented on AIRAVATA-2719:
------------------------------------------

tilaks26 commented on a change in pull request #187: [AIRAVATA-2719] 
Refactoring Replica Catalog Implementation
URL: https://github.com/apache/airavata/pull/187#discussion_r177535101
 
 

 ##########
 File path: 
modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/replicacatalog/DataProductEntity.java
 ##########
 @@ -20,24 +20,61 @@
 */
 package org.apache.airavata.registry.core.entities.replicacatalog;
 
+import org.apache.airavata.model.data.replica.DataProductType;
+
+import java.util.*;
 import javax.persistence.*;
+import java.io.Serializable;
 import java.sql.Timestamp;
 
+/**
+ * The persistent class for the data_product database table.
+ */
 @Entity
-@Table(name = "data_product", schema = "airavata_catalog", catalog = "")
-public class DataProductEntity {
+@Table(name = "DATA_PRODUCT")
+public class DataProductEntity implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    @Id
+    @Column(name = "PRODUCT_URI")
     private String productUri;
+
+    @Column(name = "GATEWAY_ID")
     private String gatewayId;
+
+    @Column(name = "PRODUCT_NAME")
     private String productName;
+
+    @Column(name = "PRODUCT_DESCRIPTION")
     private String productDescription;
+
+    @Column(name = "OWNER_NAME")
     private String ownerName;
+
+    @Column(name = "PARENT_PRODUCT_URI")
     private String parentProductUri;
-    private Integer productSize;
+
+    @Column(name = "PRODUCT_SIZE")
+    private int productSize;
+
+    @Column(name = "CREATION_TIME")
     private Timestamp creationTime;
+
+    @Column(name = "LAST_MODIFIED_TIME")
     private Timestamp lastModifiedTime;
 
-    @Id
-    @Column(name = "PRODUCT_URI")
+    @Column(name = "PRODUCT_TYPE")
+    private DataProductType dataProductType;
+
+    @ElementCollection(fetch = FetchType.EAGER)
+    @CollectionTable(name="DATA_PRODUCT_METADATA", joinColumns = 
@JoinColumn(name="PRODUCT_URI"))
+    @Column(name = "METADATA_KEY")
+    private Map<String, String> productMetadata;
 
 Review comment:
   You mean like this?
   
   ```
   @ElementCollection(fetch = FetchType.EAGER)
   @CollectionTable(name="DATA_PRODUCT_METADATA", joinColumns = 
@JoinColumn(name="PRODUCT_URI"))
   @MapKeyColumn(name = "METADATA_KEY")
   @Column(name = "METADATA_VALUE")
   private Map<String, String> productMetadata;
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Refactoring Replica Catalog
> ---------------------------
>
>                 Key: AIRAVATA-2719
>                 URL: https://issues.apache.org/jira/browse/AIRAVATA-2719
>             Project: Airavata
>          Issue Type: Improvement
>          Components: Registry API
>            Reporter: Sneha Tilak
>            Assignee: Sneha Tilak
>            Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to