org.skife.jdbi.tweak
Class ClasspathStatementLocator
java.lang.Object
org.skife.jdbi.tweak.ClasspathStatementLocator
- All Implemented Interfaces:
- StatementLocator
public class ClasspathStatementLocator
- extends java.lang.Object
- implements StatementLocator
Locates statements defined on the classpath using the [name].sql naming convention,
or if that fails, [name]
Method Summary |
static boolean |
isComment(java.lang.String line)
|
java.lang.String |
load(java.lang.String name)
Will be passed the name of a statement to locate. |
static java.lang.ClassLoader |
selectClassLoader()
There *must* be a better place to put this without creating a util class just for it |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ClasspathStatementLocator
public ClasspathStatementLocator()
load
public java.lang.String load(java.lang.String name)
- Description copied from interface:
StatementLocator
- Will be passed the name of a statement to locate. Must return valid SQL (with
the option of including named parameters jdbi style).
- Specified by:
load
in interface StatementLocator
- Parameters:
name
- name of the statement
- Returns:
- raw SQL statement (may include named params)
selectClassLoader
public static java.lang.ClassLoader selectClassLoader()
- There *must* be a better place to put this without creating a util class just for it
isComment
public static boolean isComment(java.lang.String line)