Class InetConnectionDao
java.lang.Object
ru.bitel.bgbilling.modules.inet.server.bean.InetConnectionDao
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancloseConnection(int deviceId, long id, Date sessionStop, int type) booleandelete(long connectionId) static Pair<InetServ,InetConnection> find(Connection con, int moduleId, Set<Integer> servIds, String acctSessionId, String address, String login, String callingStationId) Поиск сервиса [0] и соединения [1] по указанным параметрамstatic Pair<InetServ,InetConnection> find(Connection con, int moduleId, Set<Integer> servIds, String acctSessionId, String address, String login, String callingStationId, String calledStationId) static Pair<InetServ,InetConnection> find(Connection con, int moduleId, Set<Integer> deviceIds, Set<Integer> servIds, String acctSessionId, String address, String login, String callingStationId, String calledStationId) Поиск сервиса [0] и соединения [1] по указанным параметрамget(int deviceId, long connectionId) get(long connectionId) static InetConnectionprotected InetConnectionlongvoidlist(int inetServId) static voidvoidrecycle()voidvoidupdateDeviceStateAndOptions(int deviceId, long id, int state, Set<Integer> inetOptions, int accessCode) booleanupdateInetAddress(int deviceId, long id, byte[] ipAddress, int ipResourceId) Метод обновляет ipAddress для соединения, если он еще не установлен.voidupdateIpNets(long connectionId, List<IpNet> routeList) voidupdateType(int deviceId, long id, int type)
-
Constructor Details
-
InetConnectionDao
-
-
Method Details
-
insert
- Throws:
ru.bitel.bgbilling.common.BGException
-
getNextConnectionId
- Throws:
SQLException
-
update
- Throws:
ru.bitel.bgbilling.common.BGException
-
updateDeviceStateAndOptions
public void updateDeviceStateAndOptions(int deviceId, long id, int state, Set<Integer> inetOptions, int accessCode) throws ru.bitel.bgbilling.common.BGException - Throws:
ru.bitel.bgbilling.common.BGException
-
updateInetAddress
public boolean updateInetAddress(int deviceId, long id, byte[] ipAddress, int ipResourceId) throws ru.bitel.bgbilling.common.BGException Метод обновляет ipAddress для соединения, если он еще не установлен.- Parameters:
id-ipAddress-ipResourceId-- Returns:
- Throws:
ru.bitel.bgbilling.common.BGException
-
list
public List<InetConnection> list(Set<Integer> deviceIds, boolean checkSession) throws ru.bitel.bgbilling.common.BGException - Throws:
ru.bitel.bgbilling.common.BGException
-
getFromRS
- Throws:
SQLException
-
getConnectionFromRS
- Throws:
SQLException
-
get
- Throws:
ru.bitel.bgbilling.common.BGException
-
get
public InetConnection get(int deviceId, long connectionId) throws ru.bitel.bgbilling.common.BGException - Throws:
ru.bitel.bgbilling.common.BGException
-
closeConnection
public boolean closeConnection(int deviceId, long id, Date sessionStop, int type) throws ru.bitel.bgbilling.common.BGException - Throws:
ru.bitel.bgbilling.common.BGException
-
updateType
public void updateType(int deviceId, long id, int type) throws ru.bitel.bgbilling.common.BGException - Throws:
ru.bitel.bgbilling.common.BGException
-
list
- Throws:
ru.bitel.bgbilling.common.BGException
-
main
-
recycle
public void recycle() -
updateIpNets
public void updateIpNets(long connectionId, List<IpNet> routeList) throws ru.bitel.bgbilling.common.BGException - Throws:
ru.bitel.bgbilling.common.BGException
-
delete
public boolean delete(long connectionId) throws ru.bitel.bgbilling.common.BGException - Throws:
ru.bitel.bgbilling.common.BGException
-
find
public static Pair<InetServ,InetConnection> find(Connection con, int moduleId, Set<Integer> servIds, String acctSessionId, String address, String login, String callingStationId) throws SQLException, ru.bitel.bgbilling.common.BGException, UnknownHostException Поиск сервиса [0] и соединения [1] по указанным параметрам- Parameters:
con-moduleId-servId- ID сервиса или 0acctSessionId- идентификатор соединения (Acct-Session-Id) или nulladdress- IP-адресlogin-- Returns:
- массив [ inetServ, inetConnection ] или null, если соединение не найдено
- Throws:
SQLExceptionru.bitel.bgbilling.common.BGExceptionUnknownHostException
-
find
public static Pair<InetServ,InetConnection> find(Connection con, int moduleId, Set<Integer> servIds, String acctSessionId, String address, String login, String callingStationId, String calledStationId) throws SQLException, ru.bitel.bgbilling.common.BGException, UnknownHostException - Throws:
SQLExceptionru.bitel.bgbilling.common.BGExceptionUnknownHostException
-
find
public static Pair<InetServ,InetConnection> find(Connection con, int moduleId, Set<Integer> deviceIds, Set<Integer> servIds, String acctSessionId, String address, String login, String callingStationId, String calledStationId) throws SQLException, ru.bitel.bgbilling.common.BGException, UnknownHostException Поиск сервиса [0] и соединения [1] по указанным параметрам- Parameters:
con-moduleId-servId- ID сервиса или 0acctSessionId- идентификатор соединения (Acct-Session-Id) или nulladdress- IP-адресlogin-- Returns:
- массив [ inetServ, inetConnection ] или null, если соединение не найдено
- Throws:
SQLExceptionru.bitel.bgbilling.common.BGExceptionUnknownHostException
-