Package org.teiid.core.id

Examples of org.teiid.core.id.IntegerIDFactory


     * @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


        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

        // Return root of tree for top node
    return convertedNode;
  }

    protected int getID() {
        IntegerIDFactory intFactory = (IntegerIDFactory) idGenerator.getDefaultFactory();
        return ((IntegerID) intFactory.create()).getValue();
    }
View Full Code Here

     */
    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,"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

        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

        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$
            analysisRecord.println("OPTIMIZE: \n" + command); //$NON-NLS-1$
View Full Code Here

        this.vdbVersion = workContext.getVdbVersion();
        this.bufferManager = bufferManager;
        this.processorDataManager = processorDataManager;
        this.transactionService = transactionService;
        this.tempTableStore = tempTableStore;
        idGenerator.setDefaultFactory(new IntegerIDFactory());
        this.workContext = workContext;
        this.requestId = workContext.getRequestID(this.requestMsg.getExecutionId());
        this.connectorManagerRepo = workContext.getVDB().getAttachment(ConnectorManagerRepository.class);
        this.planCache = planCache;
    }
View Full Code Here

TOP

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

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.