Package org.teiid.adminapi.impl

Examples of org.teiid.adminapi.impl.TranslatorMetaData


    modelTwo.setModelType(Model.Type.VIRTUAL);
    modelTwo.addProperty("model-prop", "model-value")
   
    vdb.addModel(modelTwo);
   
    TranslatorMetaData t1 = new TranslatorMetaData();
    t1.setName("oracleOverride");
    t1.setType("oracle");
    t1.addProperty("my-property", "my-value");
    List<Translator> list = new ArrayList<Translator>();
    list.add(t1);
    vdb.setOverrideTranslators(list);
   
    DataPolicyMetadata roleOne = new DataPolicyMetadata();
View Full Code Here


    }
  }
 
  @Test
  public void testTranslator() {
    TranslatorMetaData tm = new TranslatorMetaData();
   
    tm.setExecutionFactoryClass(ExecutionFactory.class);
    tm.setName("Oracle");
    tm.addProperty("ExtensionTranslationClassName", "org.teiid.translator.jdbc.oracle.OracleSQLTranslator");
   
    // convert to managed object and build the VDB out of MO
    ManagedObjectFactory mof = ManagedObjectFactoryBuilder.create();
    ManagedObject mo = mof.initManagedObject(tm, null, null);
    tm = AdminObjectBuilder.buildAO(mo, TranslatorMetaData.class);
   
    assertEquals("Oracle", tm.getName());
    assertEquals(ExecutionFactory.class.getName(), tm.getPropertyValue(Translator.EXECUTION_FACTORY_CLASS));
    assertEquals("org.teiid.translator.jdbc.oracle.OracleSQLTranslator", tm.getPropertyValue("ExtensionTranslationClassName"));   
  }
View Full Code Here

TOP

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

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.