Example usage for org.hibernate.tool.hbm2ddl MultipleLinesSqlCommandExtractor extractCommands

List of usage examples for org.hibernate.tool.hbm2ddl MultipleLinesSqlCommandExtractor extractCommands

Introduction

In this page you can find the example usage for org.hibernate.tool.hbm2ddl MultipleLinesSqlCommandExtractor extractCommands.

Prototype

@Override
    public String[] extractCommands(Reader reader) 

Source Link

Usage

From source file:org.ualerts.testing.jpa.HibernatePersistentDataResource.java

License:Apache License

private String[] loadSQLStatements(URL resource) throws IOException {
    InputStream inputStream = resource.openStream();
    try {/*from w ww.  jav  a2 s.c o  m*/
        Reader reader = new InputStreamReader(inputStream);
        MultipleLinesSqlCommandExtractor extractor = new MultipleLinesSqlCommandExtractor();
        return extractor.extractCommands(reader);
    } finally {
        inputStream.close();
    }
}