Skip to content

Commit

Permalink
Code Style fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-w1lde committed Nov 1, 2024
1 parent 58ab2ac commit 217f8ff
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class JooqUpdateEventAction implements UpdateEventAction {
private final JsonSerializer jsonSerializer;

@Override
public void invoke(@NotNull Event event) {
public void invoke(@NotNull final Event event) {
command.execute(
PostgresDSL
.update(EVENTS)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
import org.jetbrains.annotations.NotNull;

public interface UpdateEventAction {
void invoke(@NotNull Event event);
void invoke(@NotNull final Event event);
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import org.jetbrains.annotations.NotNull;

public interface DeleteOrderAction {
void invoke(@NotNull Order order);
void invoke(@NotNull String code);
void invoke(@NotNull final Order order);

void invoke(@NotNull final String code);
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ public class JooqDeleteOrderAction implements DeleteOrderAction {
private final SqlCommand command;

@Override
public void invoke(@NotNull Order order) {
public void invoke(@NotNull final Order order) {
this.invoke(order.getCode());
}

@Override
public void invoke(@NotNull String code) {
public void invoke(@NotNull final String code) {
command.execute(
PostgresDSL
.deleteFrom(ORDERS)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ public class JooqUpsertOrderAction implements UpsertOrderAction {
private final JsonSerializer jsonSerializer;

@Override
public void invoke(@NotNull Order order, @NotNull PretixInformation pretixInformation) {
public void invoke(
@NotNull final Order order,
@NotNull final PretixInformation pretixInformation
) {
String code = order.getCode();
short orderStatus = (short) order.getOrderStatus().ordinal();
short sponsorship = (short) order.getSponsorship().ordinal();
Expand All @@ -34,7 +37,6 @@ public void invoke(@NotNull Order order, @NotNull PretixInformation pretixInform
//Event event = order.getOrderEvent();
final var answers = jsonSerializer.serializeAsJson(order.getAllAnswers(pretixInformation));


command.execute(
PostgresDSL
.insertInto(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,8 @@
import org.jetbrains.annotations.NotNull;

public interface UpsertOrderAction {
void invoke(@NotNull Order order, @NotNull PretixInformation pretixInformation);
void invoke(
@NotNull final Order order,
@NotNull final PretixInformation pretixInformation
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
public interface PretixOrderFinder {
@NotNull
PretixPaging<PretixOrder> getPagedOrders(
@NotNull String organizer,
@NotNull String event,
@NotNull final String organizer,
@NotNull final String event,
int page
);

@NotNull
Optional<PretixOrder> fetchOrderByCode(
@NotNull String organizer,
@NotNull String event,
@NotNull String code
@NotNull final String organizer,
@NotNull final String event,
@NotNull final String code
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,17 @@
@Slf4j
public class RestPretixOrderFinder implements PretixOrderFinder {
private final ParameterizedTypeReference<PretixPaging<PretixOrder>> pretixPagedOrder =
new ParameterizedTypeReference<>() {
};
new ParameterizedTypeReference<>() {};

@Qualifier("pretixHttpClient")
private final HttpClient pretixHttpClient;

@Override
public @NotNull PretixPaging<PretixOrder> getPagedOrders(
@NotNull String organizer, @NotNull String event, int page) {
@NotNull final String organizer,
@NotNull final String event,
int page
) {
final var request = HttpRequest.<PretixPaging<PretixOrder>>create()
.method(HttpMethod.GET)
.path("/organizers/{organizer}/events/{event}/orders/")
Expand All @@ -51,9 +53,9 @@ public class RestPretixOrderFinder implements PretixOrderFinder {

@Override
public @NotNull Optional<PretixOrder> fetchOrderByCode(
@NotNull String organizer,
@NotNull String event,
@NotNull String code
@NotNull final String organizer,
@NotNull final String event,
@NotNull final String code
) {
final var request = HttpRequest.<PretixOrder>create()
.method(HttpMethod.GET)
Expand Down

0 comments on commit 217f8ff

Please sign in to comment.