| | |
| | | } |
| | | |
| | | HostingField hostingField = ConvertUtil.copyProperties(HostingFieldForm, HostingField.class); |
| | | |
| | | if (hostingField.getCode() != null && !hostingField.getCode().equals("")) { |
| | | hostingFieldRepository.saveAndFlush(hostingField); |
| | | try { |
| | | hostingFieldRepository.saveAndFlush(hostingField); |
| | | } catch (Exception e) { |
| | | throw new OwlRuntimeException(this.messageAccessor.getMessage(MsgConstants.HOSTING_CODE_USED_EXIST_VALUE)); |
| | | } |
| | | } else { |
| | | throw new OwlRuntimeException(this.messageAccessor.getMessage(MsgConstants.HOSTING_CODE_NOT_ENTER)); |
| | | } |
| | | |
| | | return hostingField; |
| | | } |
| | | |
| | |
| | | HostingFieldForm.setEmail(emails.trim()); |
| | | } |
| | | HostingField HostingField = ConvertUtil.copyProperties(HostingFieldForm, HostingField.class); |
| | | hostingFieldRepository.saveAndFlush(HostingField); |
| | | |
| | | if (HostingField.getCode() != null && !HostingField.getCode().equals("")) { |
| | | try { |
| | | hostingFieldRepository.saveAndFlush(HostingField); |
| | | } catch (Exception e) { |
| | | throw new OwlRuntimeException(this.messageAccessor.getMessage(MsgConstants.HOSTING_CODE_USED_EXIST_VALUE)); |
| | | } |
| | | } else { |
| | | throw new OwlRuntimeException(this.messageAccessor.getMessage(MsgConstants.HOSTING_CODE_NOT_ENTER)); |
| | | } |
| | | |
| | | } |
| | | |
| | | // Hosting를 삭제한다. |
| | |
| | | HostingField hostingField = new HostingField(); |
| | | ConvertUtil.copyProperties(saveHostingFieldForm, hostingField); |
| | | |
| | | hostingField = this.hostingFieldRepository.saveAndFlush(hostingField); |
| | | if (hostingField.getCode() != null && !hostingField.getCode().equals("")) { |
| | | try { |
| | | hostingField = hostingFieldRepository.saveAndFlush(hostingField); |
| | | } catch (Exception e) { |
| | | throw new OwlRuntimeException(this.messageAccessor.getMessage(MsgConstants.HOSTING_CODE_USED_EXIST_VALUE)); |
| | | } |
| | | } else { |
| | | throw new OwlRuntimeException(this.messageAccessor.getMessage(MsgConstants.HOSTING_CODE_NOT_ENTER)); |
| | | } |
| | | |
| | | saveHostingFieldForm.setId(hostingField.getId()); |
| | | } |