Example usage for org.hibernate.mapping Table getColumnSpan

List of usage examples for org.hibernate.mapping Table getColumnSpan

Introduction

In this page you can find the example usage for org.hibernate.mapping Table getColumnSpan.

Prototype

public int getColumnSpan() 

Source Link

Usage

From source file:org.eclipse.emf.teneo.hibernate.HbDataStore.java

License:Open Source License

/** Checks if a certain column already exists in a class */
private Column checkColumnExists(Table table, Column searchCol) {
    for (int i = 0; i < table.getColumnSpan(); i++) {
        final Column column = table.getColumn(i);
        if (stripQuotes(column.getName()).equalsIgnoreCase(searchCol.getName())) {
            return column;
        }//from   w w  w. j  av a  2s.c o m
    }
    table.addColumn(searchCol);
    return searchCol;
}