Class DeviceDao<D extends Device<D,T>,T extends DeviceType>
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<D>
ru.bitel.oss.systems.inventory.resource.server.bean.DeviceDao<D,T>
- All Implemented Interfaces:
AutoCloseable
- Direct Known Subclasses:
InvDeviceDao,TvDeviceDao,VoiceDeviceDao
public abstract class DeviceDao<D extends Device<D,T>,T extends DeviceType>
extends AbstractEntityDao<D>
-
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
ConstructorsConstructorDescriptionDeviceDao(Connection con, int moduleId, int userId, String tableName, EntityAttrDaoSupport entityAttrDaoSupport) -
Method Summary
Modifier and TypeMethodDescriptionprotected intdeleteImpl(int id) static <T extends DeviceType,D extends Device<D, T>>
voidgetFromRS(ResultSet rs, Directory<T> deviceTypeDir, T folderType, PreparedStatement getGroupsPS, D result) protected Dprotected DgetTreeFromList(List<D> deviceList, int deviceId) list(int deviceTypeId, boolean loadDeviceGroupLink) list(List<FilterEntityAttr> entityFilter, boolean loadDeviceGroupLink) listByType(int deviceTypeId, boolean loadDeviceGroupLink) listByUptimeTime(Date uptimeTime, String orderBy, Page page) voidprotected abstract Dprotected abstract TnewDeviceType(int id, String title) node(List<FilterEntityAttr> entityFilter, int deviceId, boolean loadDeviceGroupLink) node(List<FilterEntityAttr> entityFilter, int deviceId, String filter, boolean loadDeviceGroupLink) root(String identifier, String host, int deviceType, Set<Integer> deviceGroupIds, List<FilterEntityAttr> entityFilter) Deprecated.root(DeviceTreeFilter deviceTreeFilter) protected intsetExtraParams(D device, PreparedStatement ps, int idx) voidprotected voidupdateImpl(D b) voidupdateUptime(int id, String uptime, Date uptimeTime) Methods inherited from class ru.bitel.oss.kernel.entity.server.bean.AbstractEntityDao
delete, getFromRS, getFromRS, linkEntity, list, list, listImpl, unlinkEntityMethods 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
close, delete, eq, get, getById, getImpl, 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
error, error, error, getLogger, logError, logError, warn
-
Field Details
-
TABLE_INV_DEVICE_GROUP_LINK
-
-
Constructor Details
-
DeviceDao
public DeviceDao(Connection con, int moduleId, int userId, String tableName, EntityAttrDaoSupport entityAttrDaoSupport) throws ru.bitel.bgbilling.common.BGException - Throws:
ru.bitel.bgbilling.common.BGException
-
-
Method Details
-
newDevice
-
newDeviceType
-
getTypeDir
- Throws:
ru.bitel.bgbilling.common.BGException
-
getFromRSImpl
- Specified by:
getFromRSImplin classAbstractEntityDao<D extends Device<D,T>> - Throws:
SQLExceptionru.bitel.bgbilling.common.BGException
-
getFromRS
public static <T extends DeviceType,D extends Device<D, void getFromRST>> (ResultSet rs, Directory<T> deviceTypeDir, T folderType, PreparedStatement getGroupsPS, D result) throws SQLException, ru.bitel.bgbilling.common.BGException - Throws:
SQLExceptionru.bitel.bgbilling.common.BGException
-
update
-
updateImpl
- Specified by:
updateImplin classru.bitel.common.dao.AbstractDao<D extends Device<D,T>> - Throws:
ru.bitel.bgbilling.common.BGExceptionSQLException
-
setExtraParams
- Throws:
SQLException
-
getValues
-
list
public List<D> list(List<FilterEntityAttr> entityFilter, boolean loadDeviceGroupLink) throws ru.bitel.bgbilling.common.BGException - Throws:
ru.bitel.bgbilling.common.BGException
-
list
public List<D> list(int deviceTypeId, boolean loadDeviceGroupLink) throws ru.bitel.bgbilling.common.BGException - Throws:
ru.bitel.bgbilling.common.BGException
-
root
@Deprecated public D root(String identifier, String host, int deviceType, Set<Integer> deviceGroupIds, List<FilterEntityAttr> entityFilter) throws ru.bitel.bgbilling.common.BGException Deprecated.- Throws:
ru.bitel.bgbilling.common.BGException
-
root
- Parameters:
identifier-host-deviceType- -1 - любой, 0-папка или код типа устройстваdeviceGroupIds-entityFilter-- Returns:
- Throws:
ru.bitel.bgbilling.common.BGException
-
node
public D node(List<FilterEntityAttr> entityFilter, int deviceId, boolean loadDeviceGroupLink) throws ru.bitel.bgbilling.common.BGException - Throws:
ru.bitel.bgbilling.common.BGException
-
node
public D node(List<FilterEntityAttr> entityFilter, int deviceId, String filter, boolean loadDeviceGroupLink) throws ru.bitel.bgbilling.common.BGException - Throws:
ru.bitel.bgbilling.common.BGException
-
getTreeFromList
-
move
public void move(int newParentId, Set<Integer> children) throws ru.bitel.bgbilling.common.BGException - Throws:
ru.bitel.bgbilling.common.BGException
-
updateUptime
public void updateUptime(int id, String uptime, Date uptimeTime) throws ru.bitel.bgbilling.common.BGException - Throws:
ru.bitel.bgbilling.common.BGException
-
listByUptimeTime
public List<D> listByUptimeTime(Date uptimeTime, String orderBy, Page page) throws ru.bitel.bgbilling.common.BGException - Throws:
ru.bitel.bgbilling.common.BGException
-
listByType
public List<D> listByType(int deviceTypeId, boolean loadDeviceGroupLink) throws ru.bitel.bgbilling.common.BGException - Throws:
ru.bitel.bgbilling.common.BGException
-
deleteImpl
protected int deleteImpl(int id) throws ru.bitel.bgbilling.common.BGException
-