use of eu.bcvsolutions.idm.core.model.entity.IdmRequest in project CzechIdMng by bcvsolutions.
the class DefaultIdmRequestService method toEntity.
@Override
protected IdmRequest toEntity(IdmRequestDto dto, IdmRequest entity) {
if (this.isNew(dto)) {
dto.setResult(new OperationResultDto(OperationState.CREATED));
dto.setState(RequestState.CONCEPT);
} else if (dto.getResult() == null) {
IdmRequestDto persistedDto = this.get(dto.getId());
dto.setResult(persistedDto.getResult());
}
IdmRequest requestEntity = super.toEntity(dto, entity);
return requestEntity;
}
Aggregations