package {{context.group}}.{{context.project}}.core.impl; import lombok.AllArgsConstructor; import org.springframework.stereotype.Component; import {{context.group}}.{{context.project}}.ext.MayFail; import {{context.group}}.{{context.project}}.core.BasicInfoService; import {{context.group}}.{{context.project}}.dal.EntityBasicInfoRepository; import {{context.group}}.{{context.project}}.dal.common.generated.tables.pojos.EntityBasicInfo; @Component @AllArgsConstructor public class BasicInfoServiceImpl implements BasicInfoService { private EntityBasicInfoRepository basicInfoRepository; @Override public MayFail fetchNameById(Long id) { MayFail info = basicInfoRepository.fetchById(id); return info.map(EntityBasicInfo::getNickname); } }