public class InetSessionLogDao extends ru.bitel.common.dao.AbstractDao<InetSessionLog>
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
TABLE_INET_CONNECTION |
static java.lang.String |
TABLE_INET_SESSION |
static java.lang.String |
TABLE_INET_SESSION_ACCOUNT |
static java.lang.String |
TABLE_INET_SESSION_DETAIL |
static java.lang.String |
TABLE_INET_SESSION_LOG |
static java.lang.String |
TABLE_INET_SESSION_LOG_ACCOUNT |
static java.lang.String |
TABLE_INET_SESSION_LOG_DETAIL |
static java.lang.String |
TABLE_INET_SESSION_LOG_ROUTE |
static java.lang.String |
TABLE_INET_SESSION_ROUTE |
Constructor and Description |
---|
InetSessionLogDao(java.sql.Connection con,
int moduleId) |
InetSessionLogDao(java.sql.Connection con,
int moduleId,
java.util.Date date) |
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
addWherePart(java.util.Collection<java.lang.Integer> servIds,
Period period,
java.lang.String sql) |
static void |
checkTables(java.sql.Connection con,
int moduleId,
java.util.Date date) |
static void |
fixSequence(java.sql.Connection con,
int moduleId)
в mysql при перезапуске слетал auto_increment у таблиц с sequence и нужно вручную их подправить, чтобы не было дублей сессий/соединений
|
InetSessionLog |
get(long id) |
protected InetSessionLog |
getFromRS(java.sql.ResultSet rs) |
protected java.sql.PreparedStatement |
getPs(int cid,
java.util.Collection<java.lang.Integer> servIds,
Period period,
Page page,
java.lang.String sql) |
java.util.Map<java.lang.Integer,java.lang.Long> |
getSessionAccountReport(int cid,
java.util.Collection<java.lang.Integer> servIds,
Period period,
java.util.Collection<java.lang.Integer> trafficTypeIds) |
TrafficAccountDetail |
getSessionAccountSums(int cid,
java.util.Collection<java.lang.Integer> servIds,
Period period,
java.util.Collection<java.lang.Integer> serviceIds) |
java.util.Map<java.lang.Integer,java.lang.Long> |
getSessionTrafficsReport(int cid,
java.util.Collection<java.lang.Integer> servIds,
Period period,
java.util.Collection<java.lang.Integer> trafficTypeIds) |
void |
getSumReportInfo(int cid,
java.util.Collection<java.lang.Integer> servIds,
Period period,
Result<?> result) |
boolean |
isReadSessionRoute() |
java.util.List<InetSessionLog> |
list(int idDivizor,
int idRemainder,
java.util.Date dateFrom,
java.util.Date dateTo) |
java.util.List<InetSessionLog> |
list(long connectionId) |
java.util.List<InetSessionLog> |
list(java.util.Set<java.lang.Integer> deviceIds,
java.util.Date timeFrom,
java.util.Date timeTo) |
java.util.List<InetSessionLog> |
list(java.util.Set<java.lang.Integer> deviceIds,
java.util.Set<java.lang.Integer> contractIds,
java.lang.String contract,
java.util.Set<java.lang.Integer> servIds,
java.lang.String login,
java.lang.String ip,
java.lang.String callingStation,
java.util.Date timeFrom,
java.util.Date timeTo,
boolean asc,
Page page)
Получение отчета по сессиям
|
java.util.List<InetSessionLog> |
listChildren(long parentId) |
java.util.List<InetSessionLog> |
listChildren(long parentId,
java.util.Date date) |
java.util.List<InetSessionLog> |
listForContracts(java.util.Set<java.lang.Integer> cids,
java.util.Date timeFrom,
java.util.Date timeTo) |
void |
loadAccount(java.util.List<InetSessionLog> sessions,
java.util.Collection<java.lang.Integer> serviceIds) |
void |
loadTraffics(java.util.List<InetSessionLog> sessions,
java.util.Collection<java.lang.Integer> trafficTypeIds) |
void |
populateSessionTraffics(java.util.List<InetSessionLog> sessions,
java.util.Collection<java.lang.Integer> trafficTypeIds) |
protected void |
setParams(int cid,
Period period,
Page page,
java.sql.PreparedStatement ps) |
void |
setReadSessionRoute(boolean readSessionRoute) |
java.util.List<TrafficAmount> |
traffic(int contractId,
java.util.Set<java.lang.Integer> inetServIds,
int sessionId,
java.util.Set<java.lang.Integer> trafficTypeIds,
java.util.Date dateFrom,
java.util.Date dateTo,
boolean byDay,
boolean includeActive,
boolean continuous)
Отчет по трафику
|
protected void |
updateImpl(InetSessionLog b) |
public static final java.lang.String TABLE_INET_SESSION_LOG
public static final java.lang.String TABLE_INET_SESSION_LOG_DETAIL
public static final java.lang.String TABLE_INET_SESSION_LOG_ACCOUNT
public static final java.lang.String TABLE_INET_SESSION_LOG_ROUTE
public static final java.lang.String TABLE_INET_SESSION
public static final java.lang.String TABLE_INET_SESSION_DETAIL
public static final java.lang.String TABLE_INET_SESSION_ACCOUNT
public static final java.lang.String TABLE_INET_SESSION_ROUTE
public static final java.lang.String TABLE_INET_CONNECTION
public InetSessionLogDao(java.sql.Connection con, int moduleId, java.util.Date date) throws ru.bitel.bgbilling.common.BGException
ru.bitel.bgbilling.common.BGException
public InetSessionLogDao(java.sql.Connection con, int moduleId) throws ru.bitel.bgbilling.common.BGException
ru.bitel.bgbilling.common.BGException
protected InetSessionLog getFromRS(java.sql.ResultSet rs) throws java.sql.SQLException, ru.bitel.bgbilling.common.BGException
getFromRS
in class ru.bitel.common.dao.AbstractDao<InetSessionLog>
java.sql.SQLException
ru.bitel.bgbilling.common.BGException
public static void checkTables(java.sql.Connection con, int moduleId, java.util.Date date) throws java.sql.SQLException, ru.bitel.bgbilling.common.BGException
java.sql.SQLException
ru.bitel.bgbilling.common.BGException
protected void updateImpl(InetSessionLog b) throws ru.bitel.bgbilling.common.BGException, java.sql.SQLException
updateImpl
in class ru.bitel.common.dao.AbstractDao<InetSessionLog>
ru.bitel.bgbilling.common.BGException
java.sql.SQLException
public java.util.List<InetSessionLog> listChildren(long parentId) throws java.sql.SQLException, ru.bitel.bgbilling.common.BGException
java.sql.SQLException
ru.bitel.bgbilling.common.BGException
public java.util.List<InetSessionLog> listChildren(long parentId, java.util.Date date) throws java.sql.SQLException, ru.bitel.bgbilling.common.BGException
java.sql.SQLException
ru.bitel.bgbilling.common.BGException
public java.util.List<InetSessionLog> list(int idDivizor, int idRemainder, java.util.Date dateFrom, java.util.Date dateTo) throws ru.bitel.bgbilling.common.BGException
ru.bitel.bgbilling.common.BGException
public java.util.List<InetSessionLog> listForContracts(java.util.Set<java.lang.Integer> cids, java.util.Date timeFrom, java.util.Date timeTo) throws ru.bitel.bgbilling.common.BGException
ru.bitel.bgbilling.common.BGException
public java.util.List<InetSessionLog> list(java.util.Set<java.lang.Integer> deviceIds, java.util.Date timeFrom, java.util.Date timeTo) throws ru.bitel.bgbilling.common.BGException
ru.bitel.bgbilling.common.BGException
public java.util.List<InetSessionLog> list(java.util.Set<java.lang.Integer> deviceIds, java.util.Set<java.lang.Integer> contractIds, java.lang.String contract, java.util.Set<java.lang.Integer> servIds, java.lang.String login, java.lang.String ip, java.lang.String callingStation, java.util.Date timeFrom, java.util.Date timeTo, boolean asc, Page page) throws ru.bitel.bgbilling.common.BGException
deviceIds
- contractIds
- contract
- servIds
- login
- ip
- callingStation
- timeFrom
- timeTo
- asc
- page
- ru.bitel.bgbilling.common.BGException
protected java.sql.PreparedStatement getPs(int cid, java.util.Collection<java.lang.Integer> servIds, Period period, Page page, java.lang.String sql) throws java.sql.SQLException
java.sql.SQLException
protected void setParams(int cid, Period period, Page page, java.sql.PreparedStatement ps) throws java.sql.SQLException
java.sql.SQLException
protected java.lang.String addWherePart(java.util.Collection<java.lang.Integer> servIds, Period period, java.lang.String sql)
public void getSumReportInfo(int cid, java.util.Collection<java.lang.Integer> servIds, Period period, Result<?> result) throws ru.bitel.bgbilling.common.BGException
ru.bitel.bgbilling.common.BGException
public void populateSessionTraffics(java.util.List<InetSessionLog> sessions, java.util.Collection<java.lang.Integer> trafficTypeIds) throws ru.bitel.bgbilling.common.BGException
ru.bitel.bgbilling.common.BGException
public void loadTraffics(java.util.List<InetSessionLog> sessions, java.util.Collection<java.lang.Integer> trafficTypeIds) throws ru.bitel.bgbilling.common.BGException
ru.bitel.bgbilling.common.BGException
public void loadAccount(java.util.List<InetSessionLog> sessions, java.util.Collection<java.lang.Integer> serviceIds) throws ru.bitel.bgbilling.common.BGException
ru.bitel.bgbilling.common.BGException
public java.util.Map<java.lang.Integer,java.lang.Long> getSessionTrafficsReport(int cid, java.util.Collection<java.lang.Integer> servIds, Period period, java.util.Collection<java.lang.Integer> trafficTypeIds) throws ru.bitel.bgbilling.common.BGException
ru.bitel.bgbilling.common.BGException
public TrafficAccountDetail getSessionAccountSums(int cid, java.util.Collection<java.lang.Integer> servIds, Period period, java.util.Collection<java.lang.Integer> serviceIds) throws ru.bitel.bgbilling.common.BGException
ru.bitel.bgbilling.common.BGException
public java.util.List<InetSessionLog> list(long connectionId) throws ru.bitel.bgbilling.common.BGException
ru.bitel.bgbilling.common.BGException
public InetSessionLog get(long id) throws ru.bitel.bgbilling.common.BGException
ru.bitel.bgbilling.common.BGException
public java.util.List<TrafficAmount> traffic(int contractId, java.util.Set<java.lang.Integer> inetServIds, int sessionId, java.util.Set<java.lang.Integer> trafficTypeIds, java.util.Date dateFrom, java.util.Date dateTo, boolean byDay, boolean includeActive, boolean continuous) throws ru.bitel.bgbilling.common.BGException
contractId
- inetServIds
- sessionId
- trafficTypeIds
- ru.bitel.bgbilling.common.BGException
public boolean isReadSessionRoute()
public void setReadSessionRoute(boolean readSessionRoute)
public java.util.Map<java.lang.Integer,java.lang.Long> getSessionAccountReport(int cid, java.util.Collection<java.lang.Integer> servIds, Period period, java.util.Collection<java.lang.Integer> trafficTypeIds) throws ru.bitel.bgbilling.common.BGException
ru.bitel.bgbilling.common.BGException
public static void fixSequence(java.sql.Connection con, int moduleId) throws java.sql.SQLException
con
- соединение с бдmoduleId
- код модуляjava.sql.SQLException