public TableInstance resolveByAlias(String alias) { resolvedClass = null; TypeInfo typeInfo = (TypeInfo) aliasToTypeInfo.get(alias); if (typeInfo != null) { resolvedClass = typeInfo.getClazz(); return typeInfo.getTableInstance(); } TableInstance tblInstance = null; if (superContext != null) { tblInstance = superContext.resolveByAlias(alias); resolvedClass = superContext.getResolvedClass(); } return tblInstance; }
public TableInstance resolveByBEName(String beName) throws QueryParsingException { TypeInfo typeInfo = findTypeInfo(beName); if (typeInfo != null) { if (typeInfo.isUnconflict()) { resolvedClass = typeInfo.getClazz(); return typeInfo.getTableInstance(); } throw new QueryParsingException("{0}is an ambiguous type reference", new Object[] {beName}); } if (superContext != null) { TableInstance tableInstance = superContext.resolveByBEName(beName); resolvedClass = superContext.getResolvedClass(); return tableInstance; } throw new QueryParsingException("type {0} not found", new Object[] {beName}); }