Class DispatchMessageDao

java.lang.Object
ru.bitel.bgbilling.kernel.base.server.logger.BGLogger
ru.bitel.bgbilling.common.dao.AbstarctDaoConstant
ru.bitel.bgbilling.common.dao.AbstractDao<B>
ru.bitel.bgbilling.common.dao.AbstractIdDao<DispatchMessage>
ru.bitel.bgbilling.plugins.dispatch.server.dao.DispatchMessageDao

public class DispatchMessageDao extends ru.bitel.bgbilling.common.dao.AbstractIdDao<DispatchMessage>
DAO для работы с сообщениями рассылок напрямую. Вместо работы с этим DAO рекомендуется работать с DispatchService
  • Field Summary

    Fields inherited from class ru.bitel.bgbilling.common.dao.AbstractDao

    con, moduleId, orderByPattern, tableName

    Fields inherited from class ru.bitel.bgbilling.common.dao.AbstarctDaoConstant

    ERROR, fields, SQL_ALL, SQL_AND, SQL_CALC_FOUND_ROWS, SQL_DELETE, SQL_DISTINCT, SQL_EQ, SQL_EQCS, SQL_FROM, SQL_GROUP, SQL_IN, SQL_INSERT, SQL_JOIN, SQL_LEFT_JOIN, SQL_LIMIT, SQL_NOT_IN, SQL_ON, SQL_ON_DUPLICATE_KEY_UPDATE, SQL_ORDER, SQL_SELECT, SQL_SET, SQL_UPDATE, SQL_VALUES, SQL_WHERE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Добавление информации по отправленному сообщению: кому, когда, куда, за что
    void
    Удаляет все сообщения данной рассылки
    void
    Удаление отдельного элемента статитистики отправленных сообщений.
    protected DispatchMessage
     
    getList(int dispatchId, boolean onlyNotSent)
    Возвращает список сообщений для данной рассылки
    Получение одного единственного элемента статистики по его идентификатору.
    void
    getMessageStatisticList(int contractId, int dispatchId, int messageId, int contactId, SearchResult<DispatchMessageStatistic> searchResult)
    Получение статистики по отправленным сообщениям.
    protected void
    updateImpl(DispatchMessage dispatchMessage)
     

    Methods inherited from class ru.bitel.bgbilling.common.dao.AbstractIdDao

    delete, executeUpdate, get, getAndDelete, getAndUpdate, opt, sqlCommand, sqlCommandAndTable, sqlQuery, sqlWhereId

    Methods inherited from class ru.bitel.bgbilling.common.dao.AbstractDao

    delete, deleteImpl, eq, get, getById, getImpl, getListFromRS, getPeriod, getQueryById, getSQLOrder, getTableName, list, list, listImpl, listImpl, listImplPS, listImplPS, ormFromResultSet, ormUpdateImpl, ormUpdateImpl, ormUpdateImpl, ormUpdateImpl, setStatementParam, update

    Methods inherited from class ru.bitel.bgbilling.common.dao.AbstarctDaoConstant

    getSQLOrder

    Methods inherited from class ru.bitel.bgbilling.kernel.base.server.logger.BGLogger

    error, error, error, getLogger, logError, logError

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • DispatchMessageDao

      public DispatchMessageDao(Connection con)
  • Method Details

    • updateImpl

      protected void updateImpl(DispatchMessage dispatchMessage) throws SQLException
      Specified by:
      updateImpl in class ru.bitel.bgbilling.common.dao.AbstractDao<DispatchMessage>
      Throws:
      SQLException
    • getFromRS

      protected DispatchMessage getFromRS(ResultSet rs) throws SQLException
      Specified by:
      getFromRS in class ru.bitel.bgbilling.common.dao.AbstractDao<DispatchMessage>
      Throws:
      SQLException
    • getList

      public List<DispatchMessage> getList(int dispatchId, boolean onlyNotSent) throws SQLException
      Возвращает список сообщений для данной рассылки
      Parameters:
      dispatchId - код рассылки
      onlyNotSent - если true - то выберет только неотправленные
      Returns:
      Throws:
      ru.bitel.bgbilling.common.BGException
      SQLException
    • deleteByDispatch

      public void deleteByDispatch(int id) throws SQLException
      Удаляет все сообщения данной рассылки
      Parameters:
      id -
      Throws:
      ru.bitel.bgbilling.common.BGException
      SQLException
    • addMessageStatistic

      public void addMessageStatistic(DispatchMessageStatistic statistic) throws SQLException
      Добавление информации по отправленному сообщению: кому, когда, куда, за что
      Parameters:
      statistic - статистика отправленного сообщения
      Throws:
      ru.bitel.bgbilling.common.BGException
      SQLException
    • getMessageStatistic

      public DispatchMessageStatistic getMessageStatistic(int id) throws SQLException
      Получение одного единственного элемента статистики по его идентификатору. Наверное, этот метод нужен в основном для тестов.
      Parameters:
      id - id элемента статистики
      Returns:
      Throws:
      ru.bitel.bgbilling.common.BGException
      SQLException
    • getMessageStatisticList

      public void getMessageStatisticList(int contractId, int dispatchId, int messageId, int contactId, SearchResult<DispatchMessageStatistic> searchResult) throws SQLException
      Получение статистики по отправленным сообщениям.
      Parameters:
      contractId - код договора. Если не задан, то выводится статисктика по всем договорам
      dispatchId - код рассылки. Если не задан, то выводится статистика по всем рассылкам
      messageId - код сообщения. Если не задан, то выводится статисктика по всем сообщениям данного вида
      contactId - код контакта. Если не задан, то выводится статистика сообщений для данного контакта.
      searchResult - результат, содержащий список, страницы, период.
      Throws:
      ru.bitel.bgbilling.common.BGException
      SQLException
    • deleteMessageStatistic

      public void deleteMessageStatistic(int id) throws SQLException
      Удаление отдельного элемента статитистики отправленных сообщений.
      Parameters:
      id - код элемента статистики
      Throws:
      ru.bitel.bgbilling.common.BGException
      SQLException