Package org.teiid.adminapi.impl

Examples of org.teiid.adminapi.impl.VDBMetaData


    }
    return s.getTables().get(tableName.toUpperCase());
  }

  private Schema getSchema(String vdbName, int vdbVersion, String schemaName) {
    VDBMetaData vdb = this.vdbRepository.getVDB(vdbName, vdbVersion);
    if (vdb == null) {
      return null;
    }
    TransformationMetadata tm = vdb.getAttachment(TransformationMetadata.class);
    if (tm == null) {
      return null;
    }
    return tm.getMetadataStore().getSchemas().get(schemaName.toUpperCase());
  }
View Full Code Here


  }
 
  @Override
  public void setProperty(String vdbName, int vdbVersion, String uuid,
      String name, String value) {
    VDBMetaData vdb = this.vdbRepository.getVDB(vdbName, vdbVersion);
    if (vdb == null) {
      return;
    }
    TransformationMetadata tm = vdb.getAttachment(TransformationMetadata.class);
    if (tm == null) {
      return;
    }
    AbstractMetadataRecord record = DataTierManagerImpl.getByUuid(tm.getMetadataStore(), uuid);
    if (record != null) {
View Full Code Here

    super(persistenceFactory);
  }

  @Override
  protected ManagedObject getComponent(Object attachment, PersistedComponent component, boolean create) {
    VDBMetaData metadata = (VDBMetaData)attachment;
    String vdbName = metadata.getName()+"_"+metadata.getVersion(); //$NON-NLS-1$
    if (vdbName.equals(component.getName())) {
      return getMOF().initManagedObject(metadata, VDBMetaData.class, vdbName, vdbName);
    }
    throw new IllegalStateException("could not find deployment " + component.getOriginalName());//$NON-NLS-1$
  }
View Full Code Here

    //TODO: What needs to be done here?
  }

  @Override
  protected void setComponentName(PersistedComponent component, ManagedObject mo) {
    VDBMetaData metadata = (VDBMetaData)mo.getAttachment();
    component.setName(metadata.getName()+"_"+metadata.getVersion()); //$NON-NLS-1$
  }
View Full Code Here

    s.execute("call refreshMatView('foo', false)");
  }
 
  @Test public void testSystemMatViewsWithRowRefresh() throws Exception {
    //TOOD: remove this. it's a workaround for TEIIDDES-549
    VDBMetaData vdb = server.getVDB(MATVIEWS);
    TransformationMetadata tm = vdb.getAttachment(TransformationMetadata.class);
    Table t = tm.getGroupID("TEST.RANDOMVIEW");
    t.setSelectTransformation("/*+ cache(updatable) */ " +  t.getSelectTransformation());
   
    Statement s = conn.createStatement();
    //prior to load refresh of a single row returns -1
View Full Code Here

 
  public void testClearPolicies() {
    DQPWorkContext message = new DQPWorkContext();
    message.setSession(Mockito.mock(SessionMetadata.class));
    Mockito.stub(message.getSession().getVdb()).toReturn(new VDBMetaData());
    Map<String, DataPolicy> map = message.getAllowedDataPolicies();
    map.put("role", Mockito.mock(DataPolicy.class)); //$NON-NLS-1$
    assertFalse(map.isEmpty());
   
    message.setSession(Mockito.mock(SessionMetadata.class));
    Mockito.stub(message.getSession().getVdb()).toReturn(new VDBMetaData());
    map = message.getAllowedDataPolicies();
    assertTrue(map.isEmpty());
  }
View Full Code Here

  }
 
  public void testAnyAuthenticated() {
    DQPWorkContext message = new DQPWorkContext();
    message.setSession(Mockito.mock(SessionMetadata.class));
    VDBMetaData vdb = new VDBMetaData();
    DataPolicyMetadata dpm = new DataPolicyMetadata();
    dpm.setAnyAuthenticated(true);
    vdb.addDataPolicy(dpm);
    Mockito.stub(message.getSession().getVdb()).toReturn(vdb);
   
    Map<String, DataPolicy> map = message.getAllowedDataPolicies();
    assertEquals(1, map.size());
  }
View Full Code Here

    if(!this.multiSourceModels.contains(modelName)) {
            return accessNode;
        }
       
    VDBMetaData vdb = workContext.getVDB();
        ModelMetaData model = vdb.getModel(modelName);
        List<AccessNode> accessNodes = new ArrayList<AccessNode>();
       
        boolean hasOutParams = false;
        if (accessNode.getCommand() instanceof StoredProcedure) {
          StoredProcedure sp = (StoredProcedure)accessNode.getCommand();
View Full Code Here

  }
 
  @Test
  public void testActiveVDBWithNoVersion() throws Exception {
    VDBRepository repo = Mockito.mock(VDBRepository.class);
    VDBMetaData vdb = new VDBMetaData();
    vdb.setName("name");
    vdb.setVersion(1);
    vdb.setStatus(Status.ACTIVE);
   
   
    Mockito.stub(repo.getVDB("name")).toReturn(vdb);
   
    SessionServiceImpl ssi = new SessionServiceImpl();
View Full Code Here

  }
 
  @Test
  public void testActiveVDBWithVersion() throws Exception {
    VDBRepository repo = Mockito.mock(VDBRepository.class);
    VDBMetaData vdb = new VDBMetaData();
    vdb.setName("name");
    vdb.setVersion(1);
    vdb.setStatus(Status.ACTIVE);
   
   
    Mockito.stub(repo.getVDB("name", 1)).toReturn(vdb);
   
    SessionServiceImpl ssi = new SessionServiceImpl();
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.