Class ContractServiceDao

java.lang.Object
ru.bitel.bgbilling.kernel.base.server.logger.BGLogger
ru.bitel.bgbilling.common.dao.AbstractDaoConstant
ru.bitel.bgbilling.kernel.contract.api.server.bean.ContractServiceDao

public class ContractServiceDao extends ru.bitel.bgbilling.common.dao.AbstractDaoConstant
Класс управления разрешенными услугами договора
  • Field Summary

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

    con, ERROR, fields, moduleId, 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, tableName
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Удаление записи из базы.
    void
    deleteContractService(int contractId, int moduleId)
    Удаляет все услуги из базы для данного договора и данного модуля
    void
    Удаление нескольких записей из базы.
    Получает записи из базы по уникальному коду.
    getContractServiceList(int contractId, int moduleId)
    Возвращает список услуг для данного договора и модуля
    getContractServiceList(int contractId, int moduleId, Date onDate)
    Список разрешенных услуг на дату.
    getContractServiceList(int contractId, Calendar date)
    Список разрешенных услуг на дату.
    getContractServiceList(int contractId, List<Integer> serviceIds, Calendar date1, Calendar date2)
    Перечень разрешенных услуг, активных в какой-то период.
    getContractServiceSet(int contractId, Date onDate)
    Коды разрешенных на какую-то дату услуг.
    getContractServiceTitles(int contractId, int moduleId)
     
    void
    Обновление/добавление записи в базу.

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

    getPeriod, getSQLOrder, getTableName, psSetDate, psSetDateOrNull, psSetInt, psSetIntOrNull, psSetPeriod, psSetString, psSetStringOrNull, psSetTimestampOrNull, queryAndIn

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

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

    Methods inherited from class java.lang.Object

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

    • ContractServiceDao

      public ContractServiceDao(Connection con)
  • Method Details

    • getContractServiceTitles

      public List<IdTitle> getContractServiceTitles(int contractId, int moduleId) throws SQLException
      Throws:
      SQLException
    • getContractServiceList

      public List<ContractService> getContractServiceList(int contractId, int moduleId) throws SQLException
      Возвращает список услуг для данного договора и модуля
      Parameters:
      contractId - код договора
      moduleId - код модуля
      Returns:
      Throws:
      SQLException
    • getContractServiceList

      public List<ContractService> getContractServiceList(int contractId, Calendar date) throws SQLException
      Список разрешенных услуг на дату.
      Parameters:
      contractId - код договора
      date - дата
      Returns:
      Throws:
      SQLException
    • getContractServiceList

      public List<ContractService> getContractServiceList(int contractId, int moduleId, Date onDate) throws SQLException
      Список разрешенных услуг на дату.
      Parameters:
      contractId - код договора
      moduleId - код экземпляра модуля
      onDate - дата
      Returns:
      Throws:
      SQLException
    • getContractServiceSet

      public Set<Integer> getContractServiceSet(int contractId, Date onDate) throws SQLException
      Коды разрешенных на какую-то дату услуг.
      Parameters:
      contractId - код договора
      onDate - дата
      Returns:
      Throws:
      SQLException
    • getContractServiceById

      public ContractService getContractServiceById(int id) throws SQLException
      Получает записи из базы по уникальному коду.
      Parameters:
      id - код записи
      Returns:
      Throws:
      SQLException
    • updateContractService

      public void updateContractService(ContractService contractService) throws SQLException
      Обновление/добавление записи в базу.
      Parameters:
      contractService - параметры разрешенной услуги
      id - строка с кодом записи либо "new" для добавления
      Throws:
      SQLException
    • deleteContractService

      public void deleteContractService(int id) throws SQLException
      Удаление записи из базы.
      Parameters:
      id - код записи
      Throws:
      SQLException
    • deleteContractService

      public void deleteContractService(int contractId, int moduleId) throws SQLException
      Удаляет все услуги из базы для данного договора и данного модуля
      Parameters:
      contractId - код договора
      moduleId - код модуля
      Throws:
      SQLException
    • deleteContractService

      public void deleteContractService(List<Integer> ids) throws SQLException
      Удаление нескольких записей из базы.
      Parameters:
      ids - коды записей через запятую
      Throws:
      SQLException
    • getContractServiceList

      public List<ContractService> getContractServiceList(int contractId, List<Integer> serviceIds, Calendar date1, Calendar date2) throws SQLException
      Перечень разрешенных услуг, активных в какой-то период.
      Parameters:
      contractId - код договора
      serviceIds - коды услуг через запятую
      date1 - начало периода
      date2 - конец периода
      Returns:
      Throws:
      SQLException