List of usage examples for org.hibernate.tool.hbm2ddl ColumnMetadata getName
public String getName()
From source file:corner.migration.services.impl.fragment.ChangeColumnFragment.java
License:Apache License
String sqlAlterStrings(Table table, String columnName, Dialect dialect, Mapping p, TableMetadata tableInfo,
String defaultCatalog, String defaultSchema) throws HibernateException {
Iterator iter = table.getColumnIterator();
String alterSQL = null;//from www .jav a2s. c o m
while (iter.hasNext()) {
Column column = (Column) iter.next();
ColumnMetadata columnInfo = tableInfo.getColumnMetadata(column.getName());
if (columnInfo != null && columnInfo.getName().toLowerCase().equals(columnName.toLowerCase())) {//,???
alterSQL = this.getConnectionAdapter().changeColumnSQL(this.getQualifiedTableName(table),
getSQLType(column));
}
}
return alterSQL;
}
From source file:corner.services.migration.impl.fragment.ChangeColumnFragment.java
License:Apache License
String sqlAlterStrings(Table table, String columnName, Dialect dialect, Mapping p, TableMetadata tableInfo,
String defaultCatalog, String defaultSchema) throws HibernateException {
Iterator iter = table.getColumnIterator();
String alterSQL = null;/*w w w . j av a 2s. co m*/
while (iter.hasNext()) {
Column column = (Column) iter.next();
ColumnMetadata columnInfo = tableInfo.getColumnMetadata(column.getName());
if (columnInfo != null && columnInfo.getName().toLowerCase().equals(columnName.toLowerCase())) {//,???
alterSQL = this.getConnectionAdapter().changeColumnSQL(table.getName(), getSQLType(column));
}
}
return alterSQL;
}