SavingsProduct savingsProduct = null;
final Long savingsProductId = command.longValueOfParameterNamed(ClientApiConstants.savingsProductIdParamName);
if (savingsProductId != null) {
savingsProduct = this.savingsProductRepository.findOne(savingsProductId);
if (savingsProduct == null) { throw new SavingsProductNotFoundException(savingsProductId); }
}
final Client newClient = Client.createNew(currentUser, clientOffice, clientParentGroup, staff, savingsProduct, gender,
clientType, clientClassification, command);