Package com.github.hypfvieh.db
Klasse H2Updater.H2UpdaterBuilder
java.lang.Object
com.github.hypfvieh.db.H2Updater.H2UpdaterBuilder
- Umschließende Klasse:
H2Updater
Builder to create H2Updater instances.
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungConfigure various options used for exporting the original database.Configure various options used for importing the original database to the new database.Remove a previously setH2Updater.ExportOption.Remove a previously setH2Updater.ImportOption.build()Creates a new H2Updater ensuring all required properties are set.static H2Updater.H2UpdaterBuilderCreate a new builder instance to configure H2Updater.withH2OpenOptions(Map<String, String> _options) Setup additional options used when building the connection URL for reading input database.withImportExportCharset(Charset _charset) Setup the charset to use for export and importing the database.withInputFile(File _h2InputFile) Setup H2 database to convert.withOutputFileName(String _outputFileName) Setup the output database file name.
This must be different to the input file name and the file must not exist.
The file extension (usually .mv.db) should be omitted (will be appended by H2 automatically).
-
Methodendetails
-
withH2OpenOptions
Setup additional options used when building the connection URL for reading input database.
If
nullis given, currently configured opening options are removed.- Parameter:
_options- options to add- Gibt zurück:
- this
-
withInputFile
public H2Updater.H2UpdaterBuilder withInputFile(File _h2InputFile) throws H2Updater.H2UpdaterException Setup H2 database to convert.- Parameter:
_h2InputFile- database file- Gibt zurück:
- this
- Löst aus:
H2Updater.H2UpdaterException
-
withOutputFileName
public H2Updater.H2UpdaterBuilder withOutputFileName(String _outputFileName) throws H2Updater.H2UpdaterException Setup the output database file name.
This must be different to the input file name and the file must not exist.
The file extension (usually .mv.db) should be omitted (will be appended by H2 automatically).- Parameter:
_outputFileName- name and path of new (converted) database- Gibt zurück:
- this
- Löst aus:
H2Updater.H2UpdaterException- when outputFileName is invalid
-
withImportExportCharset
Setup the charset to use for export and importing the database.- Parameter:
_charset- charset to use, null to use default- Gibt zurück:
- this
-
addExportOption
public H2Updater.H2UpdaterBuilder addExportOption(H2Updater.ExportOption _opt) throws H2Updater.H2UpdaterException Configure various options used for exporting the original database.- Parameter:
_opt- option- Gibt zurück:
- this
- Löst aus:
H2Updater.H2UpdaterException- when invalid combinations are used
-
addRemoveExportOption
Remove a previously setH2Updater.ExportOption.- Parameter:
_opt- option to remove- Gibt zurück:
- this
-
addImportOption
public H2Updater.H2UpdaterBuilder addImportOption(H2Updater.ImportOption _opt) throws H2Updater.H2UpdaterException Configure various options used for importing the original database to the new database.- Parameter:
_opt- option- Gibt zurück:
- this
- Löst aus:
H2Updater.H2UpdaterException- when invalid combinations are used
-
addRemoveImportOption
Remove a previously setH2Updater.ImportOption.- Parameter:
_opt- option to remove- Gibt zurück:
- this
-
build
Creates a new H2Updater ensuring all required properties are set.- Gibt zurück:
- H2Updater
- Löst aus:
H2Updater.H2UpdaterException- when configuration is invalid or incomplete
-
create
public static H2Updater.H2UpdaterBuilder create(File _inputH2Jar, File _outputH2Jar) throws H2Updater.H2UpdaterException Create a new builder instance to configure H2Updater.- Parameter:
_inputH2Jar- jar file of H2 to read database to convert_outputH2Jar- jar file of H2 to write converted database with- Gibt zurück:
- this
- Löst aus:
H2Updater.H2UpdaterException- when loading jars failed
-