Package org.teiid.adminapi.impl

Examples of org.teiid.adminapi.impl.VDBMetaData


   
    for (VirtualFile f: children) {
      addIndexFile(f);
    }
    //just use the defaults for model visibility
    addEntriesPlusVisibilities(vdb, new VDBMetaData());
  }
View Full Code Here


    class AlterProcessor extends LanguageVisitor {
      DQPWorkContext workContext = DQPWorkContext.getWorkContext();
     
      @Override
      public void visit(AlterView obj) {
        VDBMetaData vdb = workContext.getVDB();
        Table t = (Table)obj.getTarget().getMetadataID();
        String sql = obj.getDefinition().toString();
      if (pdm.getMetadataRepository() != null) {
        pdm.getMetadataRepository().setViewDefinition(workContext.getVdbName(), workContext.getVdbVersion(), t, sql);
      }
View Full Code Here

      }
      }

      @Override
      public void visit(AlterProcedure obj) {
        VDBMetaData vdb = workContext.getVDB();
        Procedure p = (Procedure)obj.getTarget().getMetadataID();
        String sql = obj.getDefinition().toString();
      if (pdm.getMetadataRepository() != null) {
        pdm.getMetadataRepository().setProcedureDefinition(workContext.getVdbName(), workContext.getVdbVersion(), p, sql);
      }
View Full Code Here

      }
      }

      @Override
      public void visit(AlterTrigger obj) {
        VDBMetaData vdb = workContext.getVDB();
        Table t = (Table)obj.getTarget().getMetadataID();
        String sql = null;
        TriggerEvent event = obj.getEvent();
        if (obj.getEnabled() == null) {
          if (obj.isCreate()) {
View Full Code Here

        deployVDB(vdbName, metadata, entries);   
  }

  public void deployVDB(String vdbName, MetadataStore metadata,
      LinkedHashMap<String, Resource> entries) {
    VDBMetaData vdbMetaData = new VDBMetaData();
        vdbMetaData.setName(vdbName);
        vdbMetaData.setStatus(VDB.Status.ACTIVE);
       
        for (Schema schema : repo.getSystemStore().getSchemas().values()) {
          addModel(vdbMetaData, schema);
        }
       
View Full Code Here

        }
      // Prepare dependencies for running the optimizer       
        this.capabilitiesFinder = new CachedFinder(this.connectorManagerRepo, workContext.getVDB());       
        this.capabilitiesFinder = new TempCapabilitiesFinder(this.capabilitiesFinder);

        VDBMetaData vdbMetadata = workContext.getVDB();
        metadata = vdbMetadata.getAttachment(QueryMetadataInterface.class);
        globalTables = vdbMetadata.getAttachment(TempTableStore.class);

        if (metadata == null) {
            throw new TeiidComponentException(QueryPlugin.Util.getString("DQPCore.Unable_to_load_metadata_for_VDB_name__{0},_version__{1}", this.vdbName, this.vdbVersion)); //$NON-NLS-1$
        }
       
View Full Code Here

  @SuppressWarnings("unchecked")
  private TupleSource processSystemQuery(CommandContext context, Command command,
      DQPWorkContext workContext) throws TeiidComponentException, TeiidProcessingException {
    String vdbName = workContext.getVdbName();
    int vdbVersion = workContext.getVdbVersion();
    VDBMetaData vdb = workContext.getVDB();
    CompositeMetadataStore metadata = vdb.getAttachment(TransformationMetadata.class).getMetadataStore();
    TransformationMetadata indexMetadata = vdb.getAttachment(TransformationMetadata.class);
    Collection rows = new ArrayList();
    int oid = 1;
    if (command instanceof Query) {
      Query query = (Query)command;
      UnaryFromClause ufc = (UnaryFromClause)query.getFrom().getClauses().get(0);
View Full Code Here

        if (nodeID >= 0) {
          aqr.setTransactionContext(workItem.getTransactionContext());
        }
        aqr.setFetchSize(this.bufferService.getBufferManager().getConnectorBatchSize());
        if (connectorBindingId == null) {
          VDBMetaData vdb = workItem.getDqpWorkContext().getVDB();
          ModelMetaData model = vdb.getModel(modelName);
          List<String> bindings = model.getSourceNames();
          if (bindings == null || bindings.size() != 1) {
              // this should not happen, but it did occur when setting up the SystemAdmin models
              throw new TeiidComponentException(QueryPlugin.Util.getString("DataTierManager.could_not_obtain_connector_binding", new Object[]{modelName, workItem.getDqpWorkContext().getVdbName(), workItem.getDqpWorkContext().getVdbVersion() })); //$NON-NLS-1$
          }
View Full Code Here

        return new FakeMetadataFacade(store);
       
    }
   
    public static VDBMetaData example1VDB() {
      VDBMetaData vdb = new VDBMetaData();
      vdb.setName("example1");
      vdb.setVersion(1);
      vdb.addModel(createModel("pm1", true));
      vdb.addModel(createModel("pm2", true));
      vdb.addModel(createModel("pm3", true));
      vdb.addModel(createModel("pm4", true));
      vdb.addModel(createModel("pm5", true));
      vdb.addModel(createModel("pm6", true));
      vdb.addModel(createModel("vm1", false));
      vdb.addModel(createModel("vm2", false));
      vdb.addModel(createModel("tm1", false));
     
      return vdb;
    }
View Full Code Here

        // Create the facade from the store
        return new FakeMetadataFacade(store);
    }
   
    public static VDBMetaData exampleBQTVDB() {
      VDBMetaData vdb = new VDBMetaData();
      vdb.setName("example1");
      vdb.setVersion(1);
      vdb.addModel(createModel("BQT1", true));
      vdb.addModel(createModel("BQT2", true));
      vdb.addModel(createModel("BQT3", true));
      vdb.addModel(createModel("LOB", true));
      vdb.addModel(createModel("VQT", false));
      vdb.addModel(createModel("pm1", true));
      vdb.addModel(createModel("pm2", true));
      vdb.addModel(createModel("pm3", true));
      vdb.addModel(createModel("pm4", true));
     
      return vdb;
    }
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.