Class SearchDAO

java.lang.Object
ru.bgcrm.dao.CommonDAO
ru.bgcrm.plugin.fulltext.dao.SearchDAO

public class SearchDAO extends CommonDAO
  • Field Details

  • Constructor Details

  • Method Details

    • searchCustomer

      public void searchCustomer(Pageable<Customer> result, String filter) throws SQLException
      Full-text search of customers
      Parameters:
      result - the search result
      filter - query string with + and - symbols for adding / removing words
      Throws:
      SQLException
    • searchProcess

      public void searchProcess(Pageable<Process> result, String filter) throws SQLException
      Full-text search of processes
      Parameters:
      result - the search result
      filter - query string with + and - symbols for adding / removing words
      Throws:
      SQLException
    • searchMessages

      public void searchMessages(Pageable<Pair<Message,Process>> result, String filter) throws SQLException
      Full-text search of messages linked to processes
      Parameters:
      result - the search result
      filter - query string with + and - symbols for adding / removing words
      Throws:
      SQLException
    • scheduleUpdate

      public void scheduleUpdate(String objectType, int objectId) throws SQLException
      Marks the object as needing an update
      Parameters:
      objectType - the object type
      objectId - the object ID
      Throws:
      SQLException
    • delete

      public void delete(String objectType, int objectId)
      Deletes the record about the object
      Parameters:
      objectType - the object type
      objectId - the object ID
    • delete

      public void delete(SearchItem item)
      Deletes the record about the object
      Parameters:
      item - the search item
    • getScheduledUpdates

      public List<SearchItem> getScheduledUpdates(int secondsOld, int maxCount)
      Selects records that need to be updated
      Parameters:
      secondsOld - the object's last change was more than this many seconds ago
      maxCount - the maximum count
    • update

      public void update(SearchItem item)
      Updates the searchable text of the record
      Parameters:
      item - the search item
    • init

      public void init(String objectType, String objectTable) throws SQLException
      Initializes indexing for object types
      Parameters:
      objectType - the object type
      objectTable - the object table name
      Throws:
      SQLException