Class DeviceDao<D extends Device<D,T>,T extends DeviceType>
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<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.AddressItemModifiedEventListener
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.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
ConstructorDescriptionDeviceDao
(Connection con, int moduleId, int userId, String tableName, EntityAttrDaoSupport entityAttrDaoSupport) -
Method Summary
Modifier and TypeMethodDescriptionprotected int
deleteImpl
(int id) static <T extends DeviceType,
D extends Device<D, T>>
voidgetFromRS
(ResultSet rs, Directory<T> deviceTypeDir, T folderType, PreparedStatement getGroupsPS, D result) protected D
protected D
getTreeFromList
(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) void
protected abstract D
protected abstract T
newDeviceType
(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
(String identifier, String host, Set<Integer> deviceTypeIds, Set<Integer> deviceGroupIds, Date dateFrom, Date dateTo, Date intersectDateFrom, Date intersectDateTo, List<FilterEntityAttr> entityFilter, boolean loadDeviceGroupLink) protected int
setExtraParams
(D device, PreparedStatement ps, int idx) void
protected void
updateImpl
(D b) void
updateUptime
(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, recycle, unlinkEntity
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
close, delete, eq, get, getById, getImpl, getListFromRS, getLogger, 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
-
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:
getFromRSImpl
in classAbstractEntityDao<D extends Device<D,
T>> - Throws:
SQLException
ru.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:
SQLException
ru.bitel.bgbilling.common.BGException
-
update
-
updateImpl
- Specified by:
updateImpl
in classru.bitel.common.dao.AbstractDao<D extends Device<D,
T>> - Throws:
ru.bitel.bgbilling.common.BGException
SQLException
-
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
public D root(String identifier, String host, Set<Integer> deviceTypeIds, Set<Integer> deviceGroupIds, Date dateFrom, Date dateTo, Date intersectDateFrom, Date intersectDateTo, List<FilterEntityAttr> entityFilter, boolean loadDeviceGroupLink) throws ru.bitel.bgbilling.common.BGException - 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
-