Class VoiceAccountDao
java.lang.Object
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:
java.lang.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 java.lang.String
TABLE_VOICE_ACCOUNT
Fields inherited from class ru.bitel.oss.kernel.entity.server.bean.AbstractEntityDao
insertEntityPS, updateEntityPS, updateEntityPS2
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_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 VoiceAccountDao(java.sql.Connection con, int moduleId)
-
Method Summary
Modifier and Type Method Description void
close()
int
delete(int id)
protected int
deleteImpl(int id)
void
deleteList(java.util.List<java.lang.Integer> ids)
protected VoiceAccount
getById(int id)
protected VoiceAccount
getFromRS(java.sql.ResultSet rs)
protected VoiceAccount
getFromRSImpl(java.sql.ResultSet rs)
protected VoiceAccount
getImpl(int id)
protected boolean
isContractLoad()
java.util.List<VoiceAccount>
list()
java.util.List<VoiceAccount>
list(int contractId)
Получение списка аккаунтов с фильтрацией по коду договораjava.util.List<VoiceAccount>
list(int contractId, int deviceId, Period period)
Получение списка аккаунтов с фильтрацией по коду договора и/или коду устройства.Result<VoiceAccount>
list(long accountId, java.lang.String login, long number, int typeId, java.lang.String title, Period period, Page page)
java.util.List<VoiceAccount>
list(java.lang.String login, java.util.Date dateFrom, java.util.Date dateTo)
java.util.List<VoiceAccount>
listToCancel(java.util.Date now)
java.util.List<VoiceAccount>
listToCreate(java.util.Date now)
protected void
setContractLoad(boolean contractLoad)
void
updateDeviceState(int accountId, short 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, recycle, unlinkEntity, update
Methods inherited from class ru.bitel.oss.kernel.entity.server.bean.AbstractEntityAttrDao
checkEntityAttribute, checkEntitySpecAttrDelete, deleteEntityAttributes, filterInit, filterJoin, filterToPS, getAllEntityAttributes, getAttribute, getEntityAttribute, getEntityAttributes, getEntitySpecAttrDirectory, getEntitySpecDirectory, getEntityTableName, getEntityTableSuffix, getEntityValueForIds, listImpl, onAddressItemUpdate, updateEntityAttribute, updateEntityAttributes
Methods inherited from class ru.bitel.common.dao.AbstractIdDao
get, getAndDelete, getAndUpdate
Methods 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, 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
-
Field Details
-
TABLE_VOICE_ACCOUNT
public static final java.lang.String TABLE_VOICE_ACCOUNT- See Also:
- Constant Field Values
-
-
Constructor Details
-
VoiceAccountDao
public VoiceAccountDao(java.sql.Connection con, int moduleId)
-
-
Method Details
-
getFromRS
protected VoiceAccount getFromRS(java.sql.ResultSet rs) throws java.sql.SQLException, ru.bitel.bgbilling.common.BGException- Overrides:
getFromRS
in classAbstractEntityDao<VoiceAccount>
- Throws:
java.sql.SQLException
ru.bitel.bgbilling.common.BGException
-
updateImpl
protected void updateImpl(VoiceAccount account) throws ru.bitel.bgbilling.common.BGException, java.sql.SQLException- Specified by:
updateImpl
in classru.bitel.common.dao.AbstractDao<VoiceAccount>
- Throws:
ru.bitel.bgbilling.common.BGException
java.sql.SQLException
-
list
public java.util.List<VoiceAccount> list(int contractId) throws ru.bitel.bgbilling.common.BGExceptionПолучение списка аккаунтов с фильтрацией по коду договора- Parameters:
contractId
- код договора.- Returns:
- список аккаунтов.
- Throws:
ru.bitel.bgbilling.common.BGException
- возникает при ошибках в sql-запросе и/или проблемах с соединением с БД.
-
list
public java.util.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 java.util.List<VoiceAccount> list(java.lang.String login, java.util.Date dateFrom, java.util.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
public java.util.List<VoiceAccount> listToCreate(java.util.Date now) throws ru.bitel.bgbilling.common.BGException- Throws:
ru.bitel.bgbilling.common.BGException
-
listToCancel
public java.util.List<VoiceAccount> listToCancel(java.util.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 interfacejava.lang.AutoCloseable
- Overrides:
close
in classru.bitel.common.dao.AbstractDao<VoiceAccount>
- Throws:
ru.bitel.bgbilling.common.BGException
-
getById
protected VoiceAccount getById(int id) throws ru.bitel.bgbilling.common.BGException, java.sql.SQLException- Overrides:
getById
in classru.bitel.common.dao.AbstractDao<VoiceAccount>
- Throws:
ru.bitel.bgbilling.common.BGException
java.sql.SQLException
-
delete
public int delete(int id) throws ru.bitel.bgbilling.common.BGException- Overrides:
delete
in classAbstractEntityDao<VoiceAccount>
- Throws:
ru.bitel.bgbilling.common.BGException
-
deleteList
public void deleteList(java.util.List<java.lang.Integer> ids) throws ru.bitel.bgbilling.common.BGException- Throws:
ru.bitel.bgbilling.common.BGException
-
deleteImpl
protected int deleteImpl(int id) throws ru.bitel.bgbilling.common.BGException, java.sql.SQLException- Overrides:
deleteImpl
in classru.bitel.common.dao.AbstractDao<VoiceAccount>
- Throws:
ru.bitel.bgbilling.common.BGException
java.sql.SQLException
-
list
public Result<VoiceAccount> list(long accountId, java.lang.String login, long number, int typeId, java.lang.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
protected VoiceAccount getImpl(int id) throws ru.bitel.bgbilling.common.BGException, java.sql.SQLException- Overrides:
getImpl
in classru.bitel.common.dao.AbstractDao<VoiceAccount>
- Throws:
ru.bitel.bgbilling.common.BGException
java.sql.SQLException
-
getFromRSImpl
protected VoiceAccount getFromRSImpl(java.sql.ResultSet rs) throws java.sql.SQLException, ru.bitel.bgbilling.common.BGException- Specified by:
getFromRSImpl
in classAbstractEntityDao<VoiceAccount>
- Throws:
java.sql.SQLException
ru.bitel.bgbilling.common.BGException
-