Example usage for org.hibernate.mapping Column getCanonicalName

List of usage examples for org.hibernate.mapping Column getCanonicalName

Introduction

In this page you can find the example usage for org.hibernate.mapping Column getCanonicalName.

Prototype

public String getCanonicalName() 

Source Link

Usage

From source file:kr.debop4j.data.ogm.test.datastore.DatastoreProviderGeneratingSchema.java

License:Apache License

@Override
public void start(Configuration configuration, SessionFactoryImplementor sessionFactoryImplementor) {
    Iterator<Table> tables = configuration.getTableMappings();
    while (tables.hasNext()) {
        Table table = tables.next();//from  w  w  w . ja va  2 s  . c o  m
        if (table.isPhysicalTable()) {
            String tableName = table.getQuotedName();
            // do something with table
            Iterator<Column> columns = (Iterator<Column>) table.getColumnIterator();
            while (columns.hasNext()) {
                Column column = columns.next();
                String columnName = column.getCanonicalName();
                // do something with column
            }
            //TODO handle unique constraints?
        }
    }
    throw new RuntimeException("STARTED!");
}