public final class XmlBuilderSql extends Object
The XmlBuilderSql is the central class to read XML files and load the queries at memory. The default initial file with the queries is named "SqlConfig.xml" this file can have included other files like:
If you don't like the name "SqlConfig.xml" or have some constraint with this
name; you can create other name to file and performed the method
XmlBuilderSql.configFile("/newXmlFile.xml").
| Modifier and Type | Method and Description |
|---|---|
static void |
configFile(String fileConfig)
Re-initialize the mapping XML file, making the framework read again the
XML file named "fileConfig".
|
static boolean |
containsQuery(String name) |
static List<SqlFile> |
getFiles()
Retrieve an unmodifiable list from original file list.
|
static ISql |
getQuery(String name)
Retrieve one query according your name.
|
public static ISql getQuery(String name)
name - Name of the query.IllegalArgumentException - if the parameter name does not refer names of query
configured this exception is throwed.public static boolean containsQuery(String name)
public static void configFile(String fileConfig)
fileConfig - The XML file with SQL sentences.ExceptionCopyright © 2015 jkniv. All rights reserved.