Package org.teiid.core.id

Examples of org.teiid.core.id.IDGenerator


     * @throws QueryMetadataException
     * @throws TeiidComponentException
     */
    public static XMLPlan preparePlan(Command command, QueryMetadataInterface metadata, CapabilitiesFinder capFinder, CommandContext context)
        throws QueryPlannerException, QueryMetadataException, TeiidComponentException {
        IDGenerator idGenerator = new IDGenerator();
        idGenerator.setDefaultFactory(new IntegerIDFactory());
        AnalysisRecord analysis = new AnalysisRecord(false, DEBUG);
        try {
            if (DEBUG) {
                System.out.println("\n####################################\n" + command); //$NON-NLS-1$
            }
View Full Code Here


        FakeCapabilitiesFinder fakeFinder = new FakeCapabilitiesFinder();
        fakeFinder.addCapabilities(multiModel, TestOptimizer.getTypicalCapabilities());

        CapabilitiesFinder finder = new MultiSourceCapabilitiesFinder(fakeFinder, multiSourceModels);
       
        IDGenerator idGenerator = new IDGenerator();
        idGenerator.setDefaultFactory(new IntegerIDFactory());           
       
        Properties props = new Properties();
        CommandContext context = new CommandContext("0", "test", "user", null, vdb.getName(), vdb.getVersion(), props, false); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
        context.setPlanToProcessConverter(new MultiSourcePlanToProcessConverter(metadata, idGenerator, analysis, finder, multiSourceModels, dqpContext, context));
View Full Code Here

    /*
     * @see TestCase#setUp()
     */
    protected void setUp() throws Exception {
        super.setUp();
        generator = new IDGenerator();
        generatorWithDefault = new IDGenerator();
        generatorWithDefault.addFactory( new IntegerIDFactory() );
        generatorWithDefault.setDefaultFactory( IntegerID.PROTOCOL );

        generatorWithBuiltIns = new IDGenerator();
        generatorWithBuiltIns.addBuiltInFactories();
    }
View Full Code Here

        helpTestRemoveFactory(generatorWithBuiltIns,UUID.PROTOCOL,true);
        helpTestRemoveFactory(generatorWithBuiltIns,"bogus id",false); //$NON-NLS-1$
    }

    public void testSettingDefaultFactoryByProtocol() {
        final IDGenerator gen = new IDGenerator();
        final ObjectIDFactory factory = new IntegerIDFactory();
        helpTestGetDefaultFactory(gen,DEFAULT_FACTORY_PROTOCOL);
        gen.addFactory(factory);
        helpTestGetDefaultFactory(gen,DEFAULT_FACTORY_PROTOCOL);
        gen.setDefaultFactory(IntegerID.PROTOCOL);
        helpTestGetDefaultFactory(gen,IntegerID.PROTOCOL);
    }
View Full Code Here

        gen.setDefaultFactory(IntegerID.PROTOCOL);
        helpTestGetDefaultFactory(gen,IntegerID.PROTOCOL);
    }

    public void testSettingDefaultFactoryByReference() {
        final IDGenerator gen = new IDGenerator();
        final ObjectIDFactory factory = new IntegerIDFactory();
        helpTestGetDefaultFactory(gen,DEFAULT_FACTORY_PROTOCOL);
        gen.addFactory(factory);
        helpTestGetDefaultFactory(gen,DEFAULT_FACTORY_PROTOCOL);
        gen.setDefaultFactory(factory);
        helpTestGetDefaultFactory(gen,IntegerID.PROTOCOL);
    }
View Full Code Here

        Map tempMetadata = command.getTemporaryMetadata();
        metadata = new TempMetadataAdapter(metadata, new TempMetadataStore(tempMetadata));
               
        // Create an ID generator that can be used for all plans to generate unique data node IDs
        if(idGenerator == null) {
            idGenerator = new IDGenerator();
            idGenerator.setDefaultFactory(new IntegerIDFactory());
        }
       
    if(debug) {
      analysisRecord.println("\n----------------------------------------------------------------------------"); //$NON-NLS-1$
View Full Code Here

TOP

Related Classes of org.teiid.core.id.IDGenerator

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.