Package de.ubs.xdm3.batch.modification
Class MappingTableUtils
java.lang.Object
de.ubs.xdm3.batch.modification.ModificationUtils
de.ubs.xdm3.batch.modification.MappingTableUtils
- All Implemented Interfaces:
Closeable,AutoCloseable
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.
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.
-
Field Summary
Fields inherited from class de.ubs.xdm3.batch.modification.ModificationUtils
AND, batchExecutionSize, password, url, user, WHERE_KEY -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new MappingTableUtils object that uses the xdm database.MappingTableUtils(String url, String user, String password) Constructs a new MappingTableUtils object that uses a database with the provided properties.MappingTableUtils(Connection connection) Constructs a new MappingTableUtils object that uses the database with the specified connection. -
Method Summary
Methods inherited from class de.ubs.xdm3.batch.modification.ModificationUtils
close, count, count, drop, executeStatement, get, getNextValueFor, hasKey, merge, merge, put, put, setBatchExecutionSize, tableExists
-
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
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
Constructs a new MappingTableUtils object that uses the database with the specified connection.- Parameters:
connection- A connection to an external database.- Throws:
SQLException
-