# ImportConfigurationJDBC (ARX Developer Documentation)

org.deidentifier.arx.io

## Class ImportConfigurationJDBC

- java.lang.Object
- - org.deidentifier.arx.io.ImportConfiguration
  - - org.deidentifier.arx.io.ImportConfigurationJDBC

-     public class ImportConfigurationJDBC
      extends ImportConfiguration

  Configuration describing a JDBC source.

- - ### Field Summary

    - ### Fields inherited from class org.deidentifier.arx.io.ImportConfiguration

      `columns`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ImportConfigurationJDBC(java.sql.Connection connection, java.lang.String table)` Creates a new instance of this object.
    `ImportConfigurationJDBC(java.lang.String url, java.lang.String table)` Creates a new instance of this object.
    `ImportConfigurationJDBC(java.lang.String url, java.lang.String user, java.lang.String password, java.lang.String table)` Creates a new instance of this object.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addColumn(ImportColumn column)` Adds a single column to import from This makes sure that only `ImportColumnJDBC` can be added, otherwise an `IllegalArgumentException` will be thrown.
    `void` | `close()` Closes any underlying JDBC connection that may have either been created by ARX or passed during construction.
    `protected java.sql.Connection` | `getConnection()`
    `protected java.lang.String` | `getTable()`
    `protected boolean` | `isManageConnection()` Returns whether we need to close the connection

    - ### Methods inherited from class org.deidentifier.arx.io.ImportConfiguration

      `getColumns`

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

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

- - ### Constructor Detail

    - #### ImportConfigurationJDBC

          public ImportConfigurationJDBC(java.sql.Connection connection,
                                 java.lang.String table)

      Creates a new instance of this object.
      Parameters:
        `connection` - `#setConnection(Connection)`
        `table` - `#setTable(String)`

    - #### ImportConfigurationJDBC

          public ImportConfigurationJDBC(java.lang.String url,
                                 java.lang.String table)
                                  throws java.sql.SQLException

      Creates a new instance of this object.
      Parameters:
        `url` -
        `table` - `#setTable(String)`
      Throws:
        `java.sql.SQLException`

    - #### ImportConfigurationJDBC

          public ImportConfigurationJDBC(java.lang.String url,
                                 java.lang.String user,
                                 java.lang.String password,
                                 java.lang.String table)
                                  throws java.sql.SQLException

      Creates a new instance of this object.
      Parameters:
        `url` -
        `user` -
        `password` -
        `table` - `#setTable(String)`
      Throws:
        `java.sql.SQLException`

  - ### Method Detail

    - #### addColumn

          public void addColumn(ImportColumn column)

      Adds a single column to import from This makes sure that only `ImportColumnJDBC` can be added, otherwise an `IllegalArgumentException` will be thrown.
      Specified by:
        `addColumn` in class `ImportConfiguration`
      Parameters:
        `column` - A single column to import from, `ImportColumnJDBC`

    - #### close

          public void close()

      Closes any underlying JDBC connection that may have either been created by ARX or passed during construction.

    - #### getConnection

          protected java.sql.Connection getConnection()

      Returns:
        `connection`

    - #### getTable

          protected java.lang.String getTable()

      Returns:
        `table`

    - #### isManageConnection

          protected boolean isManageConnection()

      Returns whether we need to close the connection
      Returns: