Package adipe.translate

Examples of adipe.translate.AmbiguousNameException


                }
            }

            private SimpleColumn findColumnInEither(String columnName) throws AmbiguousNameException, WrappedException {
                if (r1.getTableIfQualifiedNameAndExists(columnName) != null && r2.getTableIfQualifiedNameAndExists(columnName) != null) {
                    throw new AmbiguousNameException(String.format("The table name '%s' is ambiguous", TableScope.getTableNameIfQualifiedName(columnName)));
                }

                SimpleColumn matchInLeftState = r1.getColumnIcShdNwrapAmbNindNull(columnName);
                if (matchInLeftState != null) {
                    try {
                        r2.getColumnIcShdNwrapAmbInd(columnName);
                        throw new AmbiguousNameException(String.format("The column name '%s' is ambiguous", columnName));
                    } catch (IndexOutOfBoundsException exc) {
                        return matchInLeftState;
                    }
                } else {
                    try {
View Full Code Here


        List<SimpleColumn> matches = getIcNshdNwrapNambNindList(columnName);
        if (matches.isEmpty()) {
            throw new WrappedException(new IndexOutOfBoundsException(String.format("No column name '%s'", columnName)));
        }
        if (matches.size() != 1) {
            throw new WrappedException(new AmbiguousNameException(String.format("The column name '%s' is ambiguous", columnName)));
        }
        return matches.get(0);
    }
View Full Code Here

            columnName = columnNamesIterator.next();
            columnNameLower = columnName.toLowerCase();

            if (newColumns.containsKey(columnNameLower)) {
                throw new AmbiguousNameException(String.format("the column name '%s' appears multiple times in the derived column list", columnName));
            }
            newColumns.put(columnNameLower, e.getValue());
        }

        return new ColumnNamesImpl(nameInSchema, newColumns);
View Full Code Here

        List<SimpleColumn> columns = named().getIcNshdNwrapNambNindList(columnNameIc);
        if (columns.isEmpty()) {
            return null;
        }
        if (columns.size() > 1) {
            throw new AmbiguousNameException(String.format("The column name '%s' is ambiguous", columnNameIc));
        }

        // like Scope#getColumnIc
        // TODO check whether this works, whether it's needed
        String tableNameIc = TableScope.getTableNameIfQualifiedName(columnNameIc);
View Full Code Here

        if (matches.size() == 0) {
            throw new IndexOutOfBoundsException(String.format("No column '%s' in scope", nameIc));
        }
        if (matches.size() > 1) {
            throw new AmbiguousNameException(String.format("The column name '%s' is ambiguous", nameIc));
        }

        return matches.get(0);
    }
View Full Code Here

    }

    public ColumnNamesImpl getIc(String tableNameIc) throws AmbiguousNameException, IndexOutOfBoundsException {
        List<ColumnNamesImpl> ts = tablesHere.get(tableNameIc.toLowerCase());
        if (ts.size() > 1) {
            throw new AmbiguousNameException(String.format("The table name '%s' is ambiguous", tableNameIc));
        }
        ColumnNamesImpl table = ts.isEmpty() ? null : ts.get(0);
        if (table == null && outer != null) {
            table = outer.getIc(tableNameIc);
        }
View Full Code Here

TOP

Related Classes of adipe.translate.AmbiguousNameException

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.