Class ContractModuleManager

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

public class ContractModuleManager extends ru.bitel.bgbilling.common.dao.AbstarctDaoConstant
  • Field Summary

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

    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
    addContractModule(int contractId, int moduleId)
    Добавляет экземпляр модуля к договору в БД.
    void
    deleteContractModule(int contractId, int moduleId)
    Удаляет экземпляр модуля из договора в БД.
    Возвращает Map с кодами экземпляров модулей договора от ид_договоров.
    getContractModules(int contractId)
    Возвращает список экземпляров модулей договора с сортировкой по названию.
    getContractModuleSet(int contractId)
    Возвращает Set с кодами экземпляров модулей договора.

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

    getPeriod, getSQLOrder, getTableName, sqlLimit

    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

    • ContractModuleManager

      public ContractModuleManager(Connection con)
  • Method Details

    • getContractModules

      public List<BGModule> getContractModules(int contractId) throws SQLException
      Возвращает список экземпляров модулей договора с сортировкой по названию. Использует ModuleCache.
      Parameters:
      contractId -
      Returns:
      Throws:
      ru.bitel.bgbilling.common.BGException
      SQLException
    • getContractModuleSet

      public Set<Integer> getContractModuleSet(int contractId) throws SQLException
      Возвращает Set с кодами экземпляров модулей договора.
      Parameters:
      contractId -
      Returns:
      Throws:
      ru.bitel.bgbilling.common.BGException
      SQLException
    • getContractModuleMap

      public Map<Integer,Set<Integer>> getContractModuleMap() throws SQLException
      Возвращает Map с кодами экземпляров модулей договора от ид_договоров. cid=>set[mid,...] ВНИМАНИЕ: в общем случае для крупных клиентов получается СЛИШКОМ большая структура, такое нельзя использовать, лучше сделать больше запросов или джойн.
      Parameters:
      contractId -
      Returns:
      Throws:
      ru.bitel.bgbilling.common.BGException
      SQLException
    • addContractModule

      public void addContractModule(int contractId, int moduleId) throws SQLException
      Добавляет экземпляр модуля к договору в БД.
      Parameters:
      contractId -
      moduleId -
      Throws:
      ru.bitel.bgbilling.common.BGException
      SQLException
    • deleteContractModule

      public void deleteContractModule(int contractId, int moduleId) throws SQLException, ru.bitel.bgbilling.common.BGException
      Удаляет экземпляр модуля из договора в БД.
      Parameters:
      contractId -
      moduleId -
      Throws:
      ru.bitel.bgbilling.common.BGException
      SQLException