All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ru.foodtechlab.lib.auth.service.domain.confirmationCodeSendingTask.usecases.FindPendingTasksUseCase Maven / Gradle / Ivy

There is a newer version: 4.1.0
Show newest version
package ru.foodtechlab.lib.auth.service.domain.confirmationCodeSendingTask.usecases;

import com.rcore.domain.commons.usecase.UseCase;
import com.rcore.domain.commons.usecase.model.SingleOutput;
import lombok.RequiredArgsConstructor;
import lombok.Value;
import ru.foodtechlab.lib.auth.service.domain.confirmationCodeSendingTask.entity.ConfirmationCodeSendingTaskEntity;
import ru.foodtechlab.lib.auth.service.domain.confirmationCodeSendingTask.port.ConfirmationCodeSendingTaskRepository;

import java.util.List;

@RequiredArgsConstructor
public class FindPendingTasksUseCase
        extends UseCase>> {

    private final ConfirmationCodeSendingTaskRepository repository;

    @Override
    public SingleOutput> execute(InputValues inputValues) {
        return SingleOutput.of(repository.findPending(inputValues.getLimit()));
    }

    @Value(staticConstructor = "of")
    public static class InputValues implements UseCase.InputValues {
        Long limit;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy