aboutsummaryrefslogtreecommitdiffstats
path: root/models-interactions
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2021-06-17 16:54:20 -0400
committerAjith Sreekumar <ajith.sreekumar@bell.ca>2021-06-21 09:19:17 +0000
commit417e292dbaff7c30f86780e20da5fc95b108032a (patch)
treee34cf7ed3a8e10fe2bd185fdab8d53543d721aa3 /models-interactions
parent1ada3a6368f340df653886c4229b192ce7a5fc35 (diff)
Use lombok for events, base, dao
Issue-ID: POLICY-3396 Change-Id: I7b37efc13a25e0e27d63a85a3ee291e91a4e1682 Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'models-interactions')
-rw-r--r--models-interactions/model-impl/events/src/main/java/org/onap/policy/controlloop/Abated.java3
-rw-r--r--models-interactions/model-impl/events/src/main/java/org/onap/policy/controlloop/ControlLoopTargetType.java12
-rw-r--r--models-interactions/model-impl/events/src/main/java/org/onap/policy/controlloop/Onset.java3
-rw-r--r--models-interactions/model-impl/events/src/main/java/org/onap/policy/controlloop/PhysicalControlLoopEvent.java9
-rw-r--r--models-interactions/model-impl/events/src/main/java/org/onap/policy/controlloop/PhysicalControlLoopNotification.java9
-rw-r--r--models-interactions/model-impl/events/src/main/java/org/onap/policy/controlloop/util/Serialization.java7
6 files changed, 19 insertions, 24 deletions
diff --git a/models-interactions/model-impl/events/src/main/java/org/onap/policy/controlloop/Abated.java b/models-interactions/model-impl/events/src/main/java/org/onap/policy/controlloop/Abated.java
index 3488e3b6a..f2f879828 100644
--- a/models-interactions/model-impl/events/src/main/java/org/onap/policy/controlloop/Abated.java
+++ b/models-interactions/model-impl/events/src/main/java/org/onap/policy/controlloop/Abated.java
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* ONAP
* ================================================================================
- * Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -33,7 +33,6 @@ public class Abated extends VirtualControlLoopEvent {
* No arguments constructor.
*/
public Abated() {
- super();
setClosedLoopEventStatus(ControlLoopEventStatus.ABATED);
}
diff --git a/models-interactions/model-impl/events/src/main/java/org/onap/policy/controlloop/ControlLoopTargetType.java b/models-interactions/model-impl/events/src/main/java/org/onap/policy/controlloop/ControlLoopTargetType.java
index 55c133306..18dea09c9 100644
--- a/models-interactions/model-impl/events/src/main/java/org/onap/policy/controlloop/ControlLoopTargetType.java
+++ b/models-interactions/model-impl/events/src/main/java/org/onap/policy/controlloop/ControlLoopTargetType.java
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* controlloop
* ================================================================================
- * Copyright (C) 2017-2020 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017-2021 AT&T Intellectual Property. All rights reserved.
* Modifications Copyright (C) 2019 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -21,14 +21,14 @@
package org.onap.policy.controlloop;
-public class ControlLoopTargetType {
+import lombok.AccessLevel;
+import lombok.NoArgsConstructor;
+
+@NoArgsConstructor(access = AccessLevel.PRIVATE)
+public final class ControlLoopTargetType {
public static final String VM = "VM";
public static final String VF = "VF";
public static final String VFC = "VFC";
public static final String VNF = "VNF";
public static final String PNF = "PNF";
-
- private ControlLoopTargetType() {
- // do nothing
- }
}
diff --git a/models-interactions/model-impl/events/src/main/java/org/onap/policy/controlloop/Onset.java b/models-interactions/model-impl/events/src/main/java/org/onap/policy/controlloop/Onset.java
index 41a0ebab4..3f427734b 100644
--- a/models-interactions/model-impl/events/src/main/java/org/onap/policy/controlloop/Onset.java
+++ b/models-interactions/model-impl/events/src/main/java/org/onap/policy/controlloop/Onset.java
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* ONAP
* ================================================================================
- * Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -35,7 +35,6 @@ public class Onset extends VirtualControlLoopEvent {
* No arguments constructor.
*/
public Onset() {
- super();
setClosedLoopEventStatus(ControlLoopEventStatus.ONSET);
}
diff --git a/models-interactions/model-impl/events/src/main/java/org/onap/policy/controlloop/PhysicalControlLoopEvent.java b/models-interactions/model-impl/events/src/main/java/org/onap/policy/controlloop/PhysicalControlLoopEvent.java
index 17a23b749..e7cf7e33b 100644
--- a/models-interactions/model-impl/events/src/main/java/org/onap/policy/controlloop/PhysicalControlLoopEvent.java
+++ b/models-interactions/model-impl/events/src/main/java/org/onap/policy/controlloop/PhysicalControlLoopEvent.java
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* controlloop
* ================================================================================
- * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017-2019, 2021 AT&T Intellectual Property. All rights reserved.
* Modifications Copyright (C) 2019 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -21,13 +21,12 @@
package org.onap.policy.controlloop;
+import lombok.NoArgsConstructor;
+
+@NoArgsConstructor
public class PhysicalControlLoopEvent extends ControlLoopEvent {
private static final long serialVersionUID = -7282930271094849487L;
- public PhysicalControlLoopEvent() {
- // Default constructor
- }
-
/**
* Construct an instance from an existing instance.
*
diff --git a/models-interactions/model-impl/events/src/main/java/org/onap/policy/controlloop/PhysicalControlLoopNotification.java b/models-interactions/model-impl/events/src/main/java/org/onap/policy/controlloop/PhysicalControlLoopNotification.java
index 12c28c761..3290fb952 100644
--- a/models-interactions/model-impl/events/src/main/java/org/onap/policy/controlloop/PhysicalControlLoopNotification.java
+++ b/models-interactions/model-impl/events/src/main/java/org/onap/policy/controlloop/PhysicalControlLoopNotification.java
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* controlloop
* ================================================================================
- * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017-2019, 2021 AT&T Intellectual Property. All rights reserved.
* Modifications Copyright (C) 2019 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -21,13 +21,12 @@
package org.onap.policy.controlloop;
+import lombok.NoArgsConstructor;
+
+@NoArgsConstructor
public class PhysicalControlLoopNotification extends ControlLoopNotification {
private static final long serialVersionUID = 8105197217140032892L;
- public PhysicalControlLoopNotification() {
- // Default constructor
- }
-
/**
* Construct an instance from an existing instance.
*
diff --git a/models-interactions/model-impl/events/src/main/java/org/onap/policy/controlloop/util/Serialization.java b/models-interactions/model-impl/events/src/main/java/org/onap/policy/controlloop/util/Serialization.java
index 5f124131e..9b70ab86c 100644
--- a/models-interactions/model-impl/events/src/main/java/org/onap/policy/controlloop/util/Serialization.java
+++ b/models-interactions/model-impl/events/src/main/java/org/onap/policy/controlloop/util/Serialization.java
@@ -33,10 +33,13 @@ import java.lang.reflect.Type;
import java.time.Instant;
import java.time.ZonedDateTime;
import java.time.format.DateTimeFormatter;
+import lombok.AccessLevel;
+import lombok.NoArgsConstructor;
import org.onap.policy.common.gson.InstantAsMillisTypeAdapter;
import org.onap.policy.common.gson.ZonedDateTimeTypeAdapter;
import org.onap.policy.controlloop.ControlLoopNotificationType;
+@NoArgsConstructor(access = AccessLevel.PRIVATE)
public final class Serialization {
public static final DateTimeFormatter format = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss.SSSSSSxxx");
@@ -54,10 +57,6 @@ public final class Serialization {
.registerTypeAdapter(ZonedDateTime.class, new ZonedDateTimeTypeAdapter(format))
.registerTypeAdapter(Instant.class, new InstantAsMillisTypeAdapter()).create();
- private Serialization() {
- // Private constructor to prevent subclassing
- }
-
public static class NotificationTypeAdapter
implements JsonSerializer<ControlLoopNotificationType>, JsonDeserializer<ControlLoopNotificationType> {
@Override