this.context.authenticatedUser();
this.fromApiJsonDeserializer.validateForCreate(command.json());
final Long codeId = command.entityId();
final Code code = this.codeRepository.findOne(codeId);
if (code == null) {
throw new CodeNotFoundException(codeId);
}
final CodeValue codeValue = CodeValue.fromJson(code, command);
this.codeValueRepository.save(codeValue);
return new CommandProcessingResultBuilder() //
.withCommandId(command.commandId()) //
.withEntityId(code.getId()) //
.withSubEntityId(codeValue.getId())//
.build();
} catch (final DataIntegrityViolationException dve) {
handleCodeValueDataIntegrityIssues(command, dve);
return new CommandProcessingResultBuilder() //