Class MappingTableUtils

java.lang.Object
de.ubs.xdm3.batch.modification.ModificationUtils
de.ubs.xdm3.batch.modification.MappingTableUtils
All Implemented Interfaces:
Closeable, AutoCloseable

public class MappingTableUtils extends ModificationUtils
This class offers functions to persist data in a database. It allows to store and retrieve data based on a key. The data can be stored in different tables. Each table can have a different key and data portion. The get and put methods are used to retrieve and put data into the respective table.
The first put operation to a specified table will internally create the table based on the provided data. This means that the key and data of the put is used to create a table in the background.
  • Constructor Details

    • MappingTableUtils

      public MappingTableUtils()
      Constructs a new MappingTableUtils object that uses the xdm database. The data will be stored in the xdm database.
    • MappingTableUtils

      public MappingTableUtils(String url, String user, String password)
      Constructs a new MappingTableUtils object that uses a database with the provided properties. The data will be stored at the location that has been specified in the URL.
      Parameters:
      url - A jdbc url of a database. The url must start with jdbc:.
      user - A user to access the database.
      password - A password to access the database.
    • MappingTableUtils

      public MappingTableUtils(Connection connection) throws SQLException
      Constructs a new MappingTableUtils object that uses the database with the specified connection.
      Parameters:
      connection - A connection to an external database.
      Throws:
      SQLException