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

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

Introduction

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

Prototype

MultipleLinesSqlCommandExtractor

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   ww w .  ja v  a 2s  .  co  m
        Reader reader = new InputStreamReader(inputStream);
        MultipleLinesSqlCommandExtractor extractor = new MultipleLinesSqlCommandExtractor();
        return extractor.extractCommands(reader);
    } finally {
        inputStream.close();
    }
}