ru.bitel.bgbilling.modules.inet.api.server.bean

## Class InetConnectionDao

- java.lang.Object
- - ru.bitel.bgbilling.modules.inet.api.server.bean.InetConnectionDao

-     public class InetConnectionDao
      extends java.lang.Object

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `InetConnectionDao(java.sql.Connection con, int moduleId)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `closeConnection(long id, java.util.Date sessionStop, int type)`
    `boolean` | `delete(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(long id, int state, java.util.Set<java.lang.Integer> inetOptions, int accessCode)`
    `boolean` | `updateInetAddress(long id, byte[] ipAddress, int ipResourceId)` Метод обновляет ipAddress для соединения, если он еще не установлен.
    `void` | `updateIpNets(long connectionId, java.util.List<IpNet> routeList)`
    `void` | `updateType(long id, int type)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### InetConnectionDao

          public InetConnectionDao(java.sql.Connection con,
                                   int moduleId)

  - ### Method Detail

    - #### insert

          public void insert(InetConnection b)
                      throws ru.bitel.bgbilling.common.BGException

      Throws:
        `ru.bitel.bgbilling.common.BGException`

    - #### getNextConnectionId

          public long getNextConnectionId()
                                   throws java.sql.SQLException

      Throws:
        `java.sql.SQLException`

    - #### update

          public void update(InetConnection b)
                      throws ru.bitel.bgbilling.common.BGException

      Throws:
        `ru.bitel.bgbilling.common.BGException`

    - #### updateDeviceStateAndOptions

          public void updateDeviceStateAndOptions(long id,
                                                  int state,
                                                  java.util.Set<java.lang.Integer> inetOptions,
                                                  int accessCode)
                                           throws ru.bitel.bgbilling.common.BGException

      Throws:
        `ru.bitel.bgbilling.common.BGException`

    - #### updateInetAddress

          public boolean updateInetAddress(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 java.util.List<InetConnection> list(java.util.Set<java.lang.Integer> deviceIds,
                                                     boolean checkSession)
                                              throws ru.bitel.bgbilling.common.BGException

      Throws:
        `ru.bitel.bgbilling.common.BGException`

    - #### getFromRS

          protected InetConnection getFromRS(java.sql.ResultSet rs)
                                      throws java.sql.SQLException

      Throws:
        `java.sql.SQLException`

    - #### getConnectionFromRS

          public static InetConnection getConnectionFromRS(java.sql.ResultSet rs)
                                                    throws java.sql.SQLException

      Throws:
        `java.sql.SQLException`

    - #### get

          public InetConnection get(long connectionId)
                             throws ru.bitel.bgbilling.common.BGException

      Throws:
        `ru.bitel.bgbilling.common.BGException`

    - #### closeConnection

          public boolean closeConnection(long id,
                                         java.util.Date sessionStop,
                                         int type)
                                  throws ru.bitel.bgbilling.common.BGException

      Throws:
        `ru.bitel.bgbilling.common.BGException`

    - #### updateType

          public void updateType(long id,
                                 int type)
                          throws ru.bitel.bgbilling.common.BGException

      Throws:
        `ru.bitel.bgbilling.common.BGException`

    - #### list

          public java.util.List<InetConnection> list(int inetServId)
                                              throws ru.bitel.bgbilling.common.BGException

      Throws:
        `ru.bitel.bgbilling.common.BGException`

    - #### main

          public static void main(java.lang.String[] args)

    - #### recycle

          public void recycle()

    - #### updateIpNets

          public void updateIpNets(long connectionId,
                                   java.util.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`