aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main')
-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);
}