aboutsummaryrefslogtreecommitdiffstats
path: root/mso-catalog-db
diff options
context:
space:
mode:
authorSteve Smokowski <ss835w@att.com>2019-12-18 21:00:33 +0000
committerGerrit Code Review <gerrit@onap.org>2019-12-18 21:00:33 +0000
commit65f706774bfd515efffb9afab407913eb9d1c08b (patch)
tree80413ad11d9225fa275f949f0ffaf721c87079b5 /mso-catalog-db
parentb55a3a35b75653f9804821432d95ae769ea494b5 (diff)
parentb39509088a320c5c60b26f74ced3f420d217c376 (diff)
Merge "Implementing scope and action values from SO-DB to SO-Backend"
Diffstat (limited to 'mso-catalog-db')
-rw-r--r--mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/macro/OrchestrationFlow.java33
-rw-r--r--mso-catalog-db/src/test/resources/schema.sql2
2 files changed, 31 insertions, 4 deletions
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/macro/OrchestrationFlow.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/macro/OrchestrationFlow.java
index b74ade1e1f..91b74d4d6a 100644
--- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/macro/OrchestrationFlow.java
+++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/macro/OrchestrationFlow.java
@@ -34,7 +34,6 @@ import javax.persistence.Table;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.onap.so.db.catalog.beans.BuildingBlockDetail;
import com.openpojo.business.annotation.BusinessKey;
import uk.co.blackpepper.bowman.annotation.LinkedResource;
@@ -65,6 +64,14 @@ public class OrchestrationFlow implements Serializable {
@Column(name = "FLOW_VERSION")
private Double flowVersion;
+ @BusinessKey
+ @Column(name = "ACTION")
+ private String bpmnAction;
+
+ @BusinessKey
+ @Column(name = "SCOPE")
+ private String bpmnScope;
+
@ManyToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
@JoinColumn(name = "NB_REQ_REF_LOOKUP_ID")
private NorthBoundRequest northBoundRequest;
@@ -73,7 +80,8 @@ public class OrchestrationFlow implements Serializable {
public String toString() {
return new ToStringBuilder(this).append("id", id).append("action", action)
.append("sequenceNumber", sequenceNumber).append("flowName", flowName)
- .append("flowVersion", flowVersion).toString();
+ .append("flowVersion", flowVersion).append("bpmnAction", bpmnAction).append("bpmnScope", bpmnScope)
+ .toString();
}
@Override
@@ -83,13 +91,14 @@ public class OrchestrationFlow implements Serializable {
}
OrchestrationFlow castOther = (OrchestrationFlow) other;
return new EqualsBuilder().append(action, castOther.action).append(sequenceNumber, castOther.sequenceNumber)
- .append(flowName, castOther.flowName).append(flowVersion, castOther.flowVersion).isEquals();
+ .append(flowName, castOther.flowName).append(flowVersion, castOther.flowVersion)
+ .append(bpmnAction, castOther.bpmnAction).append(bpmnScope, castOther.bpmnScope).isEquals();
}
@Override
public int hashCode() {
return new HashCodeBuilder().append(action).append(sequenceNumber).append(flowName).append(flowVersion)
- .toHashCode();
+ .append(bpmnAction).append(bpmnScope).toHashCode();
}
public String getAction() {
@@ -132,6 +141,22 @@ public class OrchestrationFlow implements Serializable {
this.id = id;
}
+ public String getBpmnAction() {
+ return bpmnAction;
+ }
+
+ public void setBpmnAction(String bpmnAction) {
+ this.bpmnAction = bpmnAction;
+ }
+
+ public String getBpmnScope() {
+ return bpmnScope;
+ }
+
+ public void setBpmnScope(String bpmnScope) {
+ this.bpmnScope = bpmnScope;
+ }
+
@LinkedResource
public NorthBoundRequest getNorthBoundRequest() {
return northBoundRequest;
diff --git a/mso-catalog-db/src/test/resources/schema.sql b/mso-catalog-db/src/test/resources/schema.sql
index 5668ae5718..9037e431d4 100644
--- a/mso-catalog-db/src/test/resources/schema.sql
+++ b/mso-catalog-db/src/test/resources/schema.sql
@@ -736,6 +736,8 @@ CREATE TABLE `orchestration_flow_reference` (
`SEQ_NO` int(11) NOT NULL,
`FLOW_NAME` varchar(200) NOT NULL,
`FLOW_VERSION` double NOT NULL,
+ `SCOPE` varchar(200) DEFAULT NULL,
+ `ACTION` varchar(200) DEFAULT NULL,
`NB_REQ_REF_LOOKUP_ID` int(11) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `UK_orchestration_flow_reference` (`COMPOSITE_ACTION`,`FLOW_NAME`,`SEQ_NO`,`NB_REQ_REF_LOOKUP_ID`),