Package org.teiid.adminapi.impl

Examples of org.teiid.adminapi.impl.VDBMetaData


        // Create the facade from the store
        return new FakeMetadataFacade(store);
    }
   
    public static VDBMetaData examplePrivatePhysicalModelVDB() {
      VDBMetaData vdb = new VDBMetaData();
      vdb.setName("example1");
      vdb.setVersion(1);
      ModelMetaData m = createModel("pm1", true);
      m.setVisible(false);
      vdb.addModel(m);
      vdb.addModel(createModel("vm1", false));
     
      return vdb;
    }   
View Full Code Here


        store.addObjects(dealersElements);
    }
   
   
    public static VDBMetaData exampleMultiBindingVDB() {
      VDBMetaData vdb = new VDBMetaData();
      vdb.setName("exampleMultiBinding");
      vdb.setVersion(1);
     
      ModelMetaData model = new ModelMetaData();
      model.setName("MultiModel");
       model.setModelType(Model.Type.PHYSICAL);
      model.setVisible(true);
     
      model.setSupportsMultiSourceBindings(true);
      vdb.addModel(model);
      vdb.addModel(createModel("Virt", false));
     
      return vdb;
    }
View Full Code Here

        String sql = "call getXMLSchemas('testdocument.testDocument')"//$NON-NLS-1$

        DQPCore core = Mockito.mock(DQPCore.class);
        RequestWorkItem rwi = Mockito.mock(RequestWorkItem.class);
        DQPWorkContext workContext = new DQPWorkContext();
        VDBMetaData vdb = new VDBMetaData();
        vdb.addAttchment(TransformationMetadata.class, metadata);
        workContext.getSession().setVdb(vdb);
        Mockito.stub(rwi.getDqpWorkContext()).toReturn(workContext);
       
        Mockito.stub(core.getRequestWorkItem((RequestID)Mockito.anyObject())).toReturn(rwi);
        DataTierManagerImpl dataMgr = new DataTierManagerImpl(core, null, true);
View Full Code Here

                );
        this.securityContext.setUser(requestMsg.getWorkContext().getSubject());
        this.securityContext.setBatchSize(this.requestMsg.getFetchSize());
       
        this.connector = manager.getExecutionFactory();
      VDBMetaData vdb = requestMsg.getWorkContext().getVDB();
      this.queryMetadata = vdb.getAttachment(QueryMetadataInterface.class);
        this.queryMetadata = new TempMetadataAdapter(this.queryMetadata, new TempMetadataStore());
    this.securityContext.setTransactional(requestMsg.isTransactional());
    }
View Full Code Here

   */
  void restore() throws QueryResolverException, QueryValidatorException, TeiidComponentException {
    if (this.objectsAccessed != null) {
      return;
    }
    VDBMetaData vdb = DQPWorkContext.getWorkContext().getVDB();
    TransformationMetadata tm = vdb.getAttachment(TransformationMetadata.class);
    TempTableStore globalStore = vdb.getAttachment(TempTableStore.class);
    if (!externalNames.isEmpty()) {
      this.objectsAccessed = new HashSet<Object>(externalNames.size());
      for (List<String> key : this.externalNames) {
        if (key.size() == 1) {
          String matTableName = key.get(0);
View Full Code Here

  }
   

  public static TransformationMetadata createTransformationMetadata(MetadataStore metadataStore, String vdbName) {
    CompositeMetadataStore store = new CompositeMetadataStore(metadataStore);
      VDBMetaData vdbMetaData = new VDBMetaData();
      vdbMetaData.setName(vdbName); //$NON-NLS-1$
      vdbMetaData.setVersion(1);
      List<FunctionTree> udfs = new ArrayList<FunctionTree>();
      for (Schema schema : metadataStore.getSchemas().values()) {
      vdbMetaData.addModel(FakeMetadataFactory.createModel(schema.getName(), schema.isPhysical()));
      if (!schema.getFunctions().isEmpty()) {
        udfs.add(new FunctionTree(schema.getName(), new UDFSource(schema.getFunctions().values()), true));
      }
    }
      return new TransformationMetadata(vdbMetaData, store, null, FakeMetadataFactory.SFM.getSystemFunctions(), udfs);
View Full Code Here

TOP

Related Classes of org.teiid.adminapi.impl.VDBMetaData

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.