Package org.sqlproc.engine.util
Class DDLLoader
- java.lang.Object
-
- org.sqlproc.engine.util.DDLLoader
-
public class DDLLoader extends Object
The helper class for the DDL file(s) loading. This file can be located on the classpath, in the root directory or in the user's home directory. It's used for example to set up database layout before the JUnit tests are processed.For more info please see the Tutorials.
- Author:
- Vladimir Hudec
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>
getDdls()
static List<String>
getDDLs(Class<?> loaderClass, String fileName)
Reads the DDL file and creates a new DDLLoader instance.static List<String>
getDDLs(Class<?> loaderClass, String... fileNames)
Reads the DDL files and parse DDL statements into a list.private List<String>
load(String fileName, Class<?> loaderClass)
Reads the DDL file and parse DDL statements into a list.
-
-
-
Method Detail
-
getDDLs
public static List<String> getDDLs(Class<?> loaderClass, String fileName)
Reads the DDL file and creates a new DDLLoader instance.- Parameters:
fileName
- The name of the file to be read.loaderClass
- Class used to detect the correct classloader.- Returns:
- all DDL statements as a list
-
getDDLs
public static List<String> getDDLs(Class<?> loaderClass, String... fileNames)
Reads the DDL files and parse DDL statements into a list.- Parameters:
fileNames
- The names of the files to be read.loaderClass
- Class used to detect the correct classloader.- Returns:
- all DDL statements as a list
-
load
private List<String> load(String fileName, Class<?> loaderClass)
Reads the DDL file and parse DDL statements into a list.- Parameters:
fileName
- The name of the file to be read.loaderClass
- Class used to detect the correct classloader.- Returns:
- all DDL statements as a list
-
-