class SetupStatusServiceImpl implements SetupStatusService {

    @Override
    public ServiceResult<SetupStatusResource> findSetupStatusAndTarget(String className, Long classPk, String targetClassName, Long targetId) {
        Optional<SetupStatus> resultOpt = setupStatusRepository.findByClassNameAndClassPkAndTargetClassNameAndTargetId(className, classPk, targetClassName, targetId);

        if(resultOpt.isPresent()) {
            return serviceSuccess(setupStatusMapper.mapToResource(resultOpt.get()));
        }
        return serviceFailure(notFoundError(SetupStatus.class, classPk, className));
    }

}