Examples of acceptVisitor()


Examples of org.teiid.query.mapping.xml.MappingDocument.acceptVisitor()

        doc = SourceNodeGenaratorVisitor.extractSourceNodes(doc);
        doc.acceptVisitor(new Navigator(true, new SourceFixer()));
        NameInSourceResolverVisitor.resolveElements(doc, env);
       
        // now we pass
        doc.acceptVisitor(new NameValidator(true));       
    }
   
   
    static class SourceFixer extends MappingVisitor{
        public void visit(MappingSourceNode sourceNode) {
View Full Code Here

Examples of org.teiid.query.mapping.xml.MappingNode.acceptVisitor()

                        if (shouldAbort()) {
                            break;
                        }
                       
                        MappingNode node = (MappingNode)i.next();           
                        node.acceptVisitor(this);
                    }
                }
            };

            doc.acceptVisitor(walker);
View Full Code Here

Examples of org.teiid.query.sql.lang.Command.acceptVisitor()

                Collection groups = GroupCollectorVisitor.getGroupsIgnoreInlineViews(command, false);
                final GroupSymbol symbol = (GroupSymbol)groups.iterator().next();
                Object modelId = md.getModelID(symbol.getMetadataID());
                boolean supportsGroupAliases = CapabilitiesUtil.supportsGroupAliases(modelId, md, capFinder);
                boolean supportsProjection = CapabilitiesUtil.supports(Capability.QUERY_SELECT_EXPRESSION, modelId, md, capFinder);
                command.acceptVisitor(new AliasGenerator(supportsGroupAliases, !supportsProjection));
                expectedQueries.add(command.toString());
            } catch (Exception err) {
                throw new RuntimeException(err);
            }
        }
View Full Code Here

Examples of org.teiid.query.sql.lang.Command.acceptVisitor()

                          String expected,
                          boolean aliasGroups,
                          boolean stripColumnAliases, QueryMetadataInterface metadata) throws TeiidComponentException, TeiidProcessingException {
        Command command = TestResolver.helpResolve(sql, metadata);
        command = QueryRewriter.rewrite(command, metadata, null);
        command.acceptVisitor(new AliasGenerator(aliasGroups, stripColumnAliases));
        assertEquals(expected, command.toString());
        return command;
    }

    /**
 
View Full Code Here

Examples of org.teiid.query.sql.lang.Command.acceptVisitor()

                    if (command instanceof QueryCommand) {
                      try {
                          command = (Command)command.clone();
                          boolean aliasGroups = modelID != null && CapabilitiesUtil.supportsGroupAliases(modelID, metadata, capFinder);
                          boolean aliasColumns = modelID != null && CapabilitiesUtil.supports(Capability.QUERY_SELECT_EXPRESSION, modelID, metadata, capFinder);
                          command.acceptVisitor(new AliasGenerator(aliasGroups, !aliasColumns));
                      } catch (QueryMetadataException err) {
                          throw new TeiidComponentException(err);
                      }
                    }
                    aNode.setCommand(command);
View Full Code Here

Examples of org.teiid.query.sql.lang.Command.acceptVisitor()

            command = QueryParser.getQueryParser().parseCommand(queryString);
            QueryResolver.resolveCommand(command, metadata);
            command = QueryRewriter.rewrite(command, metadata, null);
            expandAllSymbol(command);           
            if (generateAliases) {
                command.acceptVisitor(new AliasGenerator(supportsGroupAlias));
            }
            return new LanguageBridgeFactory(metadata).translate(command);
        } catch (TeiidException e) {
            throw new TeiidRuntimeException(e);
    }
View Full Code Here

Examples of org.teiid.query.sql.lang.Criteria.acceptVisitor()

                    }
                    return false;
                }
               
            };
            crit.acceptVisitor(visitor);
        }
    }
   
    /**
     * @see java.lang.Object#toString()
View Full Code Here

Examples of org.teiid.query.sql.lang.Query.acceptVisitor()

     */
    @Test public void testViewAliasing() throws Exception {
        String sql = "select y.e1 from (select pm1.g1.e1 from pm1.g1) y"; //$NON-NLS-1$
        Query command = (Query)QueryParser.getQueryParser().parseCommand(sql);
        ((ElementSymbol)command.getSelect().getSymbol(0)).setGroupSymbol(new GroupSymbol("y")); //$NON-NLS-1$
        command.acceptVisitor(new AliasGenerator(true));
        assertEquals("SELECT v_0.c_0 FROM (SELECT g_0.e1 AS c_0 FROM pm1.g1 AS g_0) AS v_0", command.toString()); //$NON-NLS-1$
    }
   
    @Test public void testLongOrderByAlias() throws Exception {
        String sql = "select pm1.g1.e1 || pm1.g1.e2 as asfasdfadfasdfasdfadfasdfadsfasdfasdfasdfasdfasdfadfa, pm1.g1.e2 from pm1.g1 order by asfasdfadfasdfasdfadfasdfadsfasdfasdfasdfasdfasdfadfa"; //$NON-NLS-1$
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.