@Transactional
@Override
public CommandProcessingResult updateGLAccount(final Long glAccountId, final JsonCommand command) {
try {
final GLAccountCommand accountCommand = this.fromApiJsonDeserializer.commandFromApiJson(command.json());
accountCommand.validateForUpdate();
final Long parentId = command.longValueOfParameterNamed(GLAccountJsonInputParams.PARENT_ID.getValue());
if (glAccountId.equals(parentId)) { throw new InvalidParentGLAccountHeadException(glAccountId, parentId); }
// is the glAccount valid
final GLAccount glAccount = this.glAccountRepository.findOne(glAccountId);