From c61306fcba0cf9e760ac69ec5ff753b463dbffdc Mon Sep 17 00:00:00 2001 From: vempo Date: Fri, 29 Dec 2017 16:59:26 +0200 Subject: Default constructors in vendor-license-api module Change-Id: I27d68b0e9d2eb73e044a11433358f697d692cd4a Issue-ID: SDC-343 Signed-off-by: vempo --- .../vendorlicense/dao/types/EntitlementPoolEntity.java | 16 +++++++++++----- .../sdc/vendorlicense/dao/types/FeatureGroupEntity.java | 6 ++++++ .../vendorlicense/dao/types/LicenseAgreementEntity.java | 6 ++++++ .../vendorlicense/dao/types/LicenseKeyGroupEntity.java | 17 +++++++++++------ .../dao/types/VendorLicenseModelEntity.java | 6 ++++++ 5 files changed, 40 insertions(+), 11 deletions(-) (limited to 'openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main') 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 6c4ba90d96..4bcfd9d4d1 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 @@ -44,7 +44,7 @@ import java.util.Set; @Table(keyspace = "dox", name = "entitlement_pool") public class EntitlementPoolEntity implements VersionableEntity { - private static MdcDataDebugMessage mdcDataDebugMessage = new MdcDataDebugMessage(); + private static final MdcDataDebugMessage MDC_DATA_DEBUG_MESSAGE = new MdcDataDebugMessage(); private static final String ENTITY_TYPE = "Entitlement Pool"; @PartitionKey @@ -89,7 +89,13 @@ public class EntitlementPoolEntity implements VersionableEntity { //Defined and used only for License Artifcat XMLs private String manufacturerReferenceNumber; + /** + * Every entity class must have a default constructor according to + * + * Definition of mapped classes. + */ public EntitlementPoolEntity() { + // Don't delete! Default constructor is required by DataStax driver } /** @@ -381,11 +387,11 @@ public class EntitlementPoolEntity implements VersionableEntity { } public String getIsoFormatStartDate() { - mdcDataDebugMessage.debugEntryMessage("start date", startDate); + MDC_DATA_DEBUG_MESSAGE.debugEntryMessage("start date", startDate); String isoFormatStartDate = null; if (!StringUtils.isEmpty(startDate)) { isoFormatStartDate = VendorLicenseUtil.getIsoFormatDate(startDate); - mdcDataDebugMessage.debugExitMessage("start date", "iso format start date", startDate, + MDC_DATA_DEBUG_MESSAGE.debugExitMessage("start date", "iso format start date", startDate, isoFormatStartDate); } return isoFormatStartDate; @@ -393,11 +399,11 @@ public class EntitlementPoolEntity implements VersionableEntity { public String getIsoFormatExpiryDate() { - mdcDataDebugMessage.debugEntryMessage("expiry date", expiryDate); + MDC_DATA_DEBUG_MESSAGE.debugEntryMessage("expiry date", expiryDate); String isoFormatExpDate = null; if (!StringUtils.isEmpty(expiryDate)) { isoFormatExpDate = VendorLicenseUtil.getIsoFormatDate(expiryDate); - mdcDataDebugMessage.debugExitMessage("expiry date", "iso format expiry date", expiryDate, + MDC_DATA_DEBUG_MESSAGE.debugExitMessage("expiry date", "iso format expiry date", expiryDate, isoFormatExpDate); } return isoFormatExpDate; 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/FeatureGroupEntity.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/FeatureGroupEntity.java index f1fc1a96f1..57064124f8 100644 --- a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/FeatureGroupEntity.java +++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/FeatureGroupEntity.java @@ -58,7 +58,13 @@ public class FeatureGroupEntity implements VersionableEntity { @Column(name = "ref_la_ids") private Set referencingLicenseAgreements = new HashSet<>(); + /** + * Every entity class must have a default constructor according to + * + * Definition of mapped classes. + */ public FeatureGroupEntity() { + // Don't delete! Default constructor is required by DataStax driver } /** 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/LicenseAgreementEntity.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/LicenseAgreementEntity.java index 7f7dab684a..801a54d913 100644 --- a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/LicenseAgreementEntity.java +++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/LicenseAgreementEntity.java @@ -60,7 +60,13 @@ public class LicenseAgreementEntity implements VersionableEntity { @Column(name = "fg_ids") private Set featureGroupIds = new HashSet<>(); + /** + * Every entity class must have a default constructor according to + * + * Definition of mapped classes. + */ public LicenseAgreementEntity() { + // Don't delete! Default constructor is required by DataStax driver } /** 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/LicenseKeyGroupEntity.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/LicenseKeyGroupEntity.java index 7794aaf275..43de02b174 100644 --- a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/LicenseKeyGroupEntity.java +++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/LicenseKeyGroupEntity.java @@ -45,7 +45,7 @@ import java.util.Set; @Table(keyspace = "dox", name = "license_key_group") public class LicenseKeyGroupEntity implements VersionableEntity { - private static MdcDataDebugMessage mdcDataDebugMessage = new MdcDataDebugMessage(); + private static final MdcDataDebugMessage MDC_DATA_DEBUG_MESSAGE = new MdcDataDebugMessage(); private static final String ENTITY_TYPE = "License Key Group"; @PartitionKey @@ -79,8 +79,13 @@ public class LicenseKeyGroupEntity implements VersionableEntity { //Defined and used only for License Artifcat XMLs private String manufacturerReferenceNumber; - + /** + * Every entity class must have a default constructor according to + * + * Definition of mapped classes. + */ public LicenseKeyGroupEntity() { + // Don't delete! Default constructor is required by DataStax driver } /** @@ -387,11 +392,11 @@ public class LicenseKeyGroupEntity implements VersionableEntity { } public String getIsoFormatStartDate() { - mdcDataDebugMessage.debugEntryMessage("start date", startDate); + MDC_DATA_DEBUG_MESSAGE.debugEntryMessage("start date", startDate); String isoFormatStartDate = null; if (!StringUtils.isEmpty(startDate)) { isoFormatStartDate = VendorLicenseUtil.getIsoFormatDate(startDate); - mdcDataDebugMessage.debugExitMessage("start date", "iso format start date", startDate, + MDC_DATA_DEBUG_MESSAGE.debugExitMessage("start date", "iso format start date", startDate, isoFormatStartDate); } return isoFormatStartDate; @@ -399,11 +404,11 @@ public class LicenseKeyGroupEntity implements VersionableEntity { public String getIsoFormatExpiryDate() { - mdcDataDebugMessage.debugEntryMessage("expiry date", expiryDate); + MDC_DATA_DEBUG_MESSAGE.debugEntryMessage("expiry date", expiryDate); String isoFormatExpDate = null; if (!StringUtils.isEmpty(expiryDate)) { isoFormatExpDate = VendorLicenseUtil.getIsoFormatDate(expiryDate); - mdcDataDebugMessage.debugExitMessage("expiry date", "iso format expiry date", expiryDate, + MDC_DATA_DEBUG_MESSAGE.debugExitMessage("expiry date", "iso format expiry date", expiryDate, isoFormatExpDate); } return isoFormatExpDate; 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/VendorLicenseModelEntity.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/VendorLicenseModelEntity.java index 05cc78f855..0d43d7e5eb 100644 --- a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/VendorLicenseModelEntity.java +++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/VendorLicenseModelEntity.java @@ -52,7 +52,13 @@ public class VendorLicenseModelEntity implements VersionableEntity { @Computed("writetime(vendor_name)") private Long writetimeMicroSeconds; + /** + * Every entity class must have a default constructor according to + * + * Definition of mapped classes. + */ public VendorLicenseModelEntity() { + // Don't delete! Default constructor is required by DataStax driver } public VendorLicenseModelEntity(String id, Version version) { -- cgit 1.2.3-korg