public class InetConnectionDao
extends java.lang.Object
Constructor and Description |
---|
InetConnectionDao(java.sql.Connection con,
int moduleId) |
Modifier and Type | Method and Description |
---|---|
boolean |
closeConnection(int deviceId,
long id,
java.util.Date sessionStop,
int type) |
boolean |
delete(long connectionId) |
static Pair<InetServ,InetConnection> |
find(java.sql.Connection con,
int moduleId,
java.util.Set<java.lang.Integer> deviceIds,
java.util.Set<java.lang.Integer> servIds,
java.lang.String acctSessionId,
java.lang.String address,
java.lang.String login,
java.lang.String callingStationId,
java.lang.String calledStationId)
Поиск сервиса [0] и соединения [1] по указанным параметрам
|
static Pair<InetServ,InetConnection> |
find(java.sql.Connection con,
int moduleId,
java.util.Set<java.lang.Integer> servIds,
java.lang.String acctSessionId,
java.lang.String address,
java.lang.String login,
java.lang.String callingStationId)
Поиск сервиса [0] и соединения [1] по указанным параметрам
|
static Pair<InetServ,InetConnection> |
find(java.sql.Connection con,
int moduleId,
java.util.Set<java.lang.Integer> servIds,
java.lang.String acctSessionId,
java.lang.String address,
java.lang.String login,
java.lang.String callingStationId,
java.lang.String calledStationId) |
InetConnection |
get(int deviceId,
long connectionId) |
InetConnection |
get(long connectionId) |
static InetConnection |
getConnectionFromRS(java.sql.ResultSet rs) |
protected InetConnection |
getFromRS(java.sql.ResultSet rs) |
long |
getNextConnectionId() |
void |
insert(InetConnection b) |
java.util.List<InetConnection> |
list(int inetServId) |
java.util.List<InetConnection> |
list(java.util.Set<java.lang.Integer> deviceIds,
boolean checkSession) |
static void |
main(java.lang.String[] args) |
void |
recycle() |
void |
update(InetConnection b) |
void |
updateDeviceStateAndOptions(int deviceId,
long id,
int state,
java.util.Set<java.lang.Integer> inetOptions,
int accessCode) |
boolean |
updateInetAddress(int deviceId,
long id,
byte[] ipAddress,
int ipResourceId)
Метод обновляет ipAddress для соединения, если он еще не установлен.
|
void |
updateIpNets(long connectionId,
java.util.List<IpNet> routeList) |
void |
updateType(int deviceId,
long id,
int type) |
public InetConnectionDao(java.sql.Connection con, int moduleId)
public void insert(InetConnection b) throws ru.bitel.bgbilling.common.BGException
ru.bitel.bgbilling.common.BGException
public long getNextConnectionId() throws java.sql.SQLException
java.sql.SQLException
public void update(InetConnection b) throws ru.bitel.bgbilling.common.BGException
ru.bitel.bgbilling.common.BGException
public void updateDeviceStateAndOptions(int deviceId, long id, int state, java.util.Set<java.lang.Integer> inetOptions, int accessCode) throws ru.bitel.bgbilling.common.BGException
ru.bitel.bgbilling.common.BGException
public boolean updateInetAddress(int deviceId, long id, byte[] ipAddress, int ipResourceId) throws ru.bitel.bgbilling.common.BGException
id
- ipAddress
- ipResourceId
- ru.bitel.bgbilling.common.BGException
public java.util.List<InetConnection> list(java.util.Set<java.lang.Integer> deviceIds, boolean checkSession) throws ru.bitel.bgbilling.common.BGException
ru.bitel.bgbilling.common.BGException
protected InetConnection getFromRS(java.sql.ResultSet rs) throws java.sql.SQLException
java.sql.SQLException
public static InetConnection getConnectionFromRS(java.sql.ResultSet rs) throws java.sql.SQLException
java.sql.SQLException
public InetConnection get(long connectionId) throws ru.bitel.bgbilling.common.BGException
ru.bitel.bgbilling.common.BGException
public InetConnection get(int deviceId, long connectionId) throws ru.bitel.bgbilling.common.BGException
ru.bitel.bgbilling.common.BGException
public boolean closeConnection(int deviceId, long id, java.util.Date sessionStop, int type) throws ru.bitel.bgbilling.common.BGException
ru.bitel.bgbilling.common.BGException
public void updateType(int deviceId, long id, int type) throws ru.bitel.bgbilling.common.BGException
ru.bitel.bgbilling.common.BGException
public java.util.List<InetConnection> list(int inetServId) throws ru.bitel.bgbilling.common.BGException
ru.bitel.bgbilling.common.BGException
public static void main(java.lang.String[] args)
public void recycle()
public void updateIpNets(long connectionId, java.util.List<IpNet> routeList) throws ru.bitel.bgbilling.common.BGException
ru.bitel.bgbilling.common.BGException
public boolean delete(long connectionId) throws ru.bitel.bgbilling.common.BGException
ru.bitel.bgbilling.common.BGException
public static Pair<InetServ,InetConnection> find(java.sql.Connection con, int moduleId, java.util.Set<java.lang.Integer> servIds, java.lang.String acctSessionId, java.lang.String address, java.lang.String login, java.lang.String callingStationId) throws java.sql.SQLException, ru.bitel.bgbilling.common.BGException, java.net.UnknownHostException
con
- moduleId
- servId
- ID сервиса или 0acctSessionId
- идентификатор соединения (Acct-Session-Id) или nulladdress
- IP-адресlogin
- java.sql.SQLException
ru.bitel.bgbilling.common.BGException
java.net.UnknownHostException
public static Pair<InetServ,InetConnection> find(java.sql.Connection con, int moduleId, java.util.Set<java.lang.Integer> servIds, java.lang.String acctSessionId, java.lang.String address, java.lang.String login, java.lang.String callingStationId, java.lang.String calledStationId) throws java.sql.SQLException, ru.bitel.bgbilling.common.BGException, java.net.UnknownHostException
java.sql.SQLException
ru.bitel.bgbilling.common.BGException
java.net.UnknownHostException
public static Pair<InetServ,InetConnection> find(java.sql.Connection con, int moduleId, java.util.Set<java.lang.Integer> deviceIds, java.util.Set<java.lang.Integer> servIds, java.lang.String acctSessionId, java.lang.String address, java.lang.String login, java.lang.String callingStationId, java.lang.String calledStationId) throws java.sql.SQLException, ru.bitel.bgbilling.common.BGException, java.net.UnknownHostException
con
- moduleId
- servId
- ID сервиса или 0acctSessionId
- идентификатор соединения (Acct-Session-Id) или nulladdress
- IP-адресlogin
- java.sql.SQLException
ru.bitel.bgbilling.common.BGException
java.net.UnknownHostException