Package org.bgerp.dao.message

# Class MessageSearchDAO

java.lang.Object
ru.bgcrm.dao.CommonDAO
ru.bgcrm.dao.message.MessageDAO
org.bgerp.dao.message.MessageSearchDAO

public class MessageSearchDAO extends MessageDAO
Fluent DAO for message search.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static enum`
  `MessageSearchDAO.Order`

  ## Nested classes/interfaces inherited from class ru.bgcrm.dao.CommonDAO

  `CommonDAO.ObjectExtractor<T>, CommonDAO.RecordUpdater<T extends Id>`

- ## Field Summary

  ### Fields inherited from class ru.bgcrm.dao.CommonDAO

  `con, 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 Summary

  Constructors
  Constructor
  Description
  `MessageSearchDAO(Connection con)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `MessageSearchDAO`
  `order(MessageSearchDAO.Order value)`
  Adds selection order.
  `void`
  `search(Pageable<Message> result)`
  Executes search.
  `MessageSearchDAO`
  `withAttach(Boolean value)`
  Filter by attachment existence.
  `MessageSearchDAO`
  `withDateFrom(Date from, Date to)`
  Filter by `Message.getFromTime()`, day precision.
  `MessageSearchDAO`
  `withDirection(Integer value)`
  Filter by `Message.getDirection()`.
  `MessageSearchDAO`
  `withFrom(String value)`
  SQL LIKE filter by `Message.getFrom()`.
  `MessageSearchDAO`
  `withProcessed(Boolean value)`
  Filter by
  invalid reference

      Message#isProcessed()

  .
  `MessageSearchDAO`
  `withProcessIds(Set<Integer> value)`
  Filter by linked to message process IDs.
  `MessageSearchDAO`
  `withRead(Boolean value)`
  Filter by `Message.getToTime()` not `null`.
  `MessageSearchDAO`
  `withTagId(int value)`
  Filter by message tag ID.
  `MessageSearchDAO`
  `withTagIds(Set<Integer> value)`
  Filter by message tag IDs.
  `MessageSearchDAO`
  `withTypeId(int value)`
  Filter by single type ID.
  `MessageSearchDAO`
  `withTypeIds(Set<Integer> value)`
  Filter by message type IDs.

  ### Methods inherited from class ru.bgcrm.dao.message.MessageDAO

  `deleteMessage, deleteProcessMessages, getIsolationJoin, getMessageById, getMessageBySystemId, getMessageFromRs, getMessageTags, getProcessMessageList, getProcessMessageList, getProcessMessageTagMap, getProcessMessageTagMap, getUnsendMessageList, searchMessageList, searchMessageList, searchMessageList, searchMessageList, searchMessageList, toggleMessageTags, updateMessage, updateMessageProcess, updateMessageTags`

  ### Methods inherited from class ru.bgcrm.dao.CommonDAO

  `deleteById, foundRows, getById, getGroupedIds, getGroupedIds, getIds, getIds, getPageLimit, getPeriodSql, lastInsertId, setPeriodParamValue, setRecordCount, update, updateColumn, updateIds, updateIds, updateOrInsert`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### MessageSearchDAO

    public MessageSearchDAO(Connection con)

- ## Method Details

  - ### withTagIds

    public MessageSearchDAO withTagIds(Set<Integer> value)
    Filter by message tag IDs.
    Parameters:
      `value` -
    Returns:

  - ### withTagId

    public MessageSearchDAO withTagId(int value)
    Filter by message tag ID.
    Parameters:
      `value` - positive ID.
    Returns:

  - ### withProcessIds

    public MessageSearchDAO withProcessIds(Set<Integer> value)
    Filter by linked to message process IDs.
    Parameters:
      `value` -
    Returns:

  - ### withTypeIds

    public MessageSearchDAO withTypeIds(Set<Integer> value)
    Filter by message type IDs.
    Parameters:
      `value` -
    Returns:

  - ### withTypeId

    public MessageSearchDAO withTypeId(int value)
    Filter by single type ID.
    Parameters:
      `value` - positive ID.
    Returns:

  - ### withDirection

    public MessageSearchDAO withDirection(Integer value)
    Filter by `Message.getDirection()`.
    Parameters:
      `value` -
    Returns:

  - ### withProcessed

    public MessageSearchDAO withProcessed(Boolean value)
    Filter by
    invalid reference

        Message#isProcessed()

    .
    Parameters:
      `value` -
    Returns:

  - ### withRead

    public MessageSearchDAO withRead(Boolean value)
    Filter by `Message.getToTime()` not `null`.
    Parameters:
      `value` -
    Returns:

  - ### withAttach

    public MessageSearchDAO withAttach(Boolean value)
    Filter by attachment existence.
    Parameters:
      `value` -
    Returns:

  - ### withFrom

    public MessageSearchDAO withFrom(String value)
    SQL LIKE filter by `Message.getFrom()`.
    Parameters:
      `value` -
    Returns:

  - ### withDateFrom

    public MessageSearchDAO withDateFrom(Date from, Date to)
    Filter by `Message.getFromTime()`, day precision.
    Parameters:
      `from` - from day including.
      `to` - to day, including.
    Returns:

  - ### order

    public MessageSearchDAO order(MessageSearchDAO.Order value)
    Adds selection order.
    Parameters:
      `value` -
    Returns:

  - ### search

    public void search(Pageable<Message> result) throws SQLException
    Executes search.
    Parameters:
      `result` - pageable result.
    Throws:
      `SQLException`