Package org.bgerp.dao.customer
Class CustomerDAO
java.lang.Object
ru.bgcrm.dao.CommonDAO
org.bgerp.dao.customer.CustomerDAO
- Direct Known Subclasses:
- CustomerDAO
- 
Nested Class SummaryNested classes/interfaces inherited from class ru.bgcrm.dao.CommonDAOCommonDAO.ObjectExtractor<T>, CommonDAO.RecordUpdater<T extends Id>
- 
Field SummaryFields inherited from class ru.bgcrm.dao.CommonDAOcon, log, SQL_AND, SQL_DELETE, SQL_DELETE_FROM, SQL_DESC, SQL_DISTINCT, SQL_FROM, SQL_GROUP_BY, SQL_INNER_JOIN, SQL_INSERT_IGNORE_INTO, SQL_INSERT_INTO, SQL_LEFT_JOIN, SQL_LIMIT, SQL_ON_DUP_KEY_UPDATE, SQL_ORDER_BY, SQL_REPLACE, SQL_SELECT, SQL_SELECT_ALL_FROM, SQL_SELECT_COUNT_ROWS, SQL_SET, SQL_UNION_ALL, SQL_UPDATE, SQL_VALUES, SQL_VALUES_1, SQL_VALUES_2, SQL_VALUES_3, SQL_VALUES_4, SQL_VALUES_5, SQL_WHERE
- 
Constructor SummaryConstructorsConstructorDescriptionCustomerDAO(Connection con) CustomerDAO(Connection con, boolean history, int userId) 
- 
Method SummaryModifier and TypeMethodDescriptionvoiddeleteCustomer(int id) Удаляет контрагента из БД по коду.extractCustomerWithRef(int customerId) Deprecated.getCustomerById(int customerId) Выбирает контрагента по его коду.getCustomerByTitle(String customerTitle) Deprecated.static CustomergetCustomerFromRs(ResultSet rs, String prefix) getCustomerTitles(String title, int count) Возвращает названия контрагенов с подстрокой.getGroupIds(int customerId) voidsearchCustomerByLinkedObjectTitle(Pageable<Customer> searchResult, String linkedObjectTypeLike, String linkedObjectTitle) Deprecated.voidsearchCustomerList(Pageable<Customer> searchResult, String title) Выбирает контрагентов по названию.voidsearchCustomerList(Pageable<Customer> searchResult, Set<Integer> groupIds) Deprecated.voidsearchCustomerListByAddress(Pageable<ParameterSearchedObject<Customer>> searchResult, List<Integer> addressParamIdList, int houseId, String houseFlat, String houseRoom) Выбирает контрагентов по адресному параметру.voidsearchCustomerListByAddress(Pageable<ParameterSearchedObject<Customer>> searchResult, List<Integer> addressParamIdList, int streetId, String house, String houseFlat, String houseRoom) Выбирает контрагентов по адресному параметру.voidsearchCustomerListByEmail(Pageable<ParameterSearchedObject<Customer>> searchResult, List<Integer> emailParamIdList, String email) Выбирает контрагентов по параметру типа Email.voidsearchCustomerListByPhone(Pageable<Customer> searchResult, Collection<Integer> phoneParamIdList, String... phoneNumbers) Выбирает контрагентов по номеру или номерам телефонов.voidsearchCustomerListByText(Pageable<Customer> searchResult, List<Integer> textParamIdList, String value) Выбирает контрагентов по строковому параметру.voidupdateCustomer(Customer customer) Обновляет информацию о контрагенте в БД.voidupdateCustomerTitle(String titleBefore, Customer customer, int changedParamId, Response response) Обновляет название контрагента,генерируя его из параметров.voidupdateGroupIds(int customerId, Set<Integer> groupIds) Methods inherited from class ru.bgcrm.dao.CommonDAOdeleteById, foundRows, getById, getGroupedIds, getGroupedIds, getIds, getIds, getPageLimit, getPeriodSql, lastInsertId, setPeriodParamValue, setRecordCount, update, updateColumn, updateIds, updateIds, updateOrInsert
- 
Constructor Details- 
CustomerDAO
- 
CustomerDAO
 
- 
- 
Method Details- 
searchCustomerListВыбирает контрагентов по названию.- Parameters:
- searchResult-
- title-
- Throws:
- SQLException
 
- 
searchCustomerListByEmailpublic void searchCustomerListByEmail(Pageable<ParameterSearchedObject<Customer>> searchResult, List<Integer> emailParamIdList, String email) Выбирает контрагентов по параметру типа Email.- Parameters:
- searchResult-
- emailParamIdList-
- email- Email, поиск идёт по точному совпадению и совпадению домена
- Throws:
- SQLException
 
- 
searchCustomerListByTextpublic void searchCustomerListByText(Pageable<Customer> searchResult, List<Integer> textParamIdList, String value) throws SQLException Выбирает контрагентов по строковому параметру.- Parameters:
- searchResult-
- textParamIdList-
- value-
- Throws:
- SQLException
 
- 
searchCustomerListByAddresspublic void searchCustomerListByAddress(Pageable<ParameterSearchedObject<Customer>> searchResult, List<Integer> addressParamIdList, int streetId, String house, String houseFlat, String houseRoom) throws SQLException Выбирает контрагентов по адресному параметру.- Parameters:
- searchResult-
- addressParamIdList-
- streetId-
- house-
- houseFlat-
- houseRoom-
- Throws:
- SQLException
 
- 
searchCustomerListByAddresspublic void searchCustomerListByAddress(Pageable<ParameterSearchedObject<Customer>> searchResult, List<Integer> addressParamIdList, int houseId, String houseFlat, String houseRoom) Выбирает контрагентов по адресному параметру.- Parameters:
- searchResult-
- addressParamIdList-
- houseId- код дома
- houseFlat- квартира
- houseRoom- комната
- Throws:
- SQLException
 
- 
searchCustomerListByPhonepublic void searchCustomerListByPhone(Pageable<Customer> searchResult, Collection<Integer> phoneParamIdList, String... phoneNumbers) Выбирает контрагентов по номеру или номерам телефонов.- Parameters:
- searchResult-
- phoneParamIdList-
- phoneNumbers-
 
- 
getCustomerByIdВыбирает контрагента по его коду.- Parameters:
- customerId-
- Returns:
 
- 
updateCustomerОбновляет информацию о контрагенте в БД.- Parameters:
- customer-
- Throws:
- SQLException
 
- 
deleteCustomerУдаляет контрагента из БД по коду.- Parameters:
- id-
- Throws:
- SQLException
 
- 
updateCustomerTitlepublic void updateCustomerTitle(String titleBefore, Customer customer, int changedParamId, Response response) throws Exception Обновляет название контрагента,генерируя его из параметров.- Parameters:
- titleBefore- исходное название.
- customer- контрагент.
- changedParamId- код изменённого параметра.
- response- если параметр передан, туда будет добавлено событие о изменении названия договора.
- Throws:
- Exception
 
- 
getCustomerTitlesВозвращает названия контрагенов с подстрокой.- Parameters:
- title- подстрока, поиск идёт с помощью LIKE выражения.
- count- количество первых названий.
- Returns:
 
- 
getGroupIds- Throws:
- SQLException
 
- 
updateGroupIds- Throws:
- SQLException
 
- 
getCustomerFromRs- Parameters:
- rs-
- prefix-
- Throws:
- SQLException
 
- 
searchCustomerListDeprecated.
- 
extractCustomerWithRefDeprecated.
- 
searchCustomerByLinkedObjectTitle@Deprecated public void searchCustomerByLinkedObjectTitle(Pageable<Customer> searchResult, String linkedObjectTypeLike, String linkedObjectTitle) Deprecated.
- 
getCustomerByTitleDeprecated.- Throws:
- SQLException
 
 
-