Skip to content

Commit

Permalink
fix: sonar issues
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelovbcfilho committed Jan 26, 2024
1 parent fd87dd2 commit 929355d
Show file tree
Hide file tree
Showing 8 changed files with 4 additions and 116 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
import lombok.Setter;

@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
public class AdvanceOrderStatusResponseDTO {

Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import static java.util.Map.entry;

@AllArgsConstructor
@NoArgsConstructor
@Getter
@Setter
public class Status {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
package br.com.grupo63.serviceproduction.gateway.status;

import br.com.grupo63.serviceproduction.entity.status.Status;
import br.com.grupo63.techchallenge.common.gateway.IPersistenceEntityGateway;

import java.util.List;
import java.util.Optional;

public interface IStatusGateway extends IPersistenceEntityGateway<Status> {
public interface IStatusGateway {

Status saveAndFlush(Status entity);

List<Status> findByStatusNotFinishedAndDeletedOrderByCreationDate();

Optional<Status> findByDeletedFalseAndOrder(int order);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,6 @@ public Optional<Status> findByDeletedFalseAndOrder(int order) {
.map(StatusPersistenceEntity::toModel);
}

@Override
public List<Status> findByDeletedFalse() {
return repository.findByDeletedFalse()
.stream()
.map(StatusPersistenceEntity::toModel)
.collect(Collectors.toList());
}

@Override
public Status saveAndFlush(Status status) {
StatusPersistenceEntity entity = new StatusPersistenceEntity(status);
Expand All @@ -54,10 +46,4 @@ public Status saveAndFlush(Status status) {

return entity.toModel();
}

@Override
public Optional<Status> findByIdAndDeletedFalse(Long id) {
return repository.findByIdAndDeletedFalse(id)
.map(StatusPersistenceEntity::toModel);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@
import java.time.LocalDateTime;

@AllArgsConstructor
@NoArgsConstructor
@Getter
@Setter

@DynamoDBTable(tableName = "status")
public class StatusPersistenceEntity {
Expand Down

0 comments on commit 929355d

Please sign in to comment.