List of usage examples for org.hibernate.mapping Index getTable
public Table getTable()
From source file:com.xpn.xwiki.store.migration.hibernate.R40000XWIKI6990DataMigration.java
License:Open Source License
/** * Append a drop index command for the given index. * * @param sb append the result into this string builder * @param index the index//from w w w .j a va 2s . co m */ private void appendDropIndex(StringBuilder sb, Index index) { sb.append(" <dropIndex indexName=\"").append(index.getName()).append("\" tableName=\"") .append(index.getTable().getName()).append("\"/>\n"); }
From source file:com.xpn.xwiki.store.migration.hibernate.R40000XWIKI6990DataMigration.java
License:Open Source License
/** * Append a add index command for the given index. * * @param sb append the result into this string builder * @param index the index/*from w ww . j a v a 2s . co m*/ */ private void appendAddIndex(StringBuilder sb, Index index) { sb.append(" <createIndex tableName=\"").append(index.getTable().getName()).append("\" indexName=\"") .append(index.getName()).append("\">\n"); @SuppressWarnings("unchecked") Iterator<Column> columns = index.getColumnIterator(); while (columns.hasNext()) { Column column = columns.next(); sb.append(" <column name=\"").append(column.getName()).append("\"/>\n"); } sb.append("</createIndex>\n"); }