Package ru.bitel.bgbilling.modules.voice.server.bean

# Class VoiceAccountDao

java.lang.Object
ru.bitel.bgbilling.kernel.base.server.logger.BGLogger
ru.bitel.common.dao.AbstarctDaoConstant
ru.bitel.common.dao.AbstractDao<VoiceAccount>
ru.bitel.common.dao.AbstractIdDao<VoiceAccount>
ru.bitel.oss.kernel.entity.server.bean.AbstractEntityAttrDao<VoiceAccount>
ru.bitel.oss.kernel.entity.server.bean.AbstractEntityDao<VoiceAccount>
ru.bitel.bgbilling.modules.voice.server.bean.VoiceAccountDao

All Implemented Interfaces:
  `AutoCloseable`

public class VoiceAccountDao extends AbstractEntityDao<VoiceAccount>
Добавление/изменение, удаление аккаунтов в БД, получение списка аккаунтов с фильтрацией.

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from class ru.bitel.oss.kernel.entity.server.bean.AbstractEntityAttrDao

  `AbstractEntityAttrDao.AddressItemModifiedEventListener`

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

  `ru.bitel.common.dao.AbstractDao.ResultSetIterator`

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `TABLE_VOICE_ACCOUNT`

  ### Fields inherited from class ru.bitel.oss.kernel.entity.server.bean.AbstractEntityAttrDao

  `CONTRACT_OBJECT_SUPPORT, CONTRACT_SUPPORT, ENTITY_SUPPORT, entitySpecAttrDirectory, entitySpecDirectory, entityTableSuffix, filterWeightComparator, userId`

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

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

  ### Fields inherited from class ru.bitel.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
  `VoiceAccountDao(Connection con, int moduleId)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `close()`
  `int`
  `delete(int id)`
  `protected int`
  `deleteImpl(int id)`
  `void`
  `deleteList(List<Integer> ids)`
  `protected VoiceAccount`
  `getById(int id)`
  `protected VoiceAccount`
  `getFromRS(ResultSet rs)`
  `protected VoiceAccount`
  `getFromRSImpl(ResultSet rs)`
  `protected VoiceAccount`
  `getImpl(int id)`
  `protected boolean`
  `isContractLoad()`
  `List<VoiceAccount>`
  `list()`
  `List<VoiceAccount>`
  `list(int contractId)`
  Получение списка аккаунтов с фильтрацией по коду договора
  `List<VoiceAccount>`
  `list(int contractId, int deviceId, Period period)`
  Получение списка аккаунтов с фильтрацией по коду договора и/или коду устройства.
  `List<VoiceAccount>`
  `list(String login, Date dateFrom, Date dateTo)`
  `Result<VoiceAccount>`
  `list(VoiceAccountSearchParam searchParam, Page page)`
  `List<VoiceAccount>`
  `listToCancel(Date now)`
  `List<VoiceAccount>`
  `listToCreate(Date now)`
  `void`
  `relocate(int accountId, int toContractId)`
  `protected void`
  `setContractLoad(boolean contractLoad)`
  `void`
  `updateDeviceState(int accountId, VoiceAccountState state, int accessCode)`
  `protected void`
  `updateImpl(VoiceAccount account)`

  ### Methods inherited from class ru.bitel.oss.kernel.entity.server.bean.AbstractEntityDao

  `getFromRS, linkEntity, list, list, listImpl, unlinkEntity, update`

  ### Methods inherited from class ru.bitel.oss.kernel.entity.server.bean.AbstractEntityAttrDao

  `checkEntityAttribute, checkEntitySpecAttrDelete, deleteEntityAttribute, deleteEntityAttributes, filterInit, filterJoin, filterToPS, getAllEntityAttributes, getAttribute, getEntityAttribute, getEntityAttributes, getEntityAttributes, getEntitySpecAttrDirectory, getEntitySpecDirectory, getEntityTableName, getEntityTableSuffix, getEntityValueForIds, listImpl, onAddressItemUpdate, optEntityAttribute, updateEntityAttribute, updateEntityAttributes`

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

  `executeUpdate, get, getAndDelete, getAndUpdate, opt`

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

  `delete, dropTemporaryTable, eq, get, getListFromRS, getPeriod, getQueryById, getSQLOrder, getTableName, list, listImpl, listImplPS, listImplPS, loadData, ormFromResultSet, ormUpdateImpl, ormUpdateImpl, ormUpdateImpl, ormUpdateImpl, processException, setPageRecordCount, setStatementParam`

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

  `getSQLOrder, psSetDate, psSetInt, psSetString, 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`

- ## Field Details

  - ### TABLE_VOICE_ACCOUNT

    public static final String TABLE_VOICE_ACCOUNT
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### VoiceAccountDao

    public VoiceAccountDao(Connection con, int moduleId)

- ## Method Details

  - ### getFromRS

    protected VoiceAccount getFromRS(ResultSet rs) throws SQLException, ru.bitel.bgbilling.common.BGException
    Overrides:
      `getFromRS` in class `AbstractEntityDao<VoiceAccount>`
    Throws:
      `SQLException`
      `ru.bitel.bgbilling.common.BGException`

  - ### updateImpl

    protected void updateImpl(VoiceAccount account) throws ru.bitel.bgbilling.common.BGException, SQLException
    Specified by:
      `updateImpl` in class `ru.bitel.common.dao.AbstractDao<VoiceAccount>`
    Throws:
      `ru.bitel.bgbilling.common.BGException`
      `SQLException`

  - ### list

    public List<VoiceAccount> list(int contractId) throws ru.bitel.bgbilling.common.BGException
    Получение списка аккаунтов с фильтрацией по коду договора
    Parameters:
      `contractId` - код договора.
    Returns:
      список аккаунтов.
    Throws:
      `ru.bitel.bgbilling.common.BGException` - возникает при ошибках в sql-запросе и/или проблемах с соединением с БД.

  - ### list

    public List<VoiceAccount> list(int contractId, int deviceId, Period period) throws ru.bitel.bgbilling.common.BGException
    Получение списка аккаунтов с фильтрацией по коду договора и/или коду устройства.
    Parameters:
      `contractId` - код договора.
    Returns:
      список аккаунтов.
    Throws:
      `ru.bitel.bgbilling.common.BGException` - возникает при ошибках в sql-запросе и/или проблемах с соединением с БД.

  - ### list

    public List<VoiceAccount> list() throws ru.bitel.bgbilling.common.BGException
    Throws:
      `ru.bitel.bgbilling.common.BGException`

  - ### list

    public List<VoiceAccount> list(String login, Date dateFrom, Date dateTo) throws ru.bitel.bgbilling.common.BGException
    Throws:
      `ru.bitel.bgbilling.common.BGException`

  - ### updateDeviceState

    public void updateDeviceState(int accountId, VoiceAccountState state, int accessCode) throws ru.bitel.bgbilling.common.BGException
    Throws:
      `ru.bitel.bgbilling.common.BGException`

  - ### listToCreate

    public List<VoiceAccount> listToCreate(Date now) throws ru.bitel.bgbilling.common.BGException
    Throws:
      `ru.bitel.bgbilling.common.BGException`

  - ### listToCancel

    public List<VoiceAccount> listToCancel(Date now) throws ru.bitel.bgbilling.common.BGException
    Throws:
      `ru.bitel.bgbilling.common.BGException`

  - ### close

    public void close() throws ru.bitel.bgbilling.common.BGException
    Specified by:
      `close` in interface `AutoCloseable`
    Overrides:
      `close` in class `ru.bitel.common.dao.AbstractDao<VoiceAccount>`
    Throws:
      `ru.bitel.bgbilling.common.BGException`

  - ### getById

    protected VoiceAccount getById(int id) throws ru.bitel.bgbilling.common.BGException, SQLException
    Overrides:
      `getById` in class `ru.bitel.common.dao.AbstractDao<VoiceAccount>`
    Throws:
      `ru.bitel.bgbilling.common.BGException`
      `SQLException`

  - ### delete

    public int delete(int id) throws ru.bitel.bgbilling.common.BGException, SQLException
    Overrides:
      `delete` in class `AbstractEntityDao<VoiceAccount>`
    Throws:
      `ru.bitel.bgbilling.common.BGException`
      `SQLException`

  - ### deleteList

    public void deleteList(List<Integer> ids) throws ru.bitel.bgbilling.common.BGException, SQLException
    Throws:
      `ru.bitel.bgbilling.common.BGException`
      `SQLException`

  - ### deleteImpl

    protected int deleteImpl(int id) throws ru.bitel.bgbilling.common.BGException, SQLException
    Overrides:
      `deleteImpl` in class `ru.bitel.common.dao.AbstractDao<VoiceAccount>`
    Throws:
      `ru.bitel.bgbilling.common.BGException`
      `SQLException`

  - ### list

    public Result<VoiceAccount> list(VoiceAccountSearchParam searchParam, Page page) throws Exception
    Throws:
      `Exception`

  - ### isContractLoad

    protected boolean isContractLoad()

  - ### setContractLoad

    protected void setContractLoad(boolean contractLoad)

  - ### getImpl

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

  - ### getFromRSImpl

    protected VoiceAccount getFromRSImpl(ResultSet rs) throws SQLException, ru.bitel.bgbilling.common.BGException
    Specified by:
      `getFromRSImpl` in class `AbstractEntityDao<VoiceAccount>`
    Throws:
      `SQLException`
      `ru.bitel.bgbilling.common.BGException`

  - ### relocate

    public void relocate(int accountId, int toContractId) throws ru.bitel.bgbilling.common.BGException
    Throws:
      `ru.bitel.bgbilling.common.BGException`