class AccountDetailTypeService {

	@Transactional
	public List<AccountDetailType> create(List<AccountDetailType> accountDetailTypes, BindingResult errors,
			RequestInfo requestInfo) {

		try {

			accountDetailTypes = fetchRelated(accountDetailTypes);

			validate(accountDetailTypes, Constants.ACTION_CREATE, errors);

			if (errors.hasErrors()) {
				throw new CustomBindException(errors);
			}
			for (AccountDetailType b : accountDetailTypes) {
				b.setId(accountDetailTypeRepository.getNextSequence());
			}

		} catch (CustomBindException e) {

			throw new CustomBindException(errors);
		}

		return accountDetailTypeRepository.save(accountDetailTypes, requestInfo);

	}

}