summaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api
diff options
context:
space:
mode:
authoravigaffa <avi.gaffa@amdocs.com>2017-09-10 08:58:51 +0300
committeravigaffa <avi.gaffa@amdocs.com>2017-09-10 10:07:00 +0300
commit00e935fc6b8baae4d9b9ffef2c748202a60b66b4 (patch)
tree56d7b608dbb5a53022db0350f04977da8cd960f5 /openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api
parent75c572279398dc2be7652263843c8802a9406c4f (diff)
Add latest bug fixes to master
Change-Id: Ieddc2330ad4e093984f14a69b52f2ca5cb465a10 Issue-ID: SDC-293 Signed-off-by: avigaffa <avi.gaffa@amdocs.com>
Diffstat (limited to 'openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api')
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/LimitEntity.java65
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/healing/HealingService.java3
2 files changed, 41 insertions, 27 deletions
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/LimitEntity.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/LimitEntity.java
index e40b2988b3..58ccd5e608 100644
--- a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/LimitEntity.java
+++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/LimitEntity.java
@@ -20,6 +20,9 @@ public class LimitEntity implements VersionableEntity {
private String unit;
private AggregationFunction aggregationFunction;
private String time;
+ //Defined and used only to find parent(EP/LKG) of Limit. Not to be persisted in DB and License
+ // Xmls
+ private String parent;
public LimitEntity() {
}
@@ -44,7 +47,7 @@ public class LimitEntity implements VersionableEntity {
}
public void setAggregationFunction(
- AggregationFunction aggregationFunction) {
+ AggregationFunction aggregationFunction) {
this.aggregationFunction = aggregationFunction;
}
@@ -143,10 +146,20 @@ public class LimitEntity implements VersionableEntity {
this.value = value;
}
- @Override
+ //Defined and used only to find parent(EP/LKG) of Limit. Not to be persisted in DB and License
+ // Xmls
+ public String getParent() {
+ return parent;
+ }
+
+ public void setParent(String parent) {
+ this.parent = parent;
+ }
+
+ @Override
public int hashCode() {
return Objects.hash(vendorLicenseModelId, version, epLkgId, id, name, description, type,
- metric, unit, time, aggregationFunction, value);
+ metric, unit, time, aggregationFunction, value);
}
@Override
@@ -159,35 +172,35 @@ public class LimitEntity implements VersionableEntity {
}
LimitEntity that = (LimitEntity) obj;
return Objects.equals(that.unit, unit)
- && Objects.equals(that.value, value)
- && Objects.equals(vendorLicenseModelId, that.vendorLicenseModelId)
- && Objects.equals(epLkgId, that.epLkgId)
- && Objects.equals(id, that.id)
- && Objects.equals(name, that.name)
- && Objects.equals(description, that.description)
- && Objects.equals(type, that.type)
- && Objects.equals(metric, that.metric)
- && Objects.equals(aggregationFunction, that.aggregationFunction);
+ && Objects.equals(that.value, value)
+ && Objects.equals(vendorLicenseModelId, that.vendorLicenseModelId)
+ && Objects.equals(epLkgId, that.epLkgId)
+ && Objects.equals(id, that.id)
+ && Objects.equals(name, that.name)
+ && Objects.equals(description, that.description)
+ && Objects.equals(type, that.type)
+ && Objects.equals(metric, that.metric)
+ && Objects.equals(aggregationFunction, that.aggregationFunction);
}
@Override
public String toString() {
return "LimitEntity{"
- + "vendorLicenseModelId='" + vendorLicenseModelId + '\''
- + ", version=" + version
- + ", epLkgId=" + epLkgId
- + ", id='" + id + '\''
- + ", name='" + name + '\''
- + ", description='" + description + '\''
- + ", type=" + type
- + ", metric=" + metric
- + ", value='" + value + '\''
- + ", unit='" + unit + '\''
- + ", aggregationFunction=" + aggregationFunction
- + ", time=" + time
-
- + '}';
+ + "vendorLicenseModelId='" + vendorLicenseModelId + '\''
+ + ", version=" + version
+ + ", epLkgId=" + epLkgId
+ + ", id='" + id + '\''
+ + ", name='" + name + '\''
+ + ", description='" + description + '\''
+ + ", type=" + type
+ + ", metric=" + metric
+ + ", value='" + value + '\''
+ + ", unit='" + unit + '\''
+ + ", aggregationFunction=" + aggregationFunction
+ + ", time=" + time
+
+ + '}';
}
}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/healing/HealingService.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/healing/HealingService.java
index 027cb1e5be..6ae2de1a63 100644
--- a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/healing/HealingService.java
+++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/healing/HealingService.java
@@ -24,8 +24,9 @@ import org.openecomp.sdc.versioning.dao.types.VersionableEntity;
public interface HealingService {
- // VersionableEntity heal(VersionableEntity toHeal, String user);
VersionableEntity heal(VersionableEntity toHeal, String user);
+
+ void persistNoHealing(VersionableEntity alreadyHealed);
}