Fix lombok issues (#2079)

Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
This commit is contained in:
Avgustin Marinov
2024-11-18 15:46:56 +02:00
committed by GitHub
parent 00fe507226
commit 7ac0a13054
6 changed files with 33 additions and 17 deletions

View File

@@ -11,7 +11,9 @@ package org.eclipse.hawkbit.repository;
import java.io.Serial; import java.io.Serial;
import lombok.Data; import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.ToString;
import org.springframework.data.domain.PageRequest; import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Sort; import org.springframework.data.domain.Sort;
@@ -22,7 +24,9 @@ import org.springframework.data.domain.Sort;
* the REST-API is working with {@code offset} and {@code limit} parameter we * the REST-API is working with {@code offset} and {@code limit} parameter we
* need an offset based page request. * need an offset based page request.
*/ */
@Data @Getter
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public final class OffsetBasedPageRequest extends PageRequest { public final class OffsetBasedPageRequest extends PageRequest {
@Serial @Serial

View File

@@ -12,14 +12,17 @@ package org.eclipse.hawkbit.repository.model;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;
import lombok.Data; import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.ToString;
/** /**
* A bean which holds a complex result of an service operation to combine the * A bean which holds a complex result of a service operation to combine the information of an assignment and how much of the assignment
* information of an assignment and how much of the assignment has been done and * has been done and how much of the assignments had already been existed.
* how much of the assignments had already been existed.
*/ */
@Data @Getter
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class DistributionSetAssignmentResult extends AbstractAssignmentResult<Action> { public class DistributionSetAssignmentResult extends AbstractAssignmentResult<Action> {
private final DistributionSet distributionSet; private final DistributionSet distributionSet;
@@ -28,7 +31,7 @@ public class DistributionSetAssignmentResult extends AbstractAssignmentResult<Ac
* Constructor. * Constructor.
* *
* @param distributionSet that has been assigned * @param distributionSet that has been assigned
* @param alreadyAssigned the the count of already assigned targets * @param alreadyAssigned the count of already assigned targets
* @param assigned the assigned actions * @param assigned the assigned actions
*/ */
public DistributionSetAssignmentResult(final DistributionSet distributionSet, final int alreadyAssigned, public DistributionSetAssignmentResult(final DistributionSet distributionSet, final int alreadyAssigned,

View File

@@ -11,7 +11,9 @@ package org.eclipse.hawkbit.repository.model;
import java.util.List; import java.util.List;
import lombok.Data; import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.ToString;
/** /**
* Result object for {@link DistributionSetTag} assignments. * Result object for {@link DistributionSetTag} assignments.
@@ -19,7 +21,9 @@ import lombok.Data;
* @deprecated since 0.6.0 with toggle deprecation * @deprecated since 0.6.0 with toggle deprecation
*/ */
@Deprecated(forRemoval = true, since = "0.6.0") @Deprecated(forRemoval = true, since = "0.6.0")
@Data @Getter
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class DistributionSetTagAssignmentResult extends AbstractAssignmentResult<DistributionSet> { public class DistributionSetTagAssignmentResult extends AbstractAssignmentResult<DistributionSet> {
private final DistributionSetTag distributionSetTag; private final DistributionSetTag distributionSetTag;

View File

@@ -11,7 +11,9 @@ package org.eclipse.hawkbit.repository.model;
import java.util.List; import java.util.List;
import lombok.Data; import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.ToString;
/** /**
* Result object for {@link TargetTag} assignments. * Result object for {@link TargetTag} assignments.
@@ -19,7 +21,9 @@ import lombok.Data;
* @deprecated since 0.6.0 with deprecation of toggle assignments * @deprecated since 0.6.0 with deprecation of toggle assignments
*/ */
@Deprecated(forRemoval = true, since = "0.6.0") @Deprecated(forRemoval = true, since = "0.6.0")
@Data @Getter
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class TargetTagAssignmentResult extends AbstractAssignmentResult<Target> { public class TargetTagAssignmentResult extends AbstractAssignmentResult<Target> {
private final TargetTag targetTag; private final TargetTag targetTag;

View File

@@ -11,12 +11,16 @@ package org.eclipse.hawkbit.repository.model;
import java.util.List; import java.util.List;
import lombok.Data; import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.ToString;
/** /**
* Result object for {@link TargetType} assignments. * Result object for {@link TargetType} assignments.
*/ */
@Data @Getter
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class TargetTypeAssignmentResult extends AbstractAssignmentResult<Target> { public class TargetTypeAssignmentResult extends AbstractAssignmentResult<Target> {
private final TargetType targetType; private final TargetType targetType;

View File

@@ -78,10 +78,7 @@ public interface BaseEntityRepository<T extends AbstractJpaTenantAwareBaseEntity
@Override @Override
List<T> findAllById(final Iterable<Long> ids); List<T> findAllById(final Iterable<Long> ids);
// TODO When we switch to Spring 3.0 probably we could remove extending methods using
// queries and make here a default implementation using JPASpecificationExecutor delete method
// TODO To be considered if this method is needed at all // TODO To be considered if this method is needed at all
/** /**
* Deletes all entities of a given tenant from this repository. For safety * Deletes all entities of a given tenant from this repository. For safety
* reasons (this is a "delete everything" query after all) we add the tenant * reasons (this is a "delete everything" query after all) we add the tenant