class AccountDetailTypeService {

	public Pagination<AccountDetailType> search(AccountDetailTypeSearch accountDetailTypeSearch, BindingResult errors) {

		try {

			List<AccountDetailType> accountDetailTypes = new ArrayList<>();
			accountDetailTypes.add(accountDetailTypeSearch);
			validate(accountDetailTypes, Constants.ACTION_SEARCH, errors);

			if (errors.hasErrors()) {
				throw new CustomBindException(errors);
			}

		} catch (CustomBindException e) {

			throw new CustomBindException(errors);
		}

		return accountDetailTypeRepository.search(accountDetailTypeSearch);
	}

}