Class ContractNotificationDao

java.lang.Object
ru.bitel.bgbilling.kernel.base.server.logger.BGLogger
ru.bitel.bgbilling.common.dao.AbstractDaoConstant
ru.bitel.bgbilling.common.dao.AbstractDao<ContractNotification>
ru.bitel.bgbilling.common.dao.AbstractIdDao<ContractNotification>
ru.bitel.bgbilling.plugins.notification.server.dao.ContractNotificationDao

public class ContractNotificationDao extends ru.bitel.bgbilling.common.dao.AbstractIdDao<ContractNotification>
  • Nested Class Summary

    Nested classes/interfaces inherited from class ru.bitel.bgbilling.common.dao.AbstractDao

    ru.bitel.bgbilling.common.dao.AbstractDao.ListParams
  • Field Summary

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

    orderByPattern

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

    con, ERROR, fields, moduleId, SQL_ALL, SQL_AND, 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_ORDER, SQL_SELECT, SQL_SET, SQL_UPDATE, SQL_VALUES, SQL_WHERE, tableName
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
    getNotificationSendingHistory(int notificationId)
    Последняя попытка отправки и количество попыток для каждого договора по заданному уведомлению.
    getReport(Page page, int notificationId, Period period)
    Отчет по отправленным уведомлениям с пейджингом.
    getSearch(int contractId, Page page, int notificationId, Period period)
    Уведомления по договору с пейджингом и фильтрацией по уведомлению и периоду отправки.
    list(int contractId)
     
    void
     
    protected void
     
    void
    updateReadInfo(int contractId, int notificationId, LocalDateTime readTime, String answer)
    Фиксация факта прочтения/ответа по последней неотвеченной попытке отправки договору заданного уведомления.

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

    delete, executeUpdate, get, getAndDelete, getAndUpdate, loadData, opt, prepareStatement, sqlCommand, sqlCommandAndTable, sqlInsertValues, sqlQuery, sqlUpdateSet, sqlWhereId

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

    deleteImpl, dropTemporaryTable, eq, get, getById, getImpl, getListFromRS, getPeriod, getQueryById, getQueryWithFilter, list, list, list, listCountImplPS, listImpl, listImplPS, ormFromResultSet, ormUpdateImpl, ormUpdateImpl, ormUpdateImpl, ormUpdateImpl, queryPeriod, setPageRecordCount, update

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

    getPlaceholders, getSQLOrder, getSQLOrderFields, getTableName, psSetDate, psSetDateOrNull, psSetInt, psSetIntOrNull, psSetPeriod, psSetString, psSetStringOrNull, psSetTimestampOrNull, queryAndIn, setStatementParam, sqlDelete, sqlDeleteBatch, sqlInsert, sqlInsertBatch, sqlInsertGetId, sqlInsertGetLongId, sqlInsertOnDuplicateKeyUpdate, sqlInsertSelect, sqlInsertUpdateById, sqlSelectCountAsInt, sqlUpdate, sqlUpdateBatch

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

    error, error, error, getLogger, logError, logError, logError, warn

    Methods inherited from class java.lang.Object

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

    • ContractNotificationDao

      public ContractNotificationDao(Connection con)
  • Method Details

    • list

      public List<ContractNotification> list(int contractId) throws SQLException
      Throws:
      SQLException
    • getFromRS

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

      protected void updateImpl(ContractNotification notice) throws SQLException
      Specified by:
      updateImpl in class ru.bitel.bgbilling.common.dao.AbstractDao<ContractNotification>
      Throws:
      SQLException
    • saveContractNotificationList

      public void saveContractNotificationList(List<ContractNotification> contractNotifications) throws SQLException
      Throws:
      SQLException
    • getNotificationSendingHistory

      public List<ContractNotification> getNotificationSendingHistory(int notificationId) throws SQLException
      Последняя попытка отправки и количество попыток для каждого договора по заданному уведомлению.
      Throws:
      SQLException
    • getReport

      public Result<ContractNotification> getReport(Page page, int notificationId, Period period) throws SQLException
      Отчет по отправленным уведомлениям с пейджингом.
      Parameters:
      page - страница
      notificationId - если > 0 - фильтрация по уведомлению, иначе - все
      period - если задан - фильтрация по периоду отправки
      Throws:
      SQLException
    • getSearch

      public Result<ContractNotification> getSearch(int contractId, Page page, int notificationId, Period period) throws SQLException
      Уведомления по договору с пейджингом и фильтрацией по уведомлению и периоду отправки.
      Throws:
      SQLException
    • updateReadInfo

      public void updateReadInfo(int contractId, int notificationId, LocalDateTime readTime, String answer) throws SQLException
      Фиксация факта прочтения/ответа по последней неотвеченной попытке отправки договору заданного уведомления. Если все попытки уже отвечены — обновляется последняя.
      Throws:
      SQLException