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

ru.foodtechlab.lib.auth.service.domain.migration.usecases.InitMigrationUseCase Maven / Gradle / Ivy

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

import com.rcore.domain.commons.usecase.UseCase;
import com.rcore.domain.commons.usecase.model.SingletonEntityOutputValues;
import lombok.*;
import ru.foodtechlab.lib.auth.service.domain.migration.entity.MigrationEntity;
import ru.foodtechlab.lib.auth.service.domain.migration.exceptions.MigrationNotFoundException;
import ru.foodtechlab.lib.auth.service.domain.migration.port.MigrationRepository;

import javax.validation.constraints.NotBlank;

/**
 * Обновление сущности
 */
@RequiredArgsConstructor
public class InitMigrationUseCase extends UseCase> {

    private final MigrationRepository migrationRepository;

    @Override
    public SingletonEntityOutputValues execute(InputValues inputValues) {
        MigrationEntity migrationEntity = migrationRepository.getMigration();
        return SingletonEntityOutputValues.of(migrationEntity);
    }

    @AllArgsConstructor(staticName = "of")
    @Getter
    @Builder
    public static class InputValues implements UseCase.InputValues {
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy