aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/EntitlementPoolEntity.java
diff options
context:
space:
mode:
Diffstat (limited to 'openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/EntitlementPoolEntity.java')
-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/EntitlementPoolEntity.java93
1 files changed, 49 insertions, 44 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/EntitlementPoolEntity.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/EntitlementPoolEntity.java
index 8964458181..0a704721d5 100644
--- a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/EntitlementPoolEntity.java
+++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/EntitlementPoolEntity.java
@@ -55,7 +55,6 @@ public class EntitlementPoolEntity implements VersionableEntity {
private String name;
private String description;
-
@Column(name = "threshold")
private int thresholdValue;
@@ -114,14 +113,6 @@ public class EntitlementPoolEntity implements VersionableEntity {
return getVendorLicenseModelId();
}
- public String getVendorLicenseModelId() {
- return vendorLicenseModelId;
- }
-
- public void setVendorLicenseModelId(String vendorLicenseModelId) {
- this.vendorLicenseModelId = vendorLicenseModelId;
- }
-
@Override
public String getId() {
return id;
@@ -142,6 +133,24 @@ public class EntitlementPoolEntity implements VersionableEntity {
this.version = version;
}
+ @Override
+ public String getVersionUuId() {
+ return versionUuId;
+ }
+
+ @Override
+ public void setVersionUuId(String uuId) {
+ versionUuId = uuId;
+ }
+
+ public String getVendorLicenseModelId() {
+ return vendorLicenseModelId;
+ }
+
+ public void setVendorLicenseModelId(String vendorLicenseModelId) {
+ this.vendorLicenseModelId = vendorLicenseModelId;
+ }
+
public Set<String> getReferencingFeatureGroups() {
return referencingFeatureGroups;
}
@@ -234,13 +243,11 @@ public class EntitlementPoolEntity implements VersionableEntity {
this.manufacturerReferenceNumber = manufacturerReferenceNumber;
}
-
/**
* Gets threshold for artifact.
*
* @return the threshold for artifact
*/
- //util methods for XML
public ThresholdForXml getThresholdForArtifact() {
ThresholdForXml threshold = new ThresholdForXml();
threshold.setUnit(getThresholdUnit() == null ? null : getThresholdUnit().name());
@@ -249,6 +256,14 @@ public class EntitlementPoolEntity implements VersionableEntity {
}
/**
+ * Gets version for artifact.
+ * @return version in format suitable for artifact
+ */
+ public String getVersionForArtifact() {
+ return version.toString();
+ }
+
+ /**
* Gets entitlement metric for artifact.
*
* @return the entitlement metric for artifact
@@ -277,26 +292,12 @@ public class EntitlementPoolEntity implements VersionableEntity {
return timeForXml;
}
-
@Override
- public String toString() {
- return "EntitlementPoolEntity{"
- + "vendorLicenseModelId='" + vendorLicenseModelId + '\''
- + ", version=" + version
- + ", id='" + id + '\''
- + ", name='" + name + '\''
- + ", description='" + description + '\''
- + ", thresholdValue=" + thresholdValue
- + ", thresholdUnit='" + thresholdUnit + '\''
- + ", entitlementMetric=" + entitlementMetric
- + ", increments='" + increments + '\''
- + ", aggregationFunction=" + aggregationFunction
- + ", operationalScope=" + operationalScope
- + ", time=" + time
- + ", manufacturerReferenceNumber='" + manufacturerReferenceNumber + '\''
- + ", referencingFeatureGroups=" + referencingFeatureGroups
- + ", version_uuid=" + versionUuId
- + '}';
+ public int hashCode() {
+ return Objects
+ .hash(vendorLicenseModelId, version, id, name, description, thresholdValue, thresholdUnit,
+ entitlementMetric, increments, aggregationFunction, operationalScope, time,
+ manufacturerReferenceNumber, referencingFeatureGroups);
}
@Override
@@ -310,7 +311,6 @@ public class EntitlementPoolEntity implements VersionableEntity {
EntitlementPoolEntity that = (EntitlementPoolEntity) obj;
return Float.compare(that.thresholdValue, thresholdValue) == 0
&& Objects.equals(vendorLicenseModelId, that.vendorLicenseModelId)
- && Objects.equals(version, that.version)
&& Objects.equals(id, that.id)
&& Objects.equals(name, that.name)
&& Objects.equals(description, that.description)
@@ -325,11 +325,24 @@ public class EntitlementPoolEntity implements VersionableEntity {
}
@Override
- public int hashCode() {
- return Objects
- .hash(vendorLicenseModelId, version, id, name, description, thresholdValue, thresholdUnit,
- entitlementMetric, increments, aggregationFunction, operationalScope, time,
- manufacturerReferenceNumber, referencingFeatureGroups);
+ public String toString() {
+ return "EntitlementPoolEntity{"
+ + "vendorLicenseModelId='" + vendorLicenseModelId + '\''
+ + ", version=" + version
+ + ", id='" + id + '\''
+ + ", name='" + name + '\''
+ + ", description='" + description + '\''
+ + ", thresholdValue=" + thresholdValue
+ + ", thresholdUnit='" + thresholdUnit + '\''
+ + ", entitlementMetric=" + entitlementMetric
+ + ", increments='" + increments + '\''
+ + ", aggregationFunction=" + aggregationFunction
+ + ", operationalScope=" + operationalScope
+ + ", time=" + time
+ + ", manufacturerReferenceNumber='" + manufacturerReferenceNumber + '\''
+ + ", referencingFeatureGroups=" + referencingFeatureGroups
+ + ", version_uuid=" + versionUuId
+ + '}';
}
/**
@@ -359,12 +372,4 @@ public class EntitlementPoolEntity implements VersionableEntity {
return null;
}
}
-
- public String getVersionUuId() {
- return versionUuId;
- }
-
- public void setVersionUuId(String uuId) {
- versionUuId = uuId;
- }
}