You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ma...@apache.org on 2018/05/04 14:47:50 UTC
[airavata] branch group-based-auth updated: AIRAVATA-2758 Setting
default values on ComputeResourceEntity fields
This is an automated email from the ASF dual-hosted git repository.
machristie pushed a commit to branch group-based-auth
in repository https://gitbox.apache.org/repos/asf/airavata.git
The following commit(s) were added to refs/heads/group-based-auth by this push:
new ca0f1f0 AIRAVATA-2758 Setting default values on ComputeResourceEntity fields
ca0f1f0 is described below
commit ca0f1f0e54010b7c7f389416ec7cb07df75a0cb1
Author: Marcus Christie <ma...@apache.org>
AuthorDate: Fri May 4 10:46:26 2018 -0400
AIRAVATA-2758 Setting default values on ComputeResourceEntity fields
---
.../entities/appcatalog/ComputeResourceEntity.java | 25 +++++++++++++++-------
1 file changed, 17 insertions(+), 8 deletions(-)
diff --git a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/appcatalog/ComputeResourceEntity.java b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/appcatalog/ComputeResourceEntity.java
index 313a5db..c6cfdc4 100644
--- a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/appcatalog/ComputeResourceEntity.java
+++ b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/appcatalog/ComputeResourceEntity.java
@@ -20,11 +20,20 @@
*/
package org.apache.airavata.registry.core.entities.appcatalog;
-import javax.persistence.*;
+import javax.persistence.CascadeType;
+import javax.persistence.CollectionTable;
+import javax.persistence.Column;
+import javax.persistence.ElementCollection;
+import javax.persistence.Entity;
+import javax.persistence.FetchType;
+import javax.persistence.Id;
+import javax.persistence.JoinColumn;
+import javax.persistence.OneToMany;
+import javax.persistence.Table;
import java.io.Serializable;
import java.sql.Timestamp;
+import java.time.Instant;
import java.util.List;
-import java.util.Map;
/**
* The persistent class for the compute_resource database table.
@@ -39,7 +48,7 @@ public class ComputeResourceEntity implements Serializable {
private String computeResourceId;
@Column(name = "CREATION_TIME")
- private Timestamp creationTime;
+ private Timestamp creationTime = Timestamp.from(Instant.now());
@Column(name = "ENABLED")
private short enabled;
@@ -63,19 +72,19 @@ public class ComputeResourceEntity implements Serializable {
private String resourceDescription;
@Column(name = "UPDATE_TIME")
- private Timestamp updateTime;
+ private Timestamp updateTime = Timestamp.from(Instant.now());
@Column(name = "CPUS_PER_NODE")
- private Integer cpusPerNode;
+ private Integer cpusPerNode = 0;
@Column(name = "DEFAULT_NODE_COUNT")
- private Integer defaultNodeCount;
+ private Integer defaultNodeCount = 0;
@Column(name = "DEFAULT_CPU_COUNT")
- private Integer defaultCPUCount;
+ private Integer defaultCPUCount = 0;
@Column(name = "DEFAULT_WALLTIME")
- private Integer defaultWalltime;
+ private Integer defaultWalltime = 0;
@ElementCollection(fetch = FetchType.EAGER)
@CollectionTable(name="HOST_ALIAS", joinColumns = @JoinColumn(name="RESOURCE_ID"))
--
To stop receiving notification emails like this one, please contact
machristie@apache.org.