|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.sqlproc.engine.SqlFilesLoader
public class SqlFilesLoader
The helper class for the file(s) loading. The file(s) can be located on the classpath, in the root directory or in
the user's home directory. It's used for the purpose of the SqlProcessorLoader
instance creation.
For more info please see the Tutorials.
Field Summary | |
---|---|
protected org.slf4j.Logger |
logger
The internal slf4j logger. |
private StringBuilder |
sbStatements
The string representation of the file(s) content. |
Constructor Summary | |
---|---|
SqlFilesLoader(List<String> fileNames,
Class<?> loaderClass)
Reads the file(s) content and creates a new SqlFilesLoader instance. |
|
SqlFilesLoader(String fileName,
Class<?> loaderClass)
Reads the file(s) content and creates a new SqlFilesLoader instance. |
Method Summary | |
---|---|
StringBuilder |
getStatements()
Returns the content of all read files. |
static StringBuilder |
getStatements(Class<?> loaderClass,
String... fileNames)
Reads the file(s) content and creates a new SqlFilesLoader instance. |
static StringBuilder |
getStatements(Class<?> loaderClass,
String fileName)
Reads the file(s) content and creates a new SqlFilesLoader instance. |
private StringBuilder |
load(String fileName,
Class<?> loaderClass)
Reads the file content and creates a String representation of this content. |
String |
toString()
Returns a string representation of the object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected final org.slf4j.Logger logger
private StringBuilder sbStatements
Constructor Detail |
---|
public SqlFilesLoader(String fileName, Class<?> loaderClass)
fileName
- The name of the file to be read.loaderClass
- Class used to detect the correct classloader.public SqlFilesLoader(List<String> fileNames, Class<?> loaderClass)
fileNames
- The names of the files to be read.loaderClass
- Class used to detect the correct classloader.Method Detail |
---|
public static StringBuilder getStatements(Class<?> loaderClass, String fileName)
fileName
- The name of the file to be read.loaderClass
- Class used to detect the correct classloader.
public static StringBuilder getStatements(Class<?> loaderClass, String... fileNames)
fileNames
- The name sof the files to be read.loaderClass
- Class used to detect the correct classloader.
private StringBuilder load(String fileName, Class<?> loaderClass)
fileName
- The name of the file to be read.loaderClass
- Class used to detect the correct classloader.
public StringBuilder getStatements()
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |