aboutsummaryrefslogtreecommitdiffstats
path: root/models-interactions/model-impl
diff options
context:
space:
mode:
authorJorge Hernandez <jorge.hernandez-herrero@att.com>2019-10-30 15:56:26 +0000
committerGerrit Code Review <gerrit@onap.org>2019-10-30 15:56:26 +0000
commitdc1773e466f12dab993d1241a1a0b7ce36695713 (patch)
tree9962de2aca3fd312c595e733f8ccc55faf02c807 /models-interactions/model-impl
parent9674dc26855ada6a2ce5cf5b85af2707d4ae8d6b (diff)
parentf69660e15ab9a1545f70f1545c18da6768488c26 (diff)
Merge "Changes in preparation for the m2 model (part 2)"
Diffstat (limited to 'models-interactions/model-impl')
-rw-r--r--models-interactions/model-impl/sdc/src/main/java/org/onap/policy/sdc/Resource.java50
-rw-r--r--models-interactions/model-impl/sdc/src/main/java/org/onap/policy/sdc/ResourceInstance.java46
-rw-r--r--models-interactions/model-impl/sdc/src/main/java/org/onap/policy/sdc/ResourceType.java22
3 files changed, 18 insertions, 100 deletions
diff --git a/models-interactions/model-impl/sdc/src/main/java/org/onap/policy/sdc/Resource.java b/models-interactions/model-impl/sdc/src/main/java/org/onap/policy/sdc/Resource.java
index 8bdf9d3d4..61b6e3afd 100644
--- a/models-interactions/model-impl/sdc/src/main/java/org/onap/policy/sdc/Resource.java
+++ b/models-interactions/model-impl/sdc/src/main/java/org/onap/policy/sdc/Resource.java
@@ -23,7 +23,11 @@ package org.onap.policy.sdc;
import java.io.Serializable;
import java.util.UUID;
+import lombok.Getter;
+import lombok.Setter;
+@Getter
+@Setter
public class Resource implements Serializable {
private static final long serialVersionUID = -913729158733348027L;
@@ -32,7 +36,7 @@ public class Resource implements Serializable {
private UUID resourceInvariantUuid;
private String resourceName;
private String resourceVersion;
- private ResourceType resourceType;
+ private String resourceType;
public Resource() {
//Empty Constructor
@@ -55,7 +59,7 @@ public class Resource implements Serializable {
this.resourceUuid = uuid;
}
- public Resource(String name, ResourceType type) {
+ public Resource(String name, String type) {
this.resourceName = name;
this.resourceType = type;
}
@@ -69,7 +73,7 @@ public class Resource implements Serializable {
* @param version version
* @param type type
*/
- public Resource(UUID uuid, UUID invariantUuid, String name, String version, ResourceType type) {
+ public Resource(UUID uuid, UUID invariantUuid, String name, String version, String type) {
this.resourceUuid = uuid;
this.resourceInvariantUuid = invariantUuid;
this.resourceName = name;
@@ -77,46 +81,6 @@ public class Resource implements Serializable {
this.resourceType = type;
}
- public UUID getResourceUuid() {
- return resourceUuid;
- }
-
- public void setResourceUuid(UUID resourceUuid) {
- this.resourceUuid = resourceUuid;
- }
-
- public UUID getResourceInvariantUuid() {
- return resourceInvariantUuid;
- }
-
- public void setResourceInvariantUuid(UUID resourceInvariantUuid) {
- this.resourceInvariantUuid = resourceInvariantUuid;
- }
-
- public String getResourceName() {
- return resourceName;
- }
-
- public void setResourceName(String resourceName) {
- this.resourceName = resourceName;
- }
-
- public String getResourceVersion() {
- return resourceVersion;
- }
-
- public void setResourceVersion(String resourceVersion) {
- this.resourceVersion = resourceVersion;
- }
-
- public ResourceType getResourceType() {
- return resourceType;
- }
-
- public void setResourceType(ResourceType resourceType) {
- this.resourceType = resourceType;
- }
-
@Override
public String toString() {
return "Resource [resourceUuid=" + resourceUuid + ", resourceInvariantUuid=" + resourceInvariantUuid
diff --git a/models-interactions/model-impl/sdc/src/main/java/org/onap/policy/sdc/ResourceInstance.java b/models-interactions/model-impl/sdc/src/main/java/org/onap/policy/sdc/ResourceInstance.java
index 9c1db8a55..05842e24c 100644
--- a/models-interactions/model-impl/sdc/src/main/java/org/onap/policy/sdc/ResourceInstance.java
+++ b/models-interactions/model-impl/sdc/src/main/java/org/onap/policy/sdc/ResourceInstance.java
@@ -23,7 +23,11 @@ package org.onap.policy.sdc;
import java.io.Serializable;
import java.util.UUID;
+import lombok.Getter;
+import lombok.Setter;
+@Getter
+@Setter
public class ResourceInstance implements Serializable {
private static final long serialVersionUID = -5506162340393802424L;
@@ -32,7 +36,7 @@ public class ResourceInstance implements Serializable {
private String resourceName;
private UUID resourceInvariantUuid;
private String resourceVersion;
- private ResourceType resourceType;
+ private String resourceType;
private UUID resourceUuid;
public ResourceInstance() {
@@ -56,22 +60,6 @@ public class ResourceInstance implements Serializable {
this.resourceUuid = instance.resourceUuid;
}
- public String getResourceInstanceName() {
- return resourceInstanceName;
- }
-
- public void setResourceInstanceName(String resourceInstanceName) {
- this.resourceInstanceName = resourceInstanceName;
- }
-
- public String getResourceName() {
- return resourceName;
- }
-
- public void setResourceName(String resourceName) {
- this.resourceName = resourceName;
- }
-
public UUID getResourceInvariantUUID() {
return resourceInvariantUuid;
}
@@ -80,30 +68,6 @@ public class ResourceInstance implements Serializable {
this.resourceInvariantUuid = resourceInvariantUuid;
}
- public String getResourceVersion() {
- return resourceVersion;
- }
-
- public void setResourceVersion(String resourceVersion) {
- this.resourceVersion = resourceVersion;
- }
-
- public ResourceType getResourceType() {
- return resourceType;
- }
-
- public void setResourceType(ResourceType resourceType) {
- this.resourceType = resourceType;
- }
-
- public UUID getResourceUuid() {
- return resourceUuid;
- }
-
- public void setResourceUuid(UUID resourceUuid) {
- this.resourceUuid = resourceUuid;
- }
-
@Override
public String toString() {
return "ResourceInstance [resourceInstanceName=" + resourceInstanceName + ", resourceName=" + resourceName
diff --git a/models-interactions/model-impl/sdc/src/main/java/org/onap/policy/sdc/ResourceType.java b/models-interactions/model-impl/sdc/src/main/java/org/onap/policy/sdc/ResourceType.java
index c055cbb50..34cefa1ab 100644
--- a/models-interactions/model-impl/sdc/src/main/java/org/onap/policy/sdc/ResourceType.java
+++ b/models-interactions/model-impl/sdc/src/main/java/org/onap/policy/sdc/ResourceType.java
@@ -21,22 +21,12 @@
package org.onap.policy.sdc;
-public enum ResourceType {
- VF("VF"),
- VFC("VFC"),
- VL("VL"),
- CP("CP")
- ;
+public class ResourceType {
+ public static final String VF = "VF";
+ public static final String VFC = "VFC";
+ public static final String VL = "VL";
+ public static final String CP = "CP";
- private String type;
-
- private ResourceType(String type) {
- this.type = type;
- }
-
- @Override
- public String toString() {
- return this.type;
+ private ResourceType() {
}
-
}