Class SearchDAO
java.lang.Object
ru.bgcrm.dao.CommonDAO
ru.bgcrm.plugin.fulltext.dao.SearchDAO
-
Nested Class Summary
Nested classes/interfaces inherited from class CommonDAO
CommonDAO.ObjectExtractor<T>, CommonDAO.RecordUpdater<T> -
Field Summary
FieldsFields inherited from class CommonDAO
con, 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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidDeletes the record about the objectvoiddelete(SearchItem item) Deletes the record about the objectgetScheduledUpdates(int secondsOld, int maxCount) Selects records that need to be updatedvoidInitializes indexing for object typesvoidscheduleUpdate(String objectType, int objectId) Marks the object as needing an updatevoidsearchCustomer(Pageable<Customer> result, String filter) Full-text search of customersvoidFull-text search of messages linked to processesvoidsearchProcess(Pageable<Process> result, String filter) Full-text search of processesvoidupdate(SearchItem item) Updates the searchable text of the recordMethods inherited from class CommonDAO
deleteById, foundRows, getById, getGroupedIds, getGroupedIds, getIds, getIds, getPageLimit, getPeriodSql, lastInsertId, setPeriodParamValue, setRecordCount, update, updateColumn, updateIds, updateIds, updateOrInsert
-
Field Details
-
TABLE
- See Also:
-
-
Constructor Details
-
SearchDAO
-
-
Method Details
-
searchCustomer
Full-text search of customers- Parameters:
result- the search resultfilter- query string with + and - symbols for adding / removing words- Throws:
SQLException
-
searchProcess
Full-text search of processes- Parameters:
result- the search resultfilter- query string with + and - symbols for adding / removing words- Throws:
SQLException
-
searchMessages
public void searchMessages(Pageable<Pair<Message, Process>> result, String filter) throws SQLExceptionFull-text search of messages linked to processes- Parameters:
result- the search resultfilter- query string with + and - symbols for adding / removing words- Throws:
SQLException
-
scheduleUpdate
Marks the object as needing an update- Parameters:
objectType- the object typeobjectId- the object ID- Throws:
SQLException
-
delete
Deletes the record about the object- Parameters:
objectType- the object typeobjectId- the object ID
-
delete
Deletes the record about the object- Parameters:
item- the search item
-
getScheduledUpdates
Selects records that need to be updated- Parameters:
secondsOld- the object's last change was more than this many seconds agomaxCount- the maximum count
-
update
Updates the searchable text of the record- Parameters:
item- the search item
-
init
Initializes indexing for object types- Parameters:
objectType- the object typeobjectTable- the object table name- Throws:
SQLException
-