org.skife.jdbi.tweak
Class FileSystemScriptLocator

java.lang.Object
  extended by org.skife.jdbi.tweak.FileSystemScriptLocator
All Implemented Interfaces:
ScriptLocator

public class FileSystemScriptLocator
extends java.lang.Object
implements ScriptLocator

Looks on the file system for an SQL script.


Constructor Summary
FileSystemScriptLocator()
           
 
Method Summary
 java.io.InputStream locate(java.lang.String name)
          The input stream should read the script.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileSystemScriptLocator

public FileSystemScriptLocator()
Method Detail

locate

public java.io.InputStream locate(java.lang.String name)
                           throws java.lang.Exception
The input stream should read the script. The input stream will be closed after it reaches the end of file.

Specified by:
locate in interface ScriptLocator
Parameters:
name - Resource name to look for. This will be the raw value requested by the client.
Returns:
open input stream, or null if nothing could be found.
Throws:
java.lang.Exception - if anything goes wrong locating the statement, will be wrapped in a DBIException and rethrown