Class InetConnectionDao
java.lang.Object
ru.bitel.bgbilling.modules.inet.server.bean.InetConnectionDao
- 
Constructor SummaryConstructors
- 
Method SummaryModifier 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
 
- 
updateDeviceStateAndOptionspublic 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
 
- 
updateInetAddresspublic 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
 
- 
listpublic 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
 
- 
getpublic InetConnection get(int deviceId, long connectionId) throws ru.bitel.bgbilling.common.BGException - Throws:
- ru.bitel.bgbilling.common.BGException
 
- 
closeConnectionpublic boolean closeConnection(int deviceId, long id, Date sessionStop, int type) throws ru.bitel.bgbilling.common.BGException - Throws:
- ru.bitel.bgbilling.common.BGException
 
- 
updateTypepublic 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
- 
recyclepublic void recycle()
- 
updateIpNetspublic void updateIpNets(long connectionId, List<IpNet> routeList) throws ru.bitel.bgbilling.common.BGException - Throws:
- ru.bitel.bgbilling.common.BGException
 
- 
deletepublic boolean delete(long connectionId) throws ru.bitel.bgbilling.common.BGException - Throws:
- ru.bitel.bgbilling.common.BGException
 
- 
findpublic 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 сервиса или 0
- acctSessionId- идентификатор соединения (Acct-Session-Id) или null
- address- IP-адрес
- login-
- Returns:
- массив [ inetServ, inetConnection ] или null, если соединение не найдено
- Throws:
- SQLException
- ru.bitel.bgbilling.common.BGException
- UnknownHostException
 
- 
findpublic 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:
- SQLException
- ru.bitel.bgbilling.common.BGException
- UnknownHostException
 
- 
findpublic 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 сервиса или 0
- acctSessionId- идентификатор соединения (Acct-Session-Id) или null
- address- IP-адрес
- login-
- Returns:
- массив [ inetServ, inetConnection ] или null, если соединение не найдено
- Throws:
- SQLException
- ru.bitel.bgbilling.common.BGException
- UnknownHostException
 
 
-