org.hibernate.cfg.reveng.IndexProcessor Maven / Gradle / Ivy
package org.hibernate.cfg.reveng;
import java.sql.DatabaseMetaData;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import org.hibernate.JDBCException;
import org.hibernate.cfg.JDBCBinderException;
import org.hibernate.cfg.reveng.dialect.MetaDataDialect;
import org.hibernate.mapping.Column;
import org.hibernate.mapping.Index;
import org.hibernate.mapping.Table;
import org.hibernate.mapping.UniqueKey;
import org.hibernate.tool.util.TableNameQualifier;
import org.jboss.logging.Logger;
public class IndexProcessor {
private static final Logger log = Logger.getLogger(IndexProcessor.class);
public static void processIndices(
MetaDataDialect metaDataDialect,
String defaultSchema,
String defaultCatalog,
Table table) {
Map indexes = new HashMap(); // indexname (String) -> Index
Map uniquekeys = new HashMap(); // name (String) -> UniqueKey
Map> uniqueColumns = new HashMap>(); // Column -> List
Iterator