class BankAccountService {

	@Transactional
	public List<BankAccount> create(List<BankAccount> bankAccounts, BindingResult errors, RequestInfo requestInfo) {

		try {

			bankAccounts = fetchRelated(bankAccounts);

			validate(bankAccounts, Constants.ACTION_CREATE, errors);

			if (errors.hasErrors()) {
				throw new CustomBindException(errors);
			}
			for (BankAccount b : bankAccounts) {
				b.setId(bankAccountRepository.getNextSequence());
			}

		} catch (CustomBindException e) {

			throw new CustomBindException(errors);
		}

		return bankAccountRepository.save(bankAccounts, requestInfo);

	}

}