Package jslx.dbutilities.dbutil
Class DbCreateTask
- java.lang.Object
-
- jslx.dbutilities.dbutil.DbCreateTask
-
public class DbCreateTask extends java.lang.Object
A DbCreateTask represents a set of instructions that can be used to create, possibly fill, and alter a database. It can be used only once. The enum Type indicates what kind of tasks will be executed and the state of the task.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
DbCreateTask.AfterTablesOnlyStepIfc
static interface
DbCreateTask.DBAddConstraintsStepIfc
static interface
DbCreateTask.DBAfterInsertStepIfc
static interface
DbCreateTask.DbCreateStepIfc
static class
DbCreateTask.DbCreateTaskBuilder
A builder that can be used to configure a database creation task through as set of configuration steps.static interface
DbCreateTask.DbCreateTaskExecuteStepIfc
static interface
DbCreateTask.DbCreateTaskFirstStepIfc
Used to limit the options on the first stepstatic interface
DbCreateTask.DbInsertStepIfc
static class
DbCreateTask.State
static class
DbCreateTask.Type
static interface
DbCreateTask.WithCreateScriptStepIfc
Allows the user to specify a full creation script that puts the database into the state desired by the user.static interface
DbCreateTask.WithTablesScriptStepIfc
Allows the user to specify a script that creates the tables of the database
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<java.lang.String>
getAlterCommands()
java.util.List<java.lang.String>
getCreationScriptCommands()
java.nio.file.Path
getExcelWorkbookPathForDataInsert()
java.util.List<java.lang.String>
getInsertCommands()
java.util.List<java.lang.String>
getInsertTableOrder()
DbCreateTask.State
getState()
java.util.List<java.lang.String>
getTableCommands()
DbCreateTask.Type
getType()
java.lang.String
toString()
-
-
-
Method Detail
-
getExcelWorkbookPathForDataInsert
public java.nio.file.Path getExcelWorkbookPathForDataInsert()
- Returns:
- the path to the Excel workbook to be used for inserting data, may be null
-
getInsertTableOrder
public java.util.List<java.lang.String> getInsertTableOrder()
- Returns:
- a list of table names in the order in which they need to be inserted. May be empty
-
getCreationScriptCommands
public java.util.List<java.lang.String> getCreationScriptCommands()
- Returns:
- a list of all the commands that were in the creation script, may be empty
-
getTableCommands
public java.util.List<java.lang.String> getTableCommands()
- Returns:
- a list of the create table commands, may be empty
-
getInsertCommands
public java.util.List<java.lang.String> getInsertCommands()
- Returns:
- a list of the insert commands, may be empty
-
getAlterCommands
public java.util.List<java.lang.String> getAlterCommands()
- Returns:
- a list of the alter commands, may be empty
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getType
public final DbCreateTask.Type getType()
- Returns:
- the type of the command sequence specified during the builder process
-
getState
public final DbCreateTask.State getState()
-
-