Package com.foundationdb.server.error

Examples of com.foundationdb.server.error.ForeignKeyIndexRequiredException


        for (Table table : ais.getTables().values()) {
            for (ForeignKey foreignKey : table.getForeignKeys()) {
                if (foreignKey.getReferencingTable() == table) { // Only check once
                    foreignKey.findIndexes();
                    if (foreignKey.getReferencingIndex() == null) {
                        output.reportFailure(new AISValidationFailure(new ForeignKeyIndexRequiredException(foreignKey.getConstraintName().getTableName(), foreignKey.getReferencingTable().getName(), foreignKey.getReferencingColumns().toString())));
                    }
                    if (foreignKey.getReferencedIndex() == null) {
                        output.reportFailure(new AISValidationFailure(new ForeignKeyIndexRequiredException(foreignKey.getConstraintName().getTableName(), foreignKey.getReferencedTable().getName(), foreignKey.getReferencedColumns().toString())));
                    }
                }
            }
        }
    }
View Full Code Here

TOP

Related Classes of com.foundationdb.server.error.ForeignKeyIndexRequiredException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.