public abstract class DeviceDao<D extends Device<D,T>,T extends DeviceType> extends AbstractEntityDao<D>
AbstractEntityAttrDao.AddressItemModifiedEventListener
getImplPS, insertEntityPS, updateEntityPS, updateEntityPS2
CONTRACT_OBJECT_SUPPORT, CONTRACT_SUPPORT, ENTITY_SUPPORT, entitySpecAttrDirectory, entitySpecDirectory, filterWeightComparator, userId
Constructor and Description |
---|
DeviceDao(java.sql.Connection con,
int mid,
int userId,
java.lang.String tableName,
boolean groupLink) |
Modifier and Type | Method and Description |
---|---|
protected int |
deleteImpl(int id) |
static <T extends DeviceType,D extends Device<D,T>> |
getFromRS(java.sql.ResultSet rs,
Directory<T> deviceTypeDir,
T folderType,
java.sql.PreparedStatement getGroupsPS,
D result) |
protected D |
getFromRSImpl(java.sql.ResultSet rs) |
protected D |
getTreeFromList(java.util.List<D> deviceList,
int deviceId) |
protected abstract Directory<T> |
getTypeDir() |
protected java.util.List<java.lang.String> |
getValues() |
java.util.List<D> |
list(int deviceTypeId,
boolean loadDeviceGroupLink) |
java.util.List<D> |
list(java.util.List<FilterEntityAttr> entityFilter,
boolean loadDeviceGroupLink) |
java.util.List<D> |
listByType(int deviceTypeId,
boolean loadDeviceGroupLink) |
java.util.List<D> |
listByUptimeTime(java.util.Date uptimeTime,
java.lang.String orderBy,
Page page) |
void |
move(int newParentId,
java.util.Set<java.lang.Integer> children) |
protected abstract D |
newDevice() |
protected abstract T |
newDeviceType(int id,
java.lang.String title) |
D |
node(java.util.List<FilterEntityAttr> entityFilter,
int deviceId,
boolean loadDeviceGroupLink) |
D |
node(java.util.List<FilterEntityAttr> entityFilter,
int deviceId,
java.lang.String filter,
boolean loadDeviceGroupLink) |
D |
root(java.lang.String identifier,
java.lang.String host,
int deviceType,
java.util.Set<java.lang.Integer> deviceGroupIds,
java.util.List<FilterEntityAttr> entityFilter)
Deprecated.
|
D |
root(java.lang.String identifier,
java.lang.String host,
java.util.Set<java.lang.Integer> deviceTypeIds,
java.util.Set<java.lang.Integer> deviceGroupIds,
java.util.Date dateFrom,
java.util.Date dateTo,
java.util.Date intersectDateFrom,
java.util.Date intersectDateTo,
java.util.List<FilterEntityAttr> entityFilter,
boolean loadDeviceGroupLink) |
protected int |
setExtraParams(D device,
java.sql.PreparedStatement ps,
int idx) |
void |
update(D b) |
protected void |
updateImpl(D b) |
void |
updateUptime(int id,
java.lang.String uptime,
java.util.Date uptimeTime) |
getFromRS, getImpl, linkEntity, list, list, listImpl, recycle, unlinkEntity
checkEntityAttribute, checkEntitySpecAttrDelete, filterInit, filterJoin, filterToPS, getAllEntityAttributes, getAttribute, getEntityAttribute, getEntityAttributes, getEntitySpecAttrDirectory, getEntitySpecDirectory, getEntityTableName, getEntityValueForIds, getFromRS, listImpl, onAddressItemUpdate, updateEntityAttribute, updateEntityAttributes
delete, get, getAndDelete, getAndUpdate
public DeviceDao(java.sql.Connection con, int mid, int userId, java.lang.String tableName, boolean groupLink) throws ru.bitel.bgbilling.common.BGException
ru.bitel.bgbilling.common.BGException
protected abstract D newDevice()
protected abstract T newDeviceType(int id, java.lang.String title)
protected abstract Directory<T> getTypeDir() throws ru.bitel.bgbilling.common.BGException
ru.bitel.bgbilling.common.BGException
protected D getFromRSImpl(java.sql.ResultSet rs) throws java.sql.SQLException, ru.bitel.bgbilling.common.BGException
getFromRSImpl
in class AbstractEntityDao<D extends Device<D,T>>
java.sql.SQLException
ru.bitel.bgbilling.common.BGException
public static <T extends DeviceType,D extends Device<D,T>> void getFromRS(java.sql.ResultSet rs, Directory<T> deviceTypeDir, T folderType, java.sql.PreparedStatement getGroupsPS, D result) throws java.sql.SQLException, ru.bitel.bgbilling.common.BGException
java.sql.SQLException
ru.bitel.bgbilling.common.BGException
public void update(D b) throws ru.bitel.bgbilling.common.BGException
protected void updateImpl(D b) throws ru.bitel.bgbilling.common.BGException, java.sql.SQLException
protected int setExtraParams(D device, java.sql.PreparedStatement ps, int idx) throws java.sql.SQLException
java.sql.SQLException
protected java.util.List<java.lang.String> getValues()
public java.util.List<D> list(java.util.List<FilterEntityAttr> entityFilter, boolean loadDeviceGroupLink) throws ru.bitel.bgbilling.common.BGException
ru.bitel.bgbilling.common.BGException
public java.util.List<D> list(int deviceTypeId, boolean loadDeviceGroupLink) throws ru.bitel.bgbilling.common.BGException
ru.bitel.bgbilling.common.BGException
@Deprecated public D root(java.lang.String identifier, java.lang.String host, int deviceType, java.util.Set<java.lang.Integer> deviceGroupIds, java.util.List<FilterEntityAttr> entityFilter) throws ru.bitel.bgbilling.common.BGException
ru.bitel.bgbilling.common.BGException
public D root(java.lang.String identifier, java.lang.String host, java.util.Set<java.lang.Integer> deviceTypeIds, java.util.Set<java.lang.Integer> deviceGroupIds, java.util.Date dateFrom, java.util.Date dateTo, java.util.Date intersectDateFrom, java.util.Date intersectDateTo, java.util.List<FilterEntityAttr> entityFilter, boolean loadDeviceGroupLink) throws ru.bitel.bgbilling.common.BGException
identifier
- host
- deviceType
- -1 - любой, 0-папка или код типа устройстваdeviceGroupIds
- entityFilter
- ru.bitel.bgbilling.common.BGException
public D node(java.util.List<FilterEntityAttr> entityFilter, int deviceId, boolean loadDeviceGroupLink) throws ru.bitel.bgbilling.common.BGException
ru.bitel.bgbilling.common.BGException
public D node(java.util.List<FilterEntityAttr> entityFilter, int deviceId, java.lang.String filter, boolean loadDeviceGroupLink) throws ru.bitel.bgbilling.common.BGException
ru.bitel.bgbilling.common.BGException
public void move(int newParentId, java.util.Set<java.lang.Integer> children) throws ru.bitel.bgbilling.common.BGException
ru.bitel.bgbilling.common.BGException
public void updateUptime(int id, java.lang.String uptime, java.util.Date uptimeTime) throws ru.bitel.bgbilling.common.BGException
ru.bitel.bgbilling.common.BGException
public java.util.List<D> listByUptimeTime(java.util.Date uptimeTime, java.lang.String orderBy, Page page) throws ru.bitel.bgbilling.common.BGException
ru.bitel.bgbilling.common.BGException
public java.util.List<D> listByType(int deviceTypeId, boolean loadDeviceGroupLink) throws ru.bitel.bgbilling.common.BGException
ru.bitel.bgbilling.common.BGException
protected int deleteImpl(int id) throws ru.bitel.bgbilling.common.BGException
deleteImpl
in class AbstractEntityDao<D extends Device<D,T>>
ru.bitel.bgbilling.common.BGException