Example usage for org.hibernate.engine.jdbc.internal DDLFormatterImpl DDLFormatterImpl

List of usage examples for org.hibernate.engine.jdbc.internal DDLFormatterImpl DDLFormatterImpl

Introduction

In this page you can find the example usage for org.hibernate.engine.jdbc.internal DDLFormatterImpl DDLFormatterImpl.

Prototype

DDLFormatterImpl

Source Link

Usage

From source file:com.silverbaytech.blog.jpaschemas.ScriptExample3.java

License:Apache License

private static void pretty(String unformatted) {
    StringReader lowLevel = new StringReader(unformatted);
    BufferedReader highLevel = new BufferedReader(lowLevel);
    DDLFormatterImpl formatter = new DDLFormatterImpl();

    highLevel.lines().forEach(x -> {/*w w w  .j a va  2  s.c om*/
        String formatted = formatter.format(x + ";");
        System.out.println(formatted);
    });
}