Example usage for org.hibernate.mapping Index buildSqlCreateIndexString

List of usage examples for org.hibernate.mapping Index buildSqlCreateIndexString

Introduction

In this page you can find the example usage for org.hibernate.mapping Index buildSqlCreateIndexString.

Prototype

public static String buildSqlCreateIndexString(Dialect dialect, String name, Table table,
            Iterator<Column> columns, java.util.Map<Column, String> columnOrderMap, boolean unique,
            Metadata metadata) 

Source Link

Usage

From source file:org.processbase.engine.bam.db.ScriptGenerator.java

License:Open Source License

private void addIndex(Column column) {
    try {//from www  .  j  av  a  2s  .  c  o m
        Dialect dialect = (Dialect) Class.forName(BAMConstants.BAM_DB_DIALECT).newInstance();
        dimColumns.add(column);
        result.add(Index.buildSqlCreateIndexString(dialect, table.getName() + "_IDX_" + column.getName(), table,
                dimColumns.iterator(), false, null, null));
        dimColumns.clear();
    } catch (Exception ex) {
        ex.printStackTrace();
    }
}