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.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class IndexProcessor {
private static final Logger log = LoggerFactory.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