public class IpResourceSubscriptionDao extends ru.bitel.common.dao.AbstractIdDao<IpResourceSubscription>
Modifier | Constructor and Description |
---|---|
|
IpResourceSubscriptionDao(java.sql.Connection con,
int mid) |
protected |
IpResourceSubscriptionDao(java.sql.Connection con,
int mid,
java.lang.String tableName) |
Modifier and Type | Method and Description |
---|---|
int |
deleteBySubsciberId(int subscriberId) |
java.lang.Object[] |
findFree(java.util.Collection<java.lang.Integer> ipResourceCategoryIds,
int ipResourceId,
byte[] addressFrom,
byte[] addressTo,
java.util.Date dateFrom,
java.util.Date dateTo,
int subscriberId) |
IpResourceSubscription |
findSubscribed(int subscriberId) |
java.lang.Object[] |
findSubscribed(java.util.Set<java.lang.Integer> ipResourceCategoryIds,
int ipResourceId,
byte[] addressFrom,
byte[] addressTo,
java.util.Date dateFrom,
java.util.Date dateTo,
int subscriberId) |
protected IpResourceSubscription |
getFromRS(java.sql.ResultSet rs) |
protected static IpResourceSubscription |
getSubscriptionFromRS(java.sql.ResultSet rs) |
java.util.List<IpResourceSubscription> |
list(int ipResourceId,
java.util.Date dateFrom,
java.util.Date dateTo)
Возвращает список подписок, которые пересекаются с указанным периодом.
|
Result<IpResourceSubscription> |
list(int ipResourceId,
java.util.Date dateFrom,
java.util.Date dateTo,
Page page) |
java.util.List<IpResourceSubscriptionRuntime> |
listRuntime(int ipResourceId,
java.util.Date dateFrom,
java.util.Date dateTo)
Возвращает список подписок, которые пересекаются с указанным периодом.
|
protected void |
updateImpl(IpResourceSubscription b) |
delete, get, getAndDelete, getAndUpdate
close, delete, deleteImpl, eq, get, getById, getImpl, getListFromRS, getPeriod, getSQLOrder, getTableName, list, list, listImpl, listImpl, listImplPS, listImplPS, ormFromResultSet, ormUpdateImpl, ormUpdateImpl, processException, recycle, setStatementParam, update
public IpResourceSubscriptionDao(java.sql.Connection con, int mid)
protected IpResourceSubscriptionDao(java.sql.Connection con, int mid, java.lang.String tableName)
protected IpResourceSubscription getFromRS(java.sql.ResultSet rs) throws java.sql.SQLException
getFromRS
in class ru.bitel.common.dao.AbstractDao<IpResourceSubscription>
java.sql.SQLException
public java.util.List<IpResourceSubscription> list(int ipResourceId, java.util.Date dateFrom, java.util.Date dateTo) throws ru.bitel.bgbilling.common.BGException
ipResourceId
- dateFrom
- dateTo
- ru.bitel.bgbilling.common.BGException
public java.util.List<IpResourceSubscriptionRuntime> listRuntime(int ipResourceId, java.util.Date dateFrom, java.util.Date dateTo) throws ru.bitel.bgbilling.common.BGException
ipResourceId
- dateFrom
- dateTo
- ru.bitel.bgbilling.common.BGException
public Result<IpResourceSubscription> list(int ipResourceId, java.util.Date dateFrom, java.util.Date dateTo, Page page) throws ru.bitel.bgbilling.common.BGException
ru.bitel.bgbilling.common.BGException
protected void updateImpl(IpResourceSubscription b) throws ru.bitel.bgbilling.common.BGException, java.sql.SQLException
updateImpl
in class ru.bitel.common.dao.AbstractDao<IpResourceSubscription>
ru.bitel.bgbilling.common.BGException
java.sql.SQLException
public int deleteBySubsciberId(int subscriberId) throws ru.bitel.bgbilling.common.BGException
ru.bitel.bgbilling.common.BGException
public IpResourceSubscription findSubscribed(int subscriberId) throws ru.bitel.bgbilling.common.BGException
ru.bitel.bgbilling.common.BGException
public java.lang.Object[] findFree(java.util.Collection<java.lang.Integer> ipResourceCategoryIds, int ipResourceId, byte[] addressFrom, byte[] addressTo, java.util.Date dateFrom, java.util.Date dateTo, int subscriberId) throws ru.bitel.bgbilling.common.BGException
ipResourceCategoryIds
- ipResourceId
- addressFrom
- addressTo
- dateFrom
- dateTo
- subscriberId
- ru.bitel.bgbilling.common.BGException
- если данный ip пересекается с другим подписчиком и подходящих ресурсов нетpublic java.lang.Object[] findSubscribed(java.util.Set<java.lang.Integer> ipResourceCategoryIds, int ipResourceId, byte[] addressFrom, byte[] addressTo, java.util.Date dateFrom, java.util.Date dateTo, int subscriberId) throws ru.bitel.bgbilling.common.BGException
ru.bitel.bgbilling.common.BGException
protected static IpResourceSubscription getSubscriptionFromRS(java.sql.ResultSet rs) throws java.sql.SQLException
java.sql.SQLException