[
https://issues.apache.org/jira/browse/AIRAVATA-2719?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16414816#comment-16414816
]
ASF GitHub Bot commented on AIRAVATA-2719:
------------------------------------------
machristie commented on a change in pull request #187: [AIRAVATA-2719]
Refactoring Replica Catalog Implementation
URL: https://github.com/apache/airavata/pull/187#discussion_r177266809
##########
File path:
modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/replicacatalog/DataReplicaLocationEntity.java
##########
@@ -20,23 +20,65 @@
*/
package org.apache.airavata.registry.core.entities.replicacatalog;
+import org.apache.airavata.model.data.replica.ReplicaLocationCategory;
+import org.apache.airavata.model.data.replica.ReplicaPersistentType;
+
+import java.io.Serializable;
+import java.util.*;
import javax.persistence.*;
import java.sql.Timestamp;
+/**
+ * The persistent class for the data_replica_location database table.
+ */
@Entity
-@Table(name = "data_replica_location", schema = "airavata_catalog", catalog =
"")
-public class DataReplicaLocationEntity {
+@Table(name = "DATA_REPLICA_LOCATION")
+public class DataReplicaLocationEntity implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ @Id
+ @Column(name = "REPLICA_ID")
private String replicaId;
+
+ @Column(name = "PRODUCT_URI")
+ private String productUri;
+
+ @Column(name = "REPLICA_NAME")
private String replicaName;
+
+ @Column(name = "REPLICA_DESCRIPTION")
private String replicaDescription;
+
+ @Column(name = "STORAGE_RESOURCE_ID")
private String storageResourceId;
+
+ @Column(name = "FILE_PATH")
private String filePath;
+
+ @Column(name = "CREATION_TIME")
private Timestamp creationTime;
+
+ @Column(name = "LAST_MODIFIED_TIME")
private Timestamp lastModifiedTime;
+
+ @Column(name = "VALID_UNTIL_TIME")
private Timestamp validUntilTime;
- @Id
- @Column(name = "REPLICA_ID")
+ @Column(name = "REPLICA_LOCATION_CATEGORY")
+ private ReplicaLocationCategory replicaLocationCategory;
+
+ @Column(name = "REPLICA_PERSISTENT_TYPE")
+ private ReplicaPersistentType replicaPersistentType;
+
+ @ElementCollection(fetch = FetchType.EAGER)
+ @CollectionTable(name="DATA_REPLICA_METADATA", joinColumns =
@JoinColumn(name="REPLICA_ID"))
+ @Column(name = "METADATA_KEY")
+ private Map<String, String> replicaMetadata;
Review comment:
Same comment here, I think you need a @MapKeyColumn
----------------------------------------------------------------
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:
[email protected]
> 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)