From 837af610aa8511bf4900a670fc74050ad57e2368 Mon Sep 17 00:00:00 2001 From: Avgustin Marinov Date: Fri, 10 Jan 2025 11:57:41 +0200 Subject: [PATCH] Lombok Usage Improvements Signed-off-by: Avgustin Marinov --- .../hawkbit/ddi/json/model/DdiPolling.java | 3 +- .../remote/CancelTargetAssignmentEvent.java | 3 +- .../remote/DistributionSetDeletedEvent.java | 3 +- .../DistributionSetTagDeletedEvent.java | 3 +- .../DistributionSetTypeDeletedEvent.java | 3 +- .../event/remote/DownloadProgressEvent.java | 3 +- .../event/remote/MultiActionAssignEvent.java | 3 +- .../event/remote/MultiActionCancelEvent.java | 3 +- .../event/remote/RolloutDeletedEvent.java | 3 +- .../remote/RolloutGroupDeletedEvent.java | 3 +- .../event/remote/RolloutStoppedEvent.java | 3 +- .../remote/SoftwareModuleDeletedEvent.java | 3 +- .../SoftwareModuleTypeDeletedEvent.java | 3 +- .../TargetAttributesRequestedEvent.java | 3 +- .../event/remote/TargetDeletedEvent.java | 3 +- .../remote/TargetFilterQueryDeletedEvent.java | 3 +- .../event/remote/TargetPollEvent.java | 3 +- .../event/remote/TargetTagDeletedEvent.java | 3 +- .../event/remote/TargetTypeDeletedEvent.java | 3 +- .../remote/entity/ActionCreatedEvent.java | 3 +- .../remote/entity/ActionUpdatedEvent.java | 3 +- .../entity/DistributionSetCreatedEvent.java | 3 +- .../DistributionSetTagCreatedEvent.java | 3 +- .../DistributionSetTagUpdatedEvent.java | 3 +- .../DistributionSetTypeCreatedEvent.java | 3 +- .../DistributionSetTypeUpdatedEvent.java | 3 +- .../entity/DistributionSetUpdatedEvent.java | 3 +- .../remote/entity/RolloutCreatedEvent.java | 3 +- .../entity/RolloutGroupCreatedEvent.java | 3 +- .../entity/RolloutGroupUpdatedEvent.java | 3 +- .../remote/entity/RolloutUpdatedEvent.java | 3 +- .../entity/SoftwareModuleCreatedEvent.java | 3 +- .../SoftwareModuleTypeCreatedEvent.java | 3 +- .../SoftwareModuleTypeUpdatedEvent.java | 3 +- .../entity/SoftwareModuleUpdatedEvent.java | 3 +- .../remote/entity/TargetCreatedEvent.java | 3 +- .../entity/TargetFilterQueryCreatedEvent.java | 3 +- .../entity/TargetFilterQueryUpdatedEvent.java | 3 +- .../remote/entity/TargetTagCreatedEvent.java | 3 +- .../remote/entity/TargetTagUpdatedEvent.java | 3 +- .../remote/entity/TargetTypeCreatedEvent.java | 3 +- .../remote/entity/TargetTypeUpdatedEvent.java | 3 +- .../remote/entity/TargetUpdatedEvent.java | 3 +- .../TenantConfigurationCreatedEvent.java | 3 +- .../TenantConfigurationUpdatedEvent.java | 3 +- .../org/eclipse/hawkbit/event/EventType.java | 4 +- .../repository/TimestampCalculator.java | 1 - .../jpa/builder/JpaDistributionSetCreate.java | 21 ++++--- .../jpa/model/DistributionSetTypeElement.java | 61 ++++++------------- .../jpa/model/DsMetadataCompositeKey.java | 44 ++++--------- .../repository/jpa/model/JpaActionStatus.java | 3 +- .../repository/jpa/model/JpaArtifact.java | 3 +- .../jpa/model/JpaAutoConfirmationStatus.java | 2 +- .../jpa/model/JpaDistributionSetMetadata.java | 3 +- .../jpa/model/JpaDistributionSetTag.java | 3 +- .../jpa/model/JpaDistributionSetType.java | 49 ++++++++------- .../repository/jpa/model/JpaRollout.java | 3 +- .../repository/jpa/model/JpaRolloutGroup.java | 3 +- .../jpa/model/JpaSoftwareModule.java | 2 +- .../jpa/model/JpaSoftwareModuleMetadata.java | 3 +- .../jpa/model/JpaSoftwareModuleType.java | 6 +- .../hawkbit/repository/jpa/model/JpaTag.java | 3 +- .../repository/jpa/model/JpaTarget.java | 3 +- .../jpa/model/JpaTargetFilterQuery.java | 3 +- .../jpa/model/JpaTargetMetadata.java | 3 +- .../repository/jpa/model/JpaTargetTag.java | 3 +- .../repository/jpa/model/JpaTargetType.java | 3 +- .../jpa/model/JpaTenantConfiguration.java | 3 +- .../jpa/model/JpaTenantMetaData.java | 3 +- .../jpa/model/RolloutTargetGroup.java | 3 +- .../jpa/model/RolloutTargetGroupId.java | 3 +- .../jpa/model/SwMetadataCompositeKey.java | 3 +- 72 files changed, 137 insertions(+), 242 deletions(-) diff --git a/hawkbit-ddi/hawkbit-ddi-api/src/main/java/org/eclipse/hawkbit/ddi/json/model/DdiPolling.java b/hawkbit-ddi/hawkbit-ddi-api/src/main/java/org/eclipse/hawkbit/ddi/json/model/DdiPolling.java index ff5dec08cf..8f60197758 100644 --- a/hawkbit-ddi/hawkbit-ddi-api/src/main/java/org/eclipse/hawkbit/ddi/json/model/DdiPolling.java +++ b/hawkbit-ddi/hawkbit-ddi-api/src/main/java/org/eclipse/hawkbit/ddi/json/model/DdiPolling.java @@ -14,7 +14,6 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonProperty; import io.swagger.v3.oas.annotations.media.Schema; -import lombok.AccessLevel; import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.NoArgsConstructor; @@ -23,7 +22,7 @@ /** * Polling interval for the SP target. */ -@NoArgsConstructor(access = AccessLevel.PUBLIC)// needed for json create +@NoArgsConstructor // needed for json create @Getter @EqualsAndHashCode @ToString diff --git a/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/CancelTargetAssignmentEvent.java b/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/CancelTargetAssignmentEvent.java index f9ee58b775..d9adac29ae 100644 --- a/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/CancelTargetAssignmentEvent.java +++ b/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/CancelTargetAssignmentEvent.java @@ -12,14 +12,13 @@ import java.io.Serial; import java.util.List; -import lombok.AccessLevel; import lombok.NoArgsConstructor; import org.eclipse.hawkbit.repository.model.Action; /** * Event that gets sent when the assignment of a distribution set to a target gets canceled. */ -@NoArgsConstructor(access = AccessLevel.PUBLIC) // for serialization libs like jackson +@NoArgsConstructor // for serialization libs like jackson public class CancelTargetAssignmentEvent extends AbstractAssignmentEvent { @Serial diff --git a/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/DistributionSetDeletedEvent.java b/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/DistributionSetDeletedEvent.java index dd5758d5db..732490c728 100644 --- a/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/DistributionSetDeletedEvent.java +++ b/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/DistributionSetDeletedEvent.java @@ -11,7 +11,6 @@ import java.io.Serial; -import lombok.AccessLevel; import lombok.NoArgsConstructor; import org.eclipse.hawkbit.repository.event.entity.EntityDeletedEvent; import org.eclipse.hawkbit.repository.model.DistributionSet; @@ -20,7 +19,7 @@ /** * Defines the remote event for deletion of {@link DistributionSet}. */ -@NoArgsConstructor(access = AccessLevel.PUBLIC) // for serialization libs like jackson +@NoArgsConstructor // for serialization libs like jackson public class DistributionSetDeletedEvent extends RemoteIdEvent implements EntityDeletedEvent { @Serial diff --git a/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/DistributionSetTagDeletedEvent.java b/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/DistributionSetTagDeletedEvent.java index 75b9adefc8..d7d775938d 100644 --- a/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/DistributionSetTagDeletedEvent.java +++ b/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/DistributionSetTagDeletedEvent.java @@ -11,7 +11,6 @@ import java.io.Serial; -import lombok.AccessLevel; import lombok.NoArgsConstructor; import org.eclipse.hawkbit.repository.event.entity.EntityDeletedEvent; import org.eclipse.hawkbit.repository.model.DistributionSetTag; @@ -20,7 +19,7 @@ /** * Defines the the remote event of delete a {@link DistributionSetTag}. */ -@NoArgsConstructor(access = AccessLevel.PUBLIC) // for serialization libs like jackson +@NoArgsConstructor // for serialization libs like jackson public class DistributionSetTagDeletedEvent extends RemoteIdEvent implements EntityDeletedEvent { @Serial diff --git a/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/DistributionSetTypeDeletedEvent.java b/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/DistributionSetTypeDeletedEvent.java index acdd0dce88..11f06b681c 100644 --- a/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/DistributionSetTypeDeletedEvent.java +++ b/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/DistributionSetTypeDeletedEvent.java @@ -11,7 +11,6 @@ import java.io.Serial; -import lombok.AccessLevel; import lombok.NoArgsConstructor; import org.eclipse.hawkbit.repository.event.entity.EntityDeletedEvent; import org.eclipse.hawkbit.repository.model.DistributionSetType; @@ -20,7 +19,7 @@ /** * Defines the remote event of deleting a {@link DistributionSetType}. */ -@NoArgsConstructor(access = AccessLevel.PUBLIC) // for serialization libs like jackson +@NoArgsConstructor // for serialization libs like jackson public class DistributionSetTypeDeletedEvent extends RemoteIdEvent implements EntityDeletedEvent { @Serial diff --git a/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/DownloadProgressEvent.java b/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/DownloadProgressEvent.java index 01d7c0a12a..0a8f48603c 100644 --- a/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/DownloadProgressEvent.java +++ b/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/DownloadProgressEvent.java @@ -11,7 +11,6 @@ import java.io.Serial; -import lombok.AccessLevel; import lombok.NoArgsConstructor; import org.eclipse.hawkbit.repository.model.ActionStatus; @@ -19,7 +18,7 @@ * TenantAwareEvent that contains an updated download progress for a given * ActionStatus that was written for a download request. */ -@NoArgsConstructor(access = AccessLevel.PUBLIC) // for serialization libs like jackson +@NoArgsConstructor // for serialization libs like jackson public class DownloadProgressEvent extends RemoteTenantAwareEvent { @Serial diff --git a/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/MultiActionAssignEvent.java b/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/MultiActionAssignEvent.java index 2edf847d91..c0adf99050 100644 --- a/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/MultiActionAssignEvent.java +++ b/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/MultiActionAssignEvent.java @@ -12,7 +12,6 @@ import java.io.Serial; import java.util.List; -import lombok.AccessLevel; import lombok.NoArgsConstructor; import org.eclipse.hawkbit.repository.model.Action; @@ -23,7 +22,7 @@ * actionIds containing the identifiers of the affected actions * as payload. This event is only published in case of an assignment. */ -@NoArgsConstructor(access = AccessLevel.PUBLIC) +@NoArgsConstructor public class MultiActionAssignEvent extends MultiActionEvent { @Serial diff --git a/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/MultiActionCancelEvent.java b/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/MultiActionCancelEvent.java index 16c809cadb..740d05fa1c 100644 --- a/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/MultiActionCancelEvent.java +++ b/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/MultiActionCancelEvent.java @@ -12,7 +12,6 @@ import java.io.Serial; import java.util.List; -import lombok.AccessLevel; import lombok.NoArgsConstructor; import org.eclipse.hawkbit.repository.model.Action; @@ -23,7 +22,7 @@ * actionIds containing the identifiers of the affected actions * as payload. This event is only published in case of an cancellation. */ -@NoArgsConstructor(access = AccessLevel.PUBLIC) // for serialization libs like jackson +@NoArgsConstructor // for serialization libs like jackson public class MultiActionCancelEvent extends MultiActionEvent { @Serial diff --git a/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/RolloutDeletedEvent.java b/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/RolloutDeletedEvent.java index 7eec833ca1..d03f90d4a3 100644 --- a/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/RolloutDeletedEvent.java +++ b/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/RolloutDeletedEvent.java @@ -11,7 +11,6 @@ import java.io.Serial; -import lombok.AccessLevel; import lombok.NoArgsConstructor; import org.eclipse.hawkbit.repository.event.entity.EntityDeletedEvent; import org.eclipse.hawkbit.repository.model.Rollout; @@ -20,7 +19,7 @@ /** * Defines the remote event of deleting a {@link Rollout}. */ -@NoArgsConstructor(access = AccessLevel.PUBLIC) // for serialization libs like jackson +@NoArgsConstructor // for serialization libs like jackson public class RolloutDeletedEvent extends RemoteIdEvent implements EntityDeletedEvent { @Serial diff --git a/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/RolloutGroupDeletedEvent.java b/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/RolloutGroupDeletedEvent.java index e38ba75e95..b745ed5ca0 100644 --- a/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/RolloutGroupDeletedEvent.java +++ b/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/RolloutGroupDeletedEvent.java @@ -11,7 +11,6 @@ import java.io.Serial; -import lombok.AccessLevel; import lombok.NoArgsConstructor; import org.eclipse.hawkbit.repository.event.entity.EntityDeletedEvent; import org.eclipse.hawkbit.repository.model.RolloutGroup; @@ -20,7 +19,7 @@ /** * Defines the remote event of deleting a {@link RolloutGroup}. */ -@NoArgsConstructor(access = AccessLevel.PUBLIC) // for serialization libs like jackson +@NoArgsConstructor // for serialization libs like jackson public class RolloutGroupDeletedEvent extends RemoteIdEvent implements EntityDeletedEvent { @Serial diff --git a/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/RolloutStoppedEvent.java b/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/RolloutStoppedEvent.java index 4c87006832..845f444c8b 100644 --- a/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/RolloutStoppedEvent.java +++ b/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/RolloutStoppedEvent.java @@ -12,7 +12,6 @@ import java.io.Serial; import java.util.Collection; -import lombok.AccessLevel; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; @@ -23,7 +22,7 @@ * Event that is published when a rollout is stopped due to invalidation of a * {@link DistributionSet}. */ -@NoArgsConstructor(access = AccessLevel.PUBLIC) // for serialization libs like jackson +@NoArgsConstructor // for serialization libs like jackson @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) diff --git a/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/SoftwareModuleDeletedEvent.java b/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/SoftwareModuleDeletedEvent.java index 2ba05735f1..f977ec1b25 100644 --- a/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/SoftwareModuleDeletedEvent.java +++ b/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/SoftwareModuleDeletedEvent.java @@ -11,7 +11,6 @@ import java.io.Serial; -import lombok.AccessLevel; import lombok.NoArgsConstructor; import org.eclipse.hawkbit.repository.event.entity.EntityDeletedEvent; import org.eclipse.hawkbit.repository.model.SoftwareModule; @@ -20,7 +19,7 @@ /** * Defines the remote event of deleting a {@link SoftwareModule}. */ -@NoArgsConstructor(access = AccessLevel.PUBLIC) // for serialization libs like jackson +@NoArgsConstructor // for serialization libs like jackson public class SoftwareModuleDeletedEvent extends RemoteIdEvent implements EntityDeletedEvent { @Serial diff --git a/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/SoftwareModuleTypeDeletedEvent.java b/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/SoftwareModuleTypeDeletedEvent.java index 3c5eb367b2..ca07d13178 100644 --- a/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/SoftwareModuleTypeDeletedEvent.java +++ b/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/SoftwareModuleTypeDeletedEvent.java @@ -11,7 +11,6 @@ import java.io.Serial; -import lombok.AccessLevel; import lombok.NoArgsConstructor; import org.eclipse.hawkbit.repository.event.entity.EntityDeletedEvent; import org.eclipse.hawkbit.repository.model.SoftwareModuleType; @@ -20,7 +19,7 @@ /** * Defines the remote event of deleting a {@link SoftwareModuleType}. */ -@NoArgsConstructor(access = AccessLevel.PUBLIC) // for serialization libs like jackson +@NoArgsConstructor // for serialization libs like jackson public class SoftwareModuleTypeDeletedEvent extends RemoteIdEvent implements EntityDeletedEvent { @Serial diff --git a/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/TargetAttributesRequestedEvent.java b/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/TargetAttributesRequestedEvent.java index e37df27848..97cb3636c3 100644 --- a/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/TargetAttributesRequestedEvent.java +++ b/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/TargetAttributesRequestedEvent.java @@ -11,7 +11,6 @@ import java.io.Serial; -import lombok.AccessLevel; import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.NoArgsConstructor; @@ -22,7 +21,7 @@ /** * Defines the remote event of triggering attribute updates of a {@link Target}. */ -@NoArgsConstructor(access = AccessLevel.PUBLIC) // for serialization libs like jackson +@NoArgsConstructor // for serialization libs like jackson @Getter @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) diff --git a/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/TargetDeletedEvent.java b/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/TargetDeletedEvent.java index 5f0eb617b1..76c8c8035e 100644 --- a/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/TargetDeletedEvent.java +++ b/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/TargetDeletedEvent.java @@ -11,7 +11,6 @@ import java.io.Serial; -import lombok.AccessLevel; import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.NoArgsConstructor; @@ -23,7 +22,7 @@ /** * Defines the remote event of deleting a {@link Target}. */ -@NoArgsConstructor(access = AccessLevel.PUBLIC) // for serialization libs like jackson +@NoArgsConstructor // for serialization libs like jackson @Getter @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) diff --git a/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/TargetFilterQueryDeletedEvent.java b/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/TargetFilterQueryDeletedEvent.java index e39ded0e3b..90e8d25499 100644 --- a/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/TargetFilterQueryDeletedEvent.java +++ b/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/TargetFilterQueryDeletedEvent.java @@ -11,7 +11,6 @@ import java.io.Serial; -import lombok.AccessLevel; import lombok.NoArgsConstructor; import org.eclipse.hawkbit.repository.event.entity.EntityDeletedEvent; import org.eclipse.hawkbit.repository.model.TargetFilterQuery; @@ -20,7 +19,7 @@ /** * Defines the remote event of deleting a {@link TargetFilterQuery}. */ -@NoArgsConstructor(access = AccessLevel.PUBLIC) // for serialization libs like jackson +@NoArgsConstructor // for serialization libs like jackson public class TargetFilterQueryDeletedEvent extends RemoteIdEvent implements EntityDeletedEvent { @Serial diff --git a/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/TargetPollEvent.java b/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/TargetPollEvent.java index efaa3e9801..2f92efe1ce 100644 --- a/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/TargetPollEvent.java +++ b/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/TargetPollEvent.java @@ -11,7 +11,6 @@ import java.io.Serial; -import lombok.AccessLevel; import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.NoArgsConstructor; @@ -21,7 +20,7 @@ /** * Event is sent in case a target polls either through DDI or DMF. */ -@NoArgsConstructor(access = AccessLevel.PUBLIC) // for serialization libs like jackson +@NoArgsConstructor // for serialization libs like jackson @Getter @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) diff --git a/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/TargetTagDeletedEvent.java b/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/TargetTagDeletedEvent.java index bc360686bb..247bb36573 100644 --- a/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/TargetTagDeletedEvent.java +++ b/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/TargetTagDeletedEvent.java @@ -11,7 +11,6 @@ import java.io.Serial; -import lombok.AccessLevel; import lombok.NoArgsConstructor; import org.eclipse.hawkbit.repository.event.entity.EntityDeletedEvent; import org.eclipse.hawkbit.repository.model.TargetTag; @@ -20,7 +19,7 @@ /** * Defines the remote event of delete a {@link TargetTag}. */ -@NoArgsConstructor(access = AccessLevel.PUBLIC) // for serialization libs like jackson +@NoArgsConstructor // for serialization libs like jackson public class TargetTagDeletedEvent extends RemoteIdEvent implements EntityDeletedEvent { @Serial diff --git a/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/TargetTypeDeletedEvent.java b/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/TargetTypeDeletedEvent.java index b5796f2cb1..9dd526dc6c 100644 --- a/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/TargetTypeDeletedEvent.java +++ b/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/TargetTypeDeletedEvent.java @@ -11,7 +11,6 @@ import java.io.Serial; -import lombok.AccessLevel; import lombok.NoArgsConstructor; import org.eclipse.hawkbit.repository.event.entity.EntityDeletedEvent; import org.eclipse.hawkbit.repository.model.TargetType; @@ -20,7 +19,7 @@ /** * Defines the remote event of deleting a {@link TargetType}. */ -@NoArgsConstructor(access = AccessLevel.PUBLIC) // for serialization libs like jackson +@NoArgsConstructor // for serialization libs like jackson public class TargetTypeDeletedEvent extends RemoteIdEvent implements EntityDeletedEvent { @Serial diff --git a/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/ActionCreatedEvent.java b/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/ActionCreatedEvent.java index 4940091132..6a97126ec2 100644 --- a/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/ActionCreatedEvent.java +++ b/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/ActionCreatedEvent.java @@ -11,7 +11,6 @@ import java.io.Serial; -import lombok.AccessLevel; import lombok.NoArgsConstructor; import org.eclipse.hawkbit.repository.event.entity.EntityCreatedEvent; import org.eclipse.hawkbit.repository.model.Action; @@ -19,7 +18,7 @@ /** * Defines the remote event of creating a new {@link Action}. */ -@NoArgsConstructor(access = AccessLevel.PUBLIC) // for serialization libs like jackson +@NoArgsConstructor // for serialization libs like jackson public class ActionCreatedEvent extends AbstractActionEvent implements EntityCreatedEvent { @Serial diff --git a/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/ActionUpdatedEvent.java b/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/ActionUpdatedEvent.java index 2661b58051..1be9a7e35d 100644 --- a/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/ActionUpdatedEvent.java +++ b/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/ActionUpdatedEvent.java @@ -11,7 +11,6 @@ import java.io.Serial; -import lombok.AccessLevel; import lombok.NoArgsConstructor; import org.eclipse.hawkbit.repository.event.entity.EntityUpdatedEvent; import org.eclipse.hawkbit.repository.model.Action; @@ -19,7 +18,7 @@ /** * Defines the remote event of updated a {@link Action}. */ -@NoArgsConstructor(access = AccessLevel.PUBLIC) // for serialization libs like jackson +@NoArgsConstructor // for serialization libs like jackson public class ActionUpdatedEvent extends AbstractActionEvent implements EntityUpdatedEvent { @Serial diff --git a/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/DistributionSetCreatedEvent.java b/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/DistributionSetCreatedEvent.java index 353516ab28..1e7815f0b1 100644 --- a/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/DistributionSetCreatedEvent.java +++ b/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/DistributionSetCreatedEvent.java @@ -11,7 +11,6 @@ import java.io.Serial; -import lombok.AccessLevel; import lombok.NoArgsConstructor; import org.eclipse.hawkbit.repository.event.entity.EntityCreatedEvent; import org.eclipse.hawkbit.repository.model.DistributionSet; @@ -19,7 +18,7 @@ /** * Defines the remote of creating a new {@link DistributionSet}. */ -@NoArgsConstructor(access = AccessLevel.PUBLIC) // for serialization libs like jackson +@NoArgsConstructor // for serialization libs like jackson public class DistributionSetCreatedEvent extends RemoteEntityEvent implements EntityCreatedEvent { @Serial diff --git a/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/DistributionSetTagCreatedEvent.java b/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/DistributionSetTagCreatedEvent.java index 1a14b16ba3..daf1aee936 100644 --- a/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/DistributionSetTagCreatedEvent.java +++ b/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/DistributionSetTagCreatedEvent.java @@ -11,7 +11,6 @@ import java.io.Serial; -import lombok.AccessLevel; import lombok.NoArgsConstructor; import org.eclipse.hawkbit.repository.event.entity.EntityCreatedEvent; import org.eclipse.hawkbit.repository.model.DistributionSetTag; @@ -20,7 +19,7 @@ * Defines the {@link RemoteEntityEvent} for creation of a new * {@link DistributionSetTag}. */ -@NoArgsConstructor(access = AccessLevel.PUBLIC) // for serialization libs like jackson +@NoArgsConstructor // for serialization libs like jackson public class DistributionSetTagCreatedEvent extends RemoteEntityEvent implements EntityCreatedEvent { @Serial diff --git a/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/DistributionSetTagUpdatedEvent.java b/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/DistributionSetTagUpdatedEvent.java index 19e92cfca1..321ae6bea4 100644 --- a/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/DistributionSetTagUpdatedEvent.java +++ b/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/DistributionSetTagUpdatedEvent.java @@ -11,7 +11,6 @@ import java.io.Serial; -import lombok.AccessLevel; import lombok.NoArgsConstructor; import org.eclipse.hawkbit.repository.event.entity.EntityUpdatedEvent; import org.eclipse.hawkbit.repository.model.DistributionSetTag; @@ -19,7 +18,7 @@ /** * Defines the remote event for update a {@link DistributionSetTag}. */ -@NoArgsConstructor(access = AccessLevel.PUBLIC) // for serialization libs like jackson +@NoArgsConstructor // for serialization libs like jackson public class DistributionSetTagUpdatedEvent extends RemoteEntityEvent implements EntityUpdatedEvent { @Serial diff --git a/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/DistributionSetTypeCreatedEvent.java b/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/DistributionSetTypeCreatedEvent.java index 36436abe17..357f708a04 100644 --- a/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/DistributionSetTypeCreatedEvent.java +++ b/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/DistributionSetTypeCreatedEvent.java @@ -11,7 +11,6 @@ import java.io.Serial; -import lombok.AccessLevel; import lombok.NoArgsConstructor; import org.eclipse.hawkbit.repository.event.entity.EntityCreatedEvent; import org.eclipse.hawkbit.repository.model.DistributionSetType; @@ -19,7 +18,7 @@ /** * Defines the remote event of creating a new {@link DistributionSetType}. */ -@NoArgsConstructor(access = AccessLevel.PUBLIC) // for serialization libs like jackson +@NoArgsConstructor // for serialization libs like jackson public class DistributionSetTypeCreatedEvent extends RemoteEntityEvent implements EntityCreatedEvent { @Serial diff --git a/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/DistributionSetTypeUpdatedEvent.java b/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/DistributionSetTypeUpdatedEvent.java index 61a563ff45..cd64794412 100644 --- a/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/DistributionSetTypeUpdatedEvent.java +++ b/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/DistributionSetTypeUpdatedEvent.java @@ -11,7 +11,6 @@ import java.io.Serial; -import lombok.AccessLevel; import lombok.NoArgsConstructor; import org.eclipse.hawkbit.repository.event.entity.EntityUpdatedEvent; import org.eclipse.hawkbit.repository.model.DistributionSetType; @@ -20,7 +19,7 @@ /** * Defines the remote event for updating a {@link SoftwareModuleType}. */ -@NoArgsConstructor(access = AccessLevel.PUBLIC) // for serialization libs like jackson +@NoArgsConstructor // for serialization libs like jackson public class DistributionSetTypeUpdatedEvent extends RemoteEntityEvent implements EntityUpdatedEvent { @Serial diff --git a/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/DistributionSetUpdatedEvent.java b/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/DistributionSetUpdatedEvent.java index 4e5d48637d..42e87e061c 100644 --- a/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/DistributionSetUpdatedEvent.java +++ b/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/DistributionSetUpdatedEvent.java @@ -11,7 +11,6 @@ import java.io.Serial; -import lombok.AccessLevel; import lombok.NoArgsConstructor; import org.eclipse.hawkbit.repository.event.entity.EntityUpdatedEvent; import org.eclipse.hawkbit.repository.model.DistributionSet; @@ -19,7 +18,7 @@ /** * Defines the remote event for updating a {@link DistributionSet}. */ -@NoArgsConstructor(access = AccessLevel.PUBLIC) // for serialization libs like jackson +@NoArgsConstructor // for serialization libs like jackson public class DistributionSetUpdatedEvent extends RemoteEntityEvent implements EntityUpdatedEvent { @Serial diff --git a/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/RolloutCreatedEvent.java b/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/RolloutCreatedEvent.java index b790a3fccc..b5afbd27a6 100644 --- a/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/RolloutCreatedEvent.java +++ b/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/RolloutCreatedEvent.java @@ -11,7 +11,6 @@ import java.io.Serial; -import lombok.AccessLevel; import lombok.NoArgsConstructor; import org.eclipse.hawkbit.repository.event.entity.EntityCreatedEvent; import org.eclipse.hawkbit.repository.model.Rollout; @@ -19,7 +18,7 @@ /** * Defines the remote event of creating a new {@link Rollout}. */ -@NoArgsConstructor(access = AccessLevel.PUBLIC) // for serialization libs like jackson +@NoArgsConstructor // for serialization libs like jackson public class RolloutCreatedEvent extends RemoteEntityEvent implements EntityCreatedEvent { @Serial diff --git a/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/RolloutGroupCreatedEvent.java b/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/RolloutGroupCreatedEvent.java index 8a2d14b897..6076582bd4 100644 --- a/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/RolloutGroupCreatedEvent.java +++ b/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/RolloutGroupCreatedEvent.java @@ -11,7 +11,6 @@ import java.io.Serial; -import lombok.AccessLevel; import lombok.NoArgsConstructor; import org.eclipse.hawkbit.repository.event.entity.EntityCreatedEvent; import org.eclipse.hawkbit.repository.model.RolloutGroup; @@ -20,7 +19,7 @@ * TenantAwareEvent definition which is being published in case a rollout group * has been created for a specific rollout. */ -@NoArgsConstructor(access = AccessLevel.PUBLIC) // for serialization libs like jackson +@NoArgsConstructor // for serialization libs like jackson public class RolloutGroupCreatedEvent extends AbstractRolloutGroupEvent implements EntityCreatedEvent { @Serial diff --git a/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/RolloutGroupUpdatedEvent.java b/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/RolloutGroupUpdatedEvent.java index cf4c7c75d1..ba6b7fe54b 100644 --- a/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/RolloutGroupUpdatedEvent.java +++ b/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/RolloutGroupUpdatedEvent.java @@ -11,7 +11,6 @@ import java.io.Serial; -import lombok.AccessLevel; import lombok.NoArgsConstructor; import org.eclipse.hawkbit.repository.event.entity.EntityUpdatedEvent; import org.eclipse.hawkbit.repository.model.RolloutGroup; @@ -19,7 +18,7 @@ /** * Defines the remote event of updated a {@link RolloutGroup}. */ -@NoArgsConstructor(access = AccessLevel.PUBLIC) // for serialization libs like jackson +@NoArgsConstructor // for serialization libs like jackson public class RolloutGroupUpdatedEvent extends AbstractRolloutGroupEvent implements EntityUpdatedEvent { @Serial diff --git a/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/RolloutUpdatedEvent.java b/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/RolloutUpdatedEvent.java index 9b79762604..ea17678784 100644 --- a/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/RolloutUpdatedEvent.java +++ b/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/RolloutUpdatedEvent.java @@ -11,7 +11,6 @@ import java.io.Serial; -import lombok.AccessLevel; import lombok.NoArgsConstructor; import org.eclipse.hawkbit.repository.event.entity.EntityUpdatedEvent; import org.eclipse.hawkbit.repository.model.Rollout; @@ -19,7 +18,7 @@ /** * Defines the remote event of updated a {@link Rollout}. */ -@NoArgsConstructor(access = AccessLevel.PUBLIC) // for serialization libs like jackson +@NoArgsConstructor // for serialization libs like jackson public class RolloutUpdatedEvent extends RemoteEntityEvent implements EntityUpdatedEvent { @Serial diff --git a/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/SoftwareModuleCreatedEvent.java b/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/SoftwareModuleCreatedEvent.java index 65f79a6f17..9626c9e532 100644 --- a/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/SoftwareModuleCreatedEvent.java +++ b/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/SoftwareModuleCreatedEvent.java @@ -11,7 +11,6 @@ import java.io.Serial; -import lombok.AccessLevel; import lombok.NoArgsConstructor; import org.eclipse.hawkbit.repository.event.entity.EntityCreatedEvent; import org.eclipse.hawkbit.repository.model.SoftwareModule; @@ -19,7 +18,7 @@ /** * Defines the remote event of creating a new {@link SoftwareModule}. */ -@NoArgsConstructor(access = AccessLevel.PUBLIC) // for serialization libs like jackson +@NoArgsConstructor // for serialization libs like jackson public class SoftwareModuleCreatedEvent extends RemoteEntityEvent implements EntityCreatedEvent { @Serial diff --git a/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/SoftwareModuleTypeCreatedEvent.java b/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/SoftwareModuleTypeCreatedEvent.java index a30e2a3021..2458be460c 100644 --- a/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/SoftwareModuleTypeCreatedEvent.java +++ b/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/SoftwareModuleTypeCreatedEvent.java @@ -11,7 +11,6 @@ import java.io.Serial; -import lombok.AccessLevel; import lombok.NoArgsConstructor; import org.eclipse.hawkbit.repository.event.entity.EntityCreatedEvent; import org.eclipse.hawkbit.repository.model.SoftwareModuleType; @@ -19,7 +18,7 @@ /** * Defines the remote event of creating a new {@link SoftwareModuleType}. */ -@NoArgsConstructor(access = AccessLevel.PUBLIC) // for serialization libs like jackson +@NoArgsConstructor // for serialization libs like jackson public class SoftwareModuleTypeCreatedEvent extends RemoteEntityEvent implements EntityCreatedEvent { @Serial diff --git a/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/SoftwareModuleTypeUpdatedEvent.java b/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/SoftwareModuleTypeUpdatedEvent.java index 47181efcb6..a6d57f623c 100644 --- a/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/SoftwareModuleTypeUpdatedEvent.java +++ b/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/SoftwareModuleTypeUpdatedEvent.java @@ -11,7 +11,6 @@ import java.io.Serial; -import lombok.AccessLevel; import lombok.NoArgsConstructor; import org.eclipse.hawkbit.repository.event.entity.EntityUpdatedEvent; import org.eclipse.hawkbit.repository.model.SoftwareModuleType; @@ -19,7 +18,7 @@ /** * Defines the remote event for updating a {@link SoftwareModuleType}. */ -@NoArgsConstructor(access = AccessLevel.PUBLIC) // for serialization libs like jackson +@NoArgsConstructor // for serialization libs like jackson public class SoftwareModuleTypeUpdatedEvent extends RemoteEntityEvent implements EntityUpdatedEvent { @Serial diff --git a/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/SoftwareModuleUpdatedEvent.java b/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/SoftwareModuleUpdatedEvent.java index 8f6bd13b04..a21eb483cb 100644 --- a/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/SoftwareModuleUpdatedEvent.java +++ b/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/SoftwareModuleUpdatedEvent.java @@ -11,7 +11,6 @@ import java.io.Serial; -import lombok.AccessLevel; import lombok.NoArgsConstructor; import org.eclipse.hawkbit.repository.event.entity.EntityUpdatedEvent; import org.eclipse.hawkbit.repository.model.SoftwareModule; @@ -19,7 +18,7 @@ /** * Defines the remote event for updating a {@link SoftwareModule}. */ -@NoArgsConstructor(access = AccessLevel.PUBLIC) // for serialization libs like jackson +@NoArgsConstructor // for serialization libs like jackson public class SoftwareModuleUpdatedEvent extends RemoteEntityEvent implements EntityUpdatedEvent { @Serial diff --git a/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/TargetCreatedEvent.java b/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/TargetCreatedEvent.java index fdf1335e12..3713dca064 100644 --- a/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/TargetCreatedEvent.java +++ b/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/TargetCreatedEvent.java @@ -11,7 +11,6 @@ import java.io.Serial; -import lombok.AccessLevel; import lombok.NoArgsConstructor; import org.eclipse.hawkbit.repository.event.entity.EntityCreatedEvent; import org.eclipse.hawkbit.repository.model.Target; @@ -19,7 +18,7 @@ /** * Defines the remote event of creating a new {@link Target}. */ -@NoArgsConstructor(access = AccessLevel.PUBLIC) // for serialization libs like jackson +@NoArgsConstructor // for serialization libs like jackson public class TargetCreatedEvent extends RemoteEntityEvent implements EntityCreatedEvent { @Serial diff --git a/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/TargetFilterQueryCreatedEvent.java b/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/TargetFilterQueryCreatedEvent.java index af6dcb64d8..2679c07510 100644 --- a/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/TargetFilterQueryCreatedEvent.java +++ b/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/TargetFilterQueryCreatedEvent.java @@ -11,7 +11,6 @@ import java.io.Serial; -import lombok.AccessLevel; import lombok.NoArgsConstructor; import org.eclipse.hawkbit.repository.event.entity.EntityCreatedEvent; import org.eclipse.hawkbit.repository.model.TargetFilterQuery; @@ -19,7 +18,7 @@ /** * Defines the remote event of creating a new {@link TargetFilterQuery}. */ -@NoArgsConstructor(access = AccessLevel.PUBLIC) // for serialization libs like jackson +@NoArgsConstructor // for serialization libs like jackson public class TargetFilterQueryCreatedEvent extends RemoteEntityEvent implements EntityCreatedEvent { @Serial diff --git a/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/TargetFilterQueryUpdatedEvent.java b/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/TargetFilterQueryUpdatedEvent.java index e7b748d666..dc4c450a8a 100644 --- a/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/TargetFilterQueryUpdatedEvent.java +++ b/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/TargetFilterQueryUpdatedEvent.java @@ -11,7 +11,6 @@ import java.io.Serial; -import lombok.AccessLevel; import lombok.NoArgsConstructor; import org.eclipse.hawkbit.repository.event.entity.EntityUpdatedEvent; import org.eclipse.hawkbit.repository.model.TargetFilterQuery; @@ -19,7 +18,7 @@ /** * Defines the remote event for updating a {@link TargetFilterQuery}. */ -@NoArgsConstructor(access = AccessLevel.PUBLIC) // for serialization libs like jackson +@NoArgsConstructor // for serialization libs like jackson public class TargetFilterQueryUpdatedEvent extends RemoteEntityEvent implements EntityUpdatedEvent { @Serial diff --git a/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/TargetTagCreatedEvent.java b/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/TargetTagCreatedEvent.java index 36922ace31..239987cddb 100644 --- a/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/TargetTagCreatedEvent.java +++ b/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/TargetTagCreatedEvent.java @@ -11,7 +11,6 @@ import java.io.Serial; -import lombok.AccessLevel; import lombok.NoArgsConstructor; import org.eclipse.hawkbit.repository.event.entity.EntityCreatedEvent; import org.eclipse.hawkbit.repository.model.TargetTag; @@ -19,7 +18,7 @@ /** * Defines the remote event for the creation of a new {@link TargetTag}. */ -@NoArgsConstructor(access = AccessLevel.PUBLIC) // for serialization libs like jackson +@NoArgsConstructor // for serialization libs like jackson public class TargetTagCreatedEvent extends RemoteEntityEvent implements EntityCreatedEvent { @Serial diff --git a/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/TargetTagUpdatedEvent.java b/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/TargetTagUpdatedEvent.java index e58d016308..02b580a507 100644 --- a/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/TargetTagUpdatedEvent.java +++ b/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/TargetTagUpdatedEvent.java @@ -11,7 +11,6 @@ import java.io.Serial; -import lombok.AccessLevel; import lombok.NoArgsConstructor; import org.eclipse.hawkbit.repository.event.entity.EntityUpdatedEvent; import org.eclipse.hawkbit.repository.model.TargetTag; @@ -19,7 +18,7 @@ /** * Defines the remote event for updating a {@link TargetTag}. */ -@NoArgsConstructor(access = AccessLevel.PUBLIC) // for serialization libs like jackson +@NoArgsConstructor // for serialization libs like jackson public class TargetTagUpdatedEvent extends RemoteEntityEvent implements EntityUpdatedEvent { @Serial diff --git a/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/TargetTypeCreatedEvent.java b/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/TargetTypeCreatedEvent.java index d0a5a634d7..6be0250a21 100644 --- a/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/TargetTypeCreatedEvent.java +++ b/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/TargetTypeCreatedEvent.java @@ -11,7 +11,6 @@ import java.io.Serial; -import lombok.AccessLevel; import lombok.NoArgsConstructor; import org.eclipse.hawkbit.repository.event.entity.EntityCreatedEvent; import org.eclipse.hawkbit.repository.model.TargetType; @@ -19,7 +18,7 @@ /** * Defines the remote event of creating a new {@link TargetType}. */ -@NoArgsConstructor(access = AccessLevel.PUBLIC) // for serialization libs like jackson +@NoArgsConstructor // for serialization libs like jackson public class TargetTypeCreatedEvent extends RemoteEntityEvent implements EntityCreatedEvent { @Serial diff --git a/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/TargetTypeUpdatedEvent.java b/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/TargetTypeUpdatedEvent.java index 9c22ae8cb8..9fb69db4d2 100644 --- a/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/TargetTypeUpdatedEvent.java +++ b/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/TargetTypeUpdatedEvent.java @@ -11,7 +11,6 @@ import java.io.Serial; -import lombok.AccessLevel; import lombok.NoArgsConstructor; import org.eclipse.hawkbit.repository.event.entity.EntityUpdatedEvent; import org.eclipse.hawkbit.repository.model.TargetType; @@ -19,7 +18,7 @@ /** * Defines the remote event for updating a {@link TargetType}. */ -@NoArgsConstructor(access = AccessLevel.PUBLIC) // for serialization libs like jackson +@NoArgsConstructor // for serialization libs like jackson public class TargetTypeUpdatedEvent extends RemoteEntityEvent implements EntityUpdatedEvent { @Serial diff --git a/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/TargetUpdatedEvent.java b/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/TargetUpdatedEvent.java index 8e7cb90b28..9cf8720268 100644 --- a/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/TargetUpdatedEvent.java +++ b/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/TargetUpdatedEvent.java @@ -11,7 +11,6 @@ import java.io.Serial; -import lombok.AccessLevel; import lombok.NoArgsConstructor; import org.eclipse.hawkbit.repository.event.entity.EntityUpdatedEvent; import org.eclipse.hawkbit.repository.model.Target; @@ -19,7 +18,7 @@ /** * Defines the remote event for updating a {@link Target}. */ -@NoArgsConstructor(access = AccessLevel.PUBLIC) // for serialization libs like jackson +@NoArgsConstructor // for serialization libs like jackson public class TargetUpdatedEvent extends RemoteEntityEvent implements EntityUpdatedEvent { @Serial diff --git a/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/TenantConfigurationCreatedEvent.java b/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/TenantConfigurationCreatedEvent.java index 6db2f96e26..1f28b1c659 100644 --- a/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/TenantConfigurationCreatedEvent.java +++ b/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/TenantConfigurationCreatedEvent.java @@ -11,7 +11,6 @@ import java.io.Serial; -import lombok.AccessLevel; import lombok.NoArgsConstructor; import org.eclipse.hawkbit.repository.event.entity.EntityCreatedEvent; import org.eclipse.hawkbit.repository.model.TenantConfiguration; @@ -19,7 +18,7 @@ /** * Defines the remote event of creating a new {@link TenantConfiguration}. */ -@NoArgsConstructor(access = AccessLevel.PUBLIC) // for serialization libs like jackson +@NoArgsConstructor // for serialization libs like jackson public class TenantConfigurationCreatedEvent extends RemoteEntityEvent implements EntityCreatedEvent { @Serial diff --git a/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/TenantConfigurationUpdatedEvent.java b/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/TenantConfigurationUpdatedEvent.java index 6a7135bd76..e4c305174d 100644 --- a/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/TenantConfigurationUpdatedEvent.java +++ b/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/event/remote/entity/TenantConfigurationUpdatedEvent.java @@ -11,7 +11,6 @@ import java.io.Serial; -import lombok.AccessLevel; import lombok.NoArgsConstructor; import org.eclipse.hawkbit.repository.event.entity.EntityUpdatedEvent; import org.eclipse.hawkbit.repository.model.TenantConfiguration; @@ -19,7 +18,7 @@ /** * Defines the remote event of updating a {@link TenantConfiguration}. */ -@NoArgsConstructor(access = AccessLevel.PUBLIC) // for serialization libs like jackson +@NoArgsConstructor // for serialization libs like jackson public class TenantConfigurationUpdatedEvent extends RemoteEntityEvent implements EntityUpdatedEvent { @Serial diff --git a/hawkbit-repository/hawkbit-repository-core/src/main/java/org/eclipse/hawkbit/event/EventType.java b/hawkbit-repository/hawkbit-repository-core/src/main/java/org/eclipse/hawkbit/event/EventType.java index cb0b5a5c55..cbd8cdfd9f 100644 --- a/hawkbit-repository/hawkbit-repository-core/src/main/java/org/eclipse/hawkbit/event/EventType.java +++ b/hawkbit-repository/hawkbit-repository-core/src/main/java/org/eclipse/hawkbit/event/EventType.java @@ -12,9 +12,7 @@ import java.util.HashMap; import java.util.Map; import java.util.Map.Entry; -import java.util.Optional; -import lombok.AccessLevel; import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.NoArgsConstructor; @@ -76,7 +74,7 @@ * encoded value in the byte-payload. */ // for marshalling and unmarshalling. -@NoArgsConstructor(access = AccessLevel.PUBLIC) +@NoArgsConstructor @Getter @EqualsAndHashCode @ToString diff --git a/hawkbit-repository/hawkbit-repository-core/src/main/java/org/eclipse/hawkbit/repository/TimestampCalculator.java b/hawkbit-repository/hawkbit-repository-core/src/main/java/org/eclipse/hawkbit/repository/TimestampCalculator.java index be205439f0..d2be5af869 100644 --- a/hawkbit-repository/hawkbit-repository-core/src/main/java/org/eclipse/hawkbit/repository/TimestampCalculator.java +++ b/hawkbit-repository/hawkbit-repository-core/src/main/java/org/eclipse/hawkbit/repository/TimestampCalculator.java @@ -10,7 +10,6 @@ package org.eclipse.hawkbit.repository; import java.time.Duration; -import java.time.Instant; import lombok.AccessLevel; import lombok.NoArgsConstructor; diff --git a/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/builder/JpaDistributionSetCreate.java b/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/builder/JpaDistributionSetCreate.java index 9b1951717f..49277a6336 100644 --- a/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/builder/JpaDistributionSetCreate.java +++ b/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/builder/JpaDistributionSetCreate.java @@ -24,6 +24,7 @@ import org.eclipse.hawkbit.repository.model.DistributionSetType; import org.eclipse.hawkbit.repository.model.SoftwareModule; import org.springframework.util.CollectionUtils; +import org.springframework.util.ObjectUtils; import org.springframework.util.StringUtils; /** @@ -33,19 +34,20 @@ public class JpaDistributionSetCreate extends AbstractDistributionSetUpdateCreat private final DistributionSetTypeManagement distributionSetTypeManagement; private final SoftwareModuleManagement softwareModuleManagement; + @Getter @ValidString private String type; - JpaDistributionSetCreate(final DistributionSetTypeManagement distributionSetTypeManagement, - final SoftwareModuleManagement softwareManagement) { + JpaDistributionSetCreate( + final DistributionSetTypeManagement distributionSetTypeManagement, final SoftwareModuleManagement softwareManagement) { this.distributionSetTypeManagement = distributionSetTypeManagement; this.softwareModuleManagement = softwareManagement; } @Override public DistributionSetCreate type(final String type) { - this.type = StringUtils.trimWhitespace(type); + this.type = ObjectUtils.isEmpty(type) ? type : type.strip(); return this; } @@ -63,17 +65,16 @@ private DistributionSetType findDistributionSetTypeWithExceptionIfNotFound(final .orElseThrow(() -> new EntityNotFoundException(DistributionSetType.class, distributionSetTypekey)); } - private Collection findSoftwareModuleWithExceptionIfNotFound( - final Collection softwareModuleId) { - if (CollectionUtils.isEmpty(softwareModuleId)) { + private Collection findSoftwareModuleWithExceptionIfNotFound(final Collection softwareModuleIds) { + if (CollectionUtils.isEmpty(softwareModuleIds)) { return Collections.emptyList(); } - final Collection module = softwareModuleManagement.get(softwareModuleId); - if (module.size() < softwareModuleId.size()) { - throw new EntityNotFoundException(SoftwareModule.class, softwareModuleId); + final Collection modules = softwareModuleManagement.get(softwareModuleIds); + if (modules.size() < softwareModuleIds.size()) { + throw new EntityNotFoundException(SoftwareModule.class, softwareModuleIds); } - return module; + return modules; } } \ No newline at end of file diff --git a/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/DistributionSetTypeElement.java b/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/DistributionSetTypeElement.java index 6fd8bdb6a3..e2561462e3 100644 --- a/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/DistributionSetTypeElement.java +++ b/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/DistributionSetTypeElement.java @@ -23,6 +23,9 @@ import jakarta.persistence.MapsId; import jakarta.persistence.Table; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; import org.eclipse.hawkbit.repository.model.DistributionSet; import org.eclipse.hawkbit.repository.model.DistributionSetType; import org.eclipse.hawkbit.repository.model.SoftwareModuleType; @@ -31,6 +34,8 @@ * Relation element between a {@link DistributionSetType} and its * {@link SoftwareModuleType} elements. */ +@NoArgsConstructor // Default constructor for JPA +@Getter @Entity @Table(name = "sp_ds_type_element") public class DistributionSetTypeElement implements Serializable { @@ -41,9 +46,6 @@ public class DistributionSetTypeElement implements Serializable { @EmbeddedId private DistributionSetTypeElementCompositeKey key; - @Column(name = "mandatory") - private boolean mandatory; - @MapsId("dsType") @ManyToOne(optional = false, fetch = FetchType.LAZY) @JoinColumn(name = "distribution_set_type", nullable = false, updatable = false, foreignKey = @ForeignKey(value = ConstraintMode.CONSTRAINT, name = "fk_ds_type_element_element")) @@ -54,52 +56,34 @@ public class DistributionSetTypeElement implements Serializable { @JoinColumn(name = "software_module_type", nullable = false, updatable = false, foreignKey = @ForeignKey(value = ConstraintMode.CONSTRAINT, name = "fk_ds_type_element_smtype")) private JpaSoftwareModuleType smType; - public DistributionSetTypeElement() { - // Default constructor for JPA - } + @Setter + @Column(name = "mandatory") + private boolean mandatory; /** * Standard constructor. * * @param dsType of the element * @param smType of the element - * @param mandatory to true if the {@link SoftwareModuleType} if - * mandatory element in the {@link DistributionSet}. + * @param mandatory to true if the {@link SoftwareModuleType} if mandatory element in the {@link DistributionSet}. */ - DistributionSetTypeElement(final JpaDistributionSetType dsType, final JpaSoftwareModuleType smType, - final boolean mandatory) { + DistributionSetTypeElement(final JpaDistributionSetType dsType, final JpaSoftwareModuleType smType, final boolean mandatory) { key = new DistributionSetTypeElementCompositeKey(dsType, smType); this.dsType = dsType; this.smType = smType; this.mandatory = mandatory; } - public boolean isMandatory() { - return mandatory; - } - - DistributionSetTypeElement setMandatory(final boolean mandatory) { - this.mandatory = mandatory; - return this; - } - - public DistributionSetType getDsType() { - return dsType; - } - - public SoftwareModuleType getSmType() { - return smType; - } - - public DistributionSetTypeElementCompositeKey getKey() { - return key; + @Override + public String toString() { + return "DistributionSetTypeElement [mandatory=" + mandatory + ", dsType=" + dsType + ", smType=" + smType + "]"; } @Override public int hashCode() { final int prime = 31; int result = 1; - result = prime * result + ((key == null) ? 0 : key.hashCode()); + result = prime * result + (key == null ? 0 : key.hashCode()); return result; } @@ -116,18 +100,9 @@ public boolean equals(final Object obj) { } final DistributionSetTypeElement other = (DistributionSetTypeElement) obj; if (key == null) { - if (other.key != null) { - return false; - } - } else if (!key.equals(other.key)) { - return false; + return other.key == null; + } else { + return key.equals(other.key); } - return true; } - - @Override - public String toString() { - return "DistributionSetTypeElement [mandatory=" + mandatory + ", dsType=" + dsType + ", smType=" + smType + "]"; - } - -} +} \ No newline at end of file diff --git a/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/DsMetadataCompositeKey.java b/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/DsMetadataCompositeKey.java index 42654e3215..12d835d3fe 100644 --- a/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/DsMetadataCompositeKey.java +++ b/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/DsMetadataCompositeKey.java @@ -12,23 +12,24 @@ import java.io.Serial; import java.io.Serializable; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + /** - * The DistributionSet Metadata composite key which contains the meta data key - * and the ID of the DistributionSet itself. + * The DistributionSet Metadata composite key which contains the meta-data key and the ID of the DistributionSet itself. */ +@NoArgsConstructor // Default constructor for JPA +@Setter +@Getter public final class DsMetadataCompositeKey implements Serializable { @Serial private static final long serialVersionUID = 1L; private String key; - private Long distributionSet; - public DsMetadataCompositeKey() { - // Default constructor for JPA. - } - /** * @param distributionSet the distribution set for this meta data * @param key the key of the meta data @@ -38,22 +39,6 @@ public DsMetadataCompositeKey(final Long distributionSet, final String key) { this.key = key; } - public String getKey() { - return key; - } - - public void setKey(final String key) { - this.key = key; - } - - public Long getDistributionSet() { - return distributionSet; - } - - public void setDistributionSet(final Long distributionSet) { - this.distributionSet = distributionSet; - } - @Override public int hashCode() { final int prime = 31; @@ -65,7 +50,6 @@ public int hashCode() { @Override public boolean equals(final Object obj) { - if (this == obj) { return true; } @@ -84,13 +68,9 @@ public boolean equals(final Object obj) { return false; } if (key == null) { - if (other.key != null) { - return false; - } - } else if (!key.equals(other.key)) { - return false; + return other.key == null; + } else { + return key.equals(other.key); } - return true; } - -} +} \ No newline at end of file diff --git a/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/JpaActionStatus.java b/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/JpaActionStatus.java index 532212f945..d52d8177c7 100644 --- a/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/JpaActionStatus.java +++ b/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/JpaActionStatus.java @@ -31,7 +31,6 @@ import jakarta.persistence.Table; import jakarta.validation.constraints.NotNull; -import lombok.AccessLevel; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; @@ -42,7 +41,7 @@ /** * Entity to store the status for a specific action. */ -@NoArgsConstructor(access = AccessLevel.PUBLIC) // JPA default constructor +@NoArgsConstructor // JPA default constructor @Table(name = "sp_action_status", indexes = { @Index(name = "sp_idx_action_status_02", columnList = "tenant,action,status"), @Index(name = "sp_idx_action_status_prim", columnList = "tenant,id") diff --git a/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/JpaArtifact.java b/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/JpaArtifact.java index 2854560c97..7c657d927b 100644 --- a/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/JpaArtifact.java +++ b/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/JpaArtifact.java @@ -25,7 +25,6 @@ import jakarta.validation.constraints.NotNull; import jakarta.validation.constraints.Size; -import lombok.AccessLevel; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; @@ -36,7 +35,7 @@ /** * JPA implementation of {@link Artifact}. */ -@NoArgsConstructor(access = AccessLevel.PUBLIC) // Default constructor needed for JPA entities. +@NoArgsConstructor // Default constructor needed for JPA entities. @Setter @Getter @Table(name = "sp_artifact", diff --git a/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/JpaAutoConfirmationStatus.java b/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/JpaAutoConfirmationStatus.java index 41fd1a051a..d44142e240 100644 --- a/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/JpaAutoConfirmationStatus.java +++ b/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/JpaAutoConfirmationStatus.java @@ -27,7 +27,7 @@ import org.eclipse.hawkbit.repository.model.Target; import org.springframework.util.StringUtils; -@NoArgsConstructor(access = AccessLevel.PUBLIC) // Default constructor needed for JPA entities. +@NoArgsConstructor // Default constructor needed for JPA entities. @Getter @Entity @Table(name = "sp_target_conf_status") diff --git a/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/JpaDistributionSetMetadata.java b/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/JpaDistributionSetMetadata.java index 77a9bf2e7e..74a071e7c5 100644 --- a/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/JpaDistributionSetMetadata.java +++ b/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/JpaDistributionSetMetadata.java @@ -21,7 +21,6 @@ import jakarta.persistence.ManyToOne; import jakarta.persistence.Table; -import lombok.AccessLevel; import lombok.Getter; import lombok.NoArgsConstructor; import org.eclipse.hawkbit.repository.model.DistributionSet; @@ -30,7 +29,7 @@ /** * Meta data for {@link DistributionSet}. */ -@NoArgsConstructor(access = AccessLevel.PUBLIC) // Default constructor needed for JPA entities. +@NoArgsConstructor // Default constructor needed for JPA entities. @Getter @IdClass(DsMetadataCompositeKey.class) @Entity diff --git a/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/JpaDistributionSetTag.java b/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/JpaDistributionSetTag.java index 55e95562e5..4852589fac 100644 --- a/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/JpaDistributionSetTag.java +++ b/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/JpaDistributionSetTag.java @@ -19,7 +19,6 @@ import jakarta.persistence.Table; import jakarta.persistence.UniqueConstraint; -import lombok.AccessLevel; import lombok.NoArgsConstructor; import org.eclipse.hawkbit.repository.event.remote.DistributionSetTagDeletedEvent; import org.eclipse.hawkbit.repository.event.remote.entity.DistributionSetTagCreatedEvent; @@ -31,7 +30,7 @@ /** * A {@link DistributionSetTag} is used to describe DistributionSet attributes and use them also for filtering the DistributionSet list. */ -@NoArgsConstructor(access = AccessLevel.PUBLIC) // Default constructor needed for JPA entities. +@NoArgsConstructor // Default constructor needed for JPA entities. @Entity @Table(name = "sp_distributionset_tag", indexes = { diff --git a/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/JpaDistributionSetType.java b/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/JpaDistributionSetType.java index 79514a1926..9a885b127f 100644 --- a/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/JpaDistributionSetType.java +++ b/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/JpaDistributionSetType.java @@ -27,7 +27,6 @@ import jakarta.persistence.Table; import jakarta.persistence.UniqueConstraint; -import lombok.AccessLevel; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; @@ -45,7 +44,7 @@ /** * A distribution set type defines which software module types can or have to be {@link DistributionSet}. */ -@NoArgsConstructor(access = AccessLevel.PUBLIC) // Default constructor needed for JPA entities. +@NoArgsConstructor // Default constructor needed for JPA entities. @Entity @Table(name = "sp_distribution_set_type", indexes = { @Index(name = "sp_idx_distribution_set_type_01", columnList = "tenant,deleted"), @@ -59,10 +58,9 @@ public class JpaDistributionSetType extends AbstractJpaTypeEntity implements Dis @Serial private static final long serialVersionUID = 1L; - @OneToMany(mappedBy = "dsType", - targetEntity = DistributionSetTypeElement.class, - fetch = FetchType.EAGER, cascade = { CascadeType.PERSIST, CascadeType.MERGE, CascadeType.REMOVE }, - orphanRemoval = true) + @OneToMany( + mappedBy = "dsType", targetEntity = DistributionSetTypeElement.class, + fetch = FetchType.EAGER, cascade = { CascadeType.PERSIST, CascadeType.MERGE, CascadeType.REMOVE }, orphanRemoval = true) private Set elements = new HashSet<>(); @Setter @@ -83,25 +81,33 @@ public JpaDistributionSetType(final String key, final String name, final String @Override public Set getMandatoryModuleTypes() { - return elements.stream().filter(DistributionSetTypeElement::isMandatory) - .map(DistributionSetTypeElement::getSmType).collect(Collectors.toSet()); + return elements.stream() + .filter(DistributionSetTypeElement::isMandatory) + .map(DistributionSetTypeElement::getSmType) + .collect(Collectors.toSet()); } @Override public Set getOptionalModuleTypes() { - return elements.stream().filter(element -> !element.isMandatory()) - .map(DistributionSetTypeElement::getSmType).collect(Collectors.toSet()); + return elements.stream() + .filter(element -> !element.isMandatory()) + .map(DistributionSetTypeElement::getSmType) + .collect(Collectors.toSet()); } @Override public boolean areModuleEntriesIdentical(final DistributionSetType dsType) { - if (!(dsType instanceof JpaDistributionSetType) || isOneModuleListEmpty(dsType)) { + if (dsType instanceof JpaDistributionSetType jpaDsType) { + if (isOneModuleListEmpty(jpaDsType)) { + return false; + } else if (areBothModuleListsEmpty(jpaDsType)) { + return true; + } else { + return new HashSet<>(jpaDsType.elements).equals(elements); + } + } else { return false; - } else if (areBothModuleListsEmpty(dsType)) { - return true; } - - return new HashSet<>(((JpaDistributionSetType) dsType).elements).equals(elements); } @Override @@ -123,7 +129,8 @@ public JpaDistributionSetType addMandatoryModuleType(final SoftwareModuleType sm public JpaDistributionSetType removeModuleType(final Long smTypeId) { // we search by id (standard equals compares also revision) - elements.stream().filter(element -> element.getSmType().getId().equals(smTypeId)) + elements.stream() + .filter(element -> element.getSmType().getId().equals(smTypeId)) .findAny() .ifPresent(elements::remove); return this; @@ -156,13 +163,13 @@ public void fireDeleteEvent() { getTenant(), getId(), getClass(), EventPublisherHolder.getInstance().getApplicationId())); } - private boolean isOneModuleListEmpty(final DistributionSetType dsType) { - return (!CollectionUtils.isEmpty(((JpaDistributionSetType) dsType).elements) && CollectionUtils.isEmpty(elements)) || - (CollectionUtils.isEmpty(((JpaDistributionSetType) dsType).elements) && !CollectionUtils.isEmpty(elements)); + private boolean isOneModuleListEmpty(final JpaDistributionSetType dsType) { + return (!CollectionUtils.isEmpty(dsType.elements) && CollectionUtils.isEmpty(elements)) || + (CollectionUtils.isEmpty(dsType.elements) && !CollectionUtils.isEmpty(elements)); } - private boolean areBothModuleListsEmpty(final DistributionSetType dsType) { - return CollectionUtils.isEmpty(((JpaDistributionSetType) dsType).elements) && CollectionUtils.isEmpty(elements); + private boolean areBothModuleListsEmpty(final JpaDistributionSetType dsType) { + return CollectionUtils.isEmpty(dsType.elements) && CollectionUtils.isEmpty(elements); } private JpaDistributionSetType setModuleType(final SoftwareModuleType smType, final boolean mandatory) { diff --git a/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/JpaRollout.java b/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/JpaRollout.java index 4f61247c77..b0bbe657da 100644 --- a/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/JpaRollout.java +++ b/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/JpaRollout.java @@ -38,7 +38,6 @@ import jakarta.validation.constraints.NotNull; import jakarta.validation.constraints.Size; -import lombok.AccessLevel; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; @@ -58,7 +57,7 @@ /** * JPA implementation of a {@link Rollout}. */ -@NoArgsConstructor(access = AccessLevel.PUBLIC) // Default constructor needed for JPA entities. +@NoArgsConstructor // Default constructor needed for JPA entities. @Entity @Table(name = "sp_rollout", uniqueConstraints = @UniqueConstraint(columnNames = { "name", "tenant" }, name = "uk_rollout")) @NamedEntityGraphs({ @NamedEntityGraph(name = "Rollout.ds", attributeNodes = { @NamedAttributeNode("distributionSet") }) }) diff --git a/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/JpaRolloutGroup.java b/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/JpaRolloutGroup.java index 3146a4cbba..c69c992783 100644 --- a/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/JpaRolloutGroup.java +++ b/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/JpaRolloutGroup.java @@ -30,7 +30,6 @@ import jakarta.validation.constraints.NotNull; import jakarta.validation.constraints.Size; -import lombok.AccessLevel; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; @@ -45,7 +44,7 @@ /** * JPA entity definition of persisting a group of an rollout. */ -@NoArgsConstructor(access = AccessLevel.PUBLIC) // Default constructor needed for JPA entities. +@NoArgsConstructor // Default constructor needed for JPA entities. @Entity @Table(name = "sp_rolloutgroup", uniqueConstraints = @UniqueConstraint(columnNames = { "name", "rollout", "tenant" }, name = "uk_rolloutgroup")) // exception squid:S2160 - BaseEntity equals/hashcode is handling correctly for sub entities diff --git a/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/JpaSoftwareModule.java b/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/JpaSoftwareModule.java index 7c45119d6f..e2e5a47c53 100644 --- a/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/JpaSoftwareModule.java +++ b/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/JpaSoftwareModule.java @@ -50,7 +50,7 @@ /** * Base Software Module that is supported by OS level provisioning mechanism on the edge controller, e.g. OS, JVM, AgentHub. */ -@NoArgsConstructor(access = AccessLevel.PUBLIC) // Default constructor for JPA +@NoArgsConstructor // Default constructor for JPA @Setter @Getter @ToString(callSuper = true) diff --git a/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/JpaSoftwareModuleMetadata.java b/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/JpaSoftwareModuleMetadata.java index 2a5c355dd7..0d181bb314 100644 --- a/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/JpaSoftwareModuleMetadata.java +++ b/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/JpaSoftwareModuleMetadata.java @@ -22,7 +22,6 @@ import jakarta.persistence.ManyToOne; import jakarta.persistence.Table; -import lombok.AccessLevel; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; @@ -33,7 +32,7 @@ /** * Metadata for {@link SoftwareModule}. */ -@NoArgsConstructor(access = AccessLevel.PUBLIC) // Default constructor for JPA +@NoArgsConstructor // Default constructor for JPA @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) diff --git a/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/JpaSoftwareModuleType.java b/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/JpaSoftwareModuleType.java index 36a0c1acaf..5b17c92588 100644 --- a/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/JpaSoftwareModuleType.java +++ b/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/JpaSoftwareModuleType.java @@ -18,7 +18,6 @@ import jakarta.persistence.UniqueConstraint; import jakarta.validation.constraints.Min; -import lombok.AccessLevel; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; @@ -31,7 +30,8 @@ /** * Type of software modules. */ -@NoArgsConstructor(access = AccessLevel.PUBLIC) // Default constructor for JPA +@NoArgsConstructor // Default constructor for JPA +@Getter @Entity @Table(name = "sp_software_module_type", indexes = { @Index(name = "sp_idx_software_module_type_01", columnList = "tenant,deleted"), @@ -45,13 +45,11 @@ public class JpaSoftwareModuleType extends AbstractJpaTypeEntity implements Soft @Serial private static final long serialVersionUID = 1L; - @Getter @Column(name = "max_ds_assignments", nullable = false) @Min(1) private int maxAssignments; @Setter - @Getter @Column(name = "deleted") private boolean deleted; diff --git a/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/JpaTag.java b/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/JpaTag.java index ff68b180b3..193b614a2c 100644 --- a/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/JpaTag.java +++ b/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/JpaTag.java @@ -15,7 +15,6 @@ import jakarta.persistence.MappedSuperclass; import jakarta.validation.constraints.Size; -import lombok.AccessLevel; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; @@ -24,7 +23,7 @@ /** * A Tag can be used as describing and organizational meta information for any kind of entity. */ -@NoArgsConstructor(access = AccessLevel.PUBLIC) // Default constructor for JPA +@NoArgsConstructor // Default constructor for JPA @Setter @Getter @MappedSuperclass diff --git a/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/JpaTarget.java b/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/JpaTarget.java index 80a6facad7..e0e35c07c1 100644 --- a/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/JpaTarget.java +++ b/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/JpaTarget.java @@ -42,7 +42,6 @@ import jakarta.validation.constraints.Pattern; import jakarta.validation.constraints.Size; -import lombok.AccessLevel; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; @@ -69,7 +68,7 @@ /** * JPA implementation of {@link Target}. */ -@NoArgsConstructor(access = AccessLevel.PUBLIC) // Default constructor for JPA +@NoArgsConstructor // Default constructor for JPA @Entity @Table(name = "sp_target", indexes = { diff --git a/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/JpaTargetFilterQuery.java b/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/JpaTargetFilterQuery.java index 0d24d8bbf1..38bbde0a36 100644 --- a/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/JpaTargetFilterQuery.java +++ b/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/JpaTargetFilterQuery.java @@ -25,7 +25,6 @@ import jakarta.validation.constraints.NotEmpty; import jakarta.validation.constraints.Size; -import lombok.AccessLevel; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; @@ -41,7 +40,7 @@ /** * Stored target filter. */ -@NoArgsConstructor(access = AccessLevel.PUBLIC) // Default constructor for JPA +@NoArgsConstructor // Default constructor for JPA @Setter @Getter @Entity diff --git a/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/JpaTargetMetadata.java b/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/JpaTargetMetadata.java index 76db022b08..83cfc34632 100644 --- a/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/JpaTargetMetadata.java +++ b/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/JpaTargetMetadata.java @@ -21,7 +21,6 @@ import jakarta.persistence.ManyToOne; import jakarta.persistence.Table; -import lombok.AccessLevel; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; @@ -31,7 +30,7 @@ /** * Meta data for {@link Target}. */ -@NoArgsConstructor(access = AccessLevel.PUBLIC) // Default constructor for JPA +@NoArgsConstructor // Default constructor for JPA @Setter @Getter @IdClass(TargetMetadataCompositeKey.class) diff --git a/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/JpaTargetTag.java b/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/JpaTargetTag.java index 4ad7d0e8ea..f871edeb01 100644 --- a/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/JpaTargetTag.java +++ b/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/JpaTargetTag.java @@ -16,7 +16,6 @@ import jakarta.persistence.Table; import jakarta.persistence.UniqueConstraint; -import lombok.AccessLevel; import lombok.NoArgsConstructor; import lombok.ToString; import org.eclipse.hawkbit.repository.event.remote.TargetTagDeletedEvent; @@ -28,7 +27,7 @@ /** * A {@link TargetTag} is used to describe Target attributes and use them also for filtering the target list. */ -@NoArgsConstructor(access = AccessLevel.PUBLIC) // Default constructor for JPA +@NoArgsConstructor // Default constructor for JPA @ToString(callSuper = true) @Entity @Table(name = "sp_target_tag", indexes = { @Index(name = "sp_idx_target_tag_prim", columnList = "tenant,id"), diff --git a/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/JpaTargetType.java b/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/JpaTargetType.java index e98b2040c3..bfea5c59a2 100644 --- a/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/JpaTargetType.java +++ b/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/JpaTargetType.java @@ -24,7 +24,6 @@ import jakarta.persistence.Table; import jakarta.persistence.UniqueConstraint; -import lombok.AccessLevel; import lombok.NoArgsConstructor; import lombok.ToString; import org.eclipse.hawkbit.repository.event.remote.TargetTypeDeletedEvent; @@ -38,7 +37,7 @@ /** * A target type defines which distribution set types can or have to be {@link Target}. */ -@NoArgsConstructor(access = AccessLevel.PUBLIC) // Default constructor for JPA +@NoArgsConstructor // Default constructor for JPA @ToString(callSuper = true) @Entity @Table(name = "sp_target_type", indexes = { diff --git a/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/JpaTenantConfiguration.java b/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/JpaTenantConfiguration.java index 716efee497..3bb014ce80 100644 --- a/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/JpaTenantConfiguration.java +++ b/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/JpaTenantConfiguration.java @@ -19,7 +19,6 @@ import jakarta.validation.constraints.NotNull; import jakarta.validation.constraints.Size; -import lombok.AccessLevel; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; @@ -32,7 +31,7 @@ /** * A JPA entity which stores the tenant specific configuration. */ -@NoArgsConstructor(access = AccessLevel.PUBLIC) // Default constructor for JPA +@NoArgsConstructor // Default constructor for JPA @Setter @Getter @Entity diff --git a/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/JpaTenantMetaData.java b/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/JpaTenantMetaData.java index 10e27b6225..3a5dafa16c 100644 --- a/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/JpaTenantMetaData.java +++ b/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/JpaTenantMetaData.java @@ -25,7 +25,6 @@ import jakarta.validation.constraints.NotNull; import jakarta.validation.constraints.Size; -import lombok.AccessLevel; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; @@ -40,7 +39,7 @@ * * Entities owned by the tenant are based on {@link TenantAwareBaseEntity}. */ -@NoArgsConstructor(access = AccessLevel.PUBLIC) // Default constructor for JPA +@NoArgsConstructor // Default constructor for JPA @Setter @Getter @Table(name = "sp_tenant", indexes = { diff --git a/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/RolloutTargetGroup.java b/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/RolloutTargetGroup.java index ac5c0a496e..6772d226a9 100644 --- a/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/RolloutTargetGroup.java +++ b/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/RolloutTargetGroup.java @@ -26,7 +26,6 @@ import jakarta.persistence.OneToMany; import jakarta.persistence.Table; -import lombok.AccessLevel; import lombok.NoArgsConstructor; import org.eclipse.hawkbit.repository.model.RolloutGroup; import org.eclipse.hawkbit.repository.model.Target; @@ -34,7 +33,7 @@ /** * Entity with JPA annotation to store the information which {@link Target} is in a specific {@link RolloutGroup}. */ -@NoArgsConstructor(access = AccessLevel.PUBLIC) // Default constructor for JPA +@NoArgsConstructor // Default constructor for JPA @IdClass(RolloutTargetGroupId.class) @Entity @Table(name = "sp_rollouttargetgroup") diff --git a/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/RolloutTargetGroupId.java b/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/RolloutTargetGroupId.java index 10cc053e6c..dc78d8ecd7 100644 --- a/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/RolloutTargetGroupId.java +++ b/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/RolloutTargetGroupId.java @@ -12,7 +12,6 @@ import java.io.Serial; import java.io.Serializable; -import lombok.AccessLevel; import lombok.Getter; import lombok.NoArgsConstructor; import org.eclipse.hawkbit.repository.model.RolloutGroup; @@ -21,7 +20,7 @@ /** * Combined unique key of the table {@link RolloutTargetGroup}. */ -@NoArgsConstructor(access = AccessLevel.PUBLIC) // Default constructor for JPA +@NoArgsConstructor // Default constructor for JPA @Getter public class RolloutTargetGroupId implements Serializable { diff --git a/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/SwMetadataCompositeKey.java b/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/SwMetadataCompositeKey.java index 3c2fedf3b3..46df6fd262 100644 --- a/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/SwMetadataCompositeKey.java +++ b/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/SwMetadataCompositeKey.java @@ -12,14 +12,13 @@ import java.io.Serial; import java.io.Serializable; -import lombok.AccessLevel; import lombok.Data; import lombok.NoArgsConstructor; /** * The Software Module meta-data composite key which contains the meta-data key and the ID of the software module itself. */ -@NoArgsConstructor(access = AccessLevel.PUBLIC) // Default constructor for JPA +@NoArgsConstructor // Default constructor for JPA @Data public final class SwMetadataCompositeKey implements Serializable {