Class VoiceAccountDao
java.lang.Object
ru.bitel.bgbilling.kernel.base.server.logger.BGLogger
ru.bitel.common.dao.AbstarctDaoConstant
ru.bitel.common.dao.AbstractDao<B>
ru.bitel.common.dao.AbstractIdDao<E>
ru.bitel.oss.kernel.entity.server.bean.AbstractEntityAttrDao<E>
ru.bitel.oss.kernel.entity.server.bean.AbstractEntityDao<VoiceAccount>
ru.bitel.bgbilling.modules.voice.server.bean.VoiceAccountDao
- All Implemented Interfaces:
AutoCloseable
Добавление/изменение, удаление аккаунтов в БД, получение списка аккаунтов с
фильтрацией.
-
Nested Class Summary
Nested classes/interfaces inherited from class ru.bitel.oss.kernel.entity.server.bean.AbstractEntityAttrDao
AbstractEntityAttrDao.AddressItemModifiedEventListenerNested classes/interfaces inherited from class ru.bitel.common.dao.AbstractDao
ru.bitel.common.dao.AbstractDao.ResultSetIterator -
Field Summary
FieldsFields inherited from class ru.bitel.oss.kernel.entity.server.bean.AbstractEntityAttrDao
CONTRACT_OBJECT_SUPPORT, CONTRACT_SUPPORT, ENTITY_SUPPORT, entitySpecAttrDirectory, entitySpecDirectory, entityTableSuffix, filterWeightComparator, userIdFields inherited from class ru.bitel.common.dao.AbstractDao
cacheFilter, cacheJoin, cacheOrderBy, cachePaged, cachePS, cacheWhat, con, getByIdPS, moduleId, orderByPattern, tableNameFields 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 -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()intdelete(int id) protected intdeleteImpl(int id) voiddeleteList(List<Integer> ids) protected VoiceAccountgetById(int id) protected VoiceAccountprotected VoiceAccountprotected VoiceAccountgetImpl(int id) protected booleanlist()list(int contractId) Получение списка аккаунтов с фильтрацией по коду договораПолучение списка аккаунтов с фильтрацией по коду договора и/или коду устройства.listToCancel(Date now) listToCreate(Date now) voidrelocate(int accountId, int toContractId) protected voidsetContractLoad(boolean contractLoad) voidupdateDeviceState(int accountId, short state, int accessCode) protected voidupdateImpl(VoiceAccount account) Methods inherited from class ru.bitel.oss.kernel.entity.server.bean.AbstractEntityDao
getFromRS, linkEntity, list, list, listImpl, recycle, unlinkEntity, updateMethods 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, updateEntityAttributesMethods inherited from class ru.bitel.common.dao.AbstractIdDao
executeUpdate, get, getAndDelete, getAndUpdate, optMethods inherited from class ru.bitel.common.dao.AbstractDao
delete, eq, get, getListFromRS, getPeriod, getQueryById, getSQLOrder, getTableName, list, listImpl, listImplPS, listImplPS, ormFromResultSet, ormUpdateImpl, ormUpdateImpl, ormUpdateImpl, ormUpdateImpl, processException, setStatementParamMethods inherited from class ru.bitel.common.dao.AbstarctDaoConstant
getSQLOrderMethods inherited from class ru.bitel.bgbilling.kernel.base.server.logger.BGLogger
getLogger, logError
-
Field Details
-
TABLE_VOICE_ACCOUNT
- See Also:
-
-
Constructor Details
-
VoiceAccountDao
-
-
Method Details
-
getFromRS
protected VoiceAccount getFromRS(ResultSet rs) throws SQLException, ru.bitel.bgbilling.common.BGException - Overrides:
getFromRSin classAbstractEntityDao<VoiceAccount>- Throws:
SQLExceptionru.bitel.bgbilling.common.BGException
-
updateImpl
protected void updateImpl(VoiceAccount account) throws ru.bitel.bgbilling.common.BGException, SQLException - Specified by:
updateImplin classru.bitel.common.dao.AbstractDao<VoiceAccount>- Throws:
ru.bitel.bgbilling.common.BGExceptionSQLException
-
list
Получение списка аккаунтов с фильтрацией по коду договора- 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
- 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, short state, int accessCode) throws ru.bitel.bgbilling.common.BGException - Throws:
ru.bitel.bgbilling.common.BGException
-
listToCreate
- Throws:
ru.bitel.bgbilling.common.BGException
-
listToCancel
- Throws:
ru.bitel.bgbilling.common.BGException
-
close
public void close() throws ru.bitel.bgbilling.common.BGException- Specified by:
closein interfaceAutoCloseable- Overrides:
closein classru.bitel.common.dao.AbstractDao<VoiceAccount>- Throws:
ru.bitel.bgbilling.common.BGException
-
getById
- Overrides:
getByIdin classru.bitel.common.dao.AbstractDao<VoiceAccount>- Throws:
ru.bitel.bgbilling.common.BGExceptionSQLException
-
delete
public int delete(int id) throws ru.bitel.bgbilling.common.BGException - Overrides:
deletein classAbstractEntityDao<VoiceAccount>- Throws:
ru.bitel.bgbilling.common.BGException
-
deleteList
- Throws:
ru.bitel.bgbilling.common.BGException
-
deleteImpl
protected int deleteImpl(int id) throws ru.bitel.bgbilling.common.BGException - Overrides:
deleteImplin classru.bitel.common.dao.AbstractDao<VoiceAccount>- Throws:
ru.bitel.bgbilling.common.BGException
-
list
public Result<VoiceAccount> list(long accountId, String login, long number, int typeId, String title, Period period, Page page) throws ru.bitel.bgbilling.common.BGException - Throws:
ru.bitel.bgbilling.common.BGException
-
isContractLoad
protected boolean isContractLoad() -
setContractLoad
protected void setContractLoad(boolean contractLoad) -
getImpl
- Overrides:
getImplin classru.bitel.common.dao.AbstractDao<VoiceAccount>- Throws:
ru.bitel.bgbilling.common.BGExceptionSQLException
-
getFromRSImpl
protected VoiceAccount getFromRSImpl(ResultSet rs) throws SQLException, ru.bitel.bgbilling.common.BGException - Specified by:
getFromRSImplin classAbstractEntityDao<VoiceAccount>- Throws:
SQLExceptionru.bitel.bgbilling.common.BGException
-
relocate
public void relocate(int accountId, int toContractId) throws ru.bitel.bgbilling.common.BGException - Throws:
ru.bitel.bgbilling.common.BGException
-