From b39509088a320c5c60b26f74ced3f420d217c376 Mon Sep 17 00:00:00 2001 From: Manamohan Date: Thu, 12 Dec 2019 15:15:46 +0530 Subject: Implementing scope and action values from SO-DB to SO-Backend Issue-ID: SO-2513 Change-Id: I002a35a2a8ff4730d45c23d54f0acd4496b8b585 Signed-off-by: Manamohan --- .../db/catalog/beans/macro/OrchestrationFlow.java | 33 +++++++++++++++++++--- 1 file changed, 29 insertions(+), 4 deletions(-) (limited to 'mso-catalog-db/src/main/java') 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; -- cgit 1.2.3-korg