Class VoiceCostMapItemDao

java.lang.Object
ru.bitel.common.dao.AbstarctDaoConstant
ru.bitel.common.dao.AbstractDao<B>
ru.bitel.common.dao.AbstractIdDao<VoiceCostMapItem>
ru.bitel.bgbilling.modules.voice.server.bean.code.VoiceCostMapItemDao
All Implemented Interfaces:
AutoCloseable

public class VoiceCostMapItemDao extends ru.bitel.common.dao.AbstractIdDao<VoiceCostMapItem>
  • Nested Class Summary

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

    ru.bitel.common.dao.AbstractDao.ResultSetIterator
  • Field Summary

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

    cacheFilter, cacheJoin, cacheOrderBy, cachePaged, cachePS, cacheWhat, con, getByIdPS, logger, moduleId, orderByPattern, tableName

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

    ERROR, fields, SQL_CALC_FOUND_ROWS, SQL_DELETE, SQL_DISTINCT, SQL_EQ, SQL_EQCS, SQL_FROM, SQL_GROUP, SQL_IN, SQL_INSERT, SQL_LIMIT, SQL_ON_DUPLICATE_KEY_UPDATE, SQL_ORDER, SQL_SELECT, SQL_SET, SQL_UPDATE, SQL_VALUES, SQL_WHERE
  • Constructor Summary

    Constructors
    Constructor
    Description
    VoiceCostMapItemDao(Connection con, int moduleId)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    codeMap(int codeId, int costMapId)
     
    void
    deleteByMapId(int id)
     
     
    getImpl(int id)
     
    list(int codeId, int costMapId)
    Получение списка всех элементов определенной карты цен на все даты
    list(int costMapId, Date date)
    Получение списка элементов определенной карты цен на определенную дату с подгрузкой названий геокодов и направлений.
    void
     
    void
    Запись истории изменений карты цен.
    protected void
     

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

    delete, get, getAndDelete, getAndUpdate

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

    close, delete, deleteImpl, eq, get, getById, getListFromRS, getPeriod, getQueryById, getSQLOrder, getTableName, list, list, listImpl, listImpl, listImplPS, listImplPS, ormFromResultSet, ormUpdateImpl, ormUpdateImpl, ormUpdateImpl, ormUpdateImpl, processException, recycle, setStatementParam

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

    getSQLOrder

    Methods inherited from class java.lang.Object

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

    • VoiceCostMapItemDao

      public VoiceCostMapItemDao(Connection con, int moduleId)
  • Method Details

    • getFromRS

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

      protected VoiceCostMapItem getImpl(int id) throws ru.bitel.bgbilling.common.BGException, SQLException
      Overrides:
      getImpl in class ru.bitel.common.dao.AbstractDao<VoiceCostMapItem>
      Throws:
      ru.bitel.bgbilling.common.BGException
      SQLException
    • update

      public void update(VoiceCostMapItem item) throws ru.bitel.bgbilling.common.BGException
      Overrides:
      update in class ru.bitel.common.dao.AbstractDao<VoiceCostMapItem>
      Throws:
      ru.bitel.bgbilling.common.BGException
    • updateImpl

      protected void updateImpl(VoiceCostMapItem item) throws ru.bitel.bgbilling.common.BGException, SQLException
      Specified by:
      updateImpl in class ru.bitel.common.dao.AbstractDao<VoiceCostMapItem>
      Throws:
      ru.bitel.bgbilling.common.BGException
      SQLException
    • list

      public List<VoiceCostMapItem> list(int costMapId, Date date) throws ru.bitel.bgbilling.common.BGException
      Получение списка элементов определенной карты цен на определенную дату с подгрузкой названий геокодов и направлений.
      Parameters:
      costMapId - код карты цен, элементы которой необходимо получить
      date - дата, на которую нужно получить список элементов карты цен.
      Returns:
      Throws:
      ru.bitel.bgbilling.common.BGException
    • list

      public List<VoiceCostMapItem> list(int codeId, int costMapId) throws ru.bitel.bgbilling.common.BGException
      Получение списка всех элементов определенной карты цен на все даты
      Parameters:
      costMapId - код карты цен, элементы которой необходимо получить
      date - дата, на которую нужно получить список элементов карты цен.
      Returns:
      Throws:
      ru.bitel.bgbilling.common.BGException
    • deleteByMapId

      public void deleteByMapId(int id) throws ru.bitel.bgbilling.common.BGException
      Throws:
      ru.bitel.bgbilling.common.BGException
    • codeMap

      public Map<Integer,List<VoiceCostMapItem>> codeMap(int codeId, int costMapId) throws ru.bitel.bgbilling.common.BGException
      Throws:
      ru.bitel.bgbilling.common.BGException
    • updateHistory

      public void updateHistory(List<VoiceCostMapItem> itemHistory) throws ru.bitel.bgbilling.common.BGException
      Запись истории изменений карты цен. Заключается в полном удалении имеющихся записей и записью тех, что пришли в запросе от клиента.
      Parameters:
      itemHistory - список изменений цен для кода, в котором могло поменяться направление и даты
      Throws:
      ru.bitel.bgbilling.common.BGException