@Test public void testGetBinaryVDBResource() throws Exception { byte[] expectedBytes = "ResourceContents".getBytes(); byte[] mfBytes = runtimeMetadata.getBinaryVDBResource(MY_RESOURCE_PATH); assertEquals(expectedBytes.length, mfBytes.length); for (int i = 0; i < expectedBytes.length; i++) { assertEquals("Byte at index " + i + " differs from expected content", expectedBytes[i], mfBytes[i]); } }
public byte[] getBinaryVDBResource(String resourcePath) throws TranslatorException { try { return metadata.getBinaryVDBResource(resourcePath); } catch (QueryMetadataException e) { throw new TranslatorException(QueryPlugin.Event.TEIID30470, e); } catch (TeiidComponentException e) { throw new TranslatorException(QueryPlugin.Event.TEIID30471, e); } }
RuntimeMetadataImpl implements RuntimeMetadata { public byte[] getBinaryVDBResource(String resourcePath) throws TranslatorException { try { return metadata.getBinaryVDBResource(resourcePath); } catch (QueryMetadataException e) { throw new TranslatorException(QueryPlugin.Event.TEIID30470, e); } catch (TeiidComponentException e) { throw new TranslatorException(QueryPlugin.Event.TEIID30471, e); } } }
RuntimeMetadataImpl implements RuntimeMetadata { public byte[] getBinaryVDBResource(String resourcePath) throws TranslatorException { try { return metadata.getBinaryVDBResource(resourcePath); } catch (QueryMetadataException e) { throw new TranslatorException(QueryPlugin.Event.TEIID30470, e); } catch (TeiidComponentException e) { throw new TranslatorException(QueryPlugin.Event.TEIID30471, e); } } RuntimeMetadataImpl(QueryMetadataInterface metadata); }
RuntimeMetadataImpl implements RuntimeMetadata { public byte[] getBinaryVDBResource(String resourcePath) throws TranslatorException { try { return metadata.getBinaryVDBResource(resourcePath); } catch (QueryMetadataException e) { throw new TranslatorException(QueryPlugin.Event.TEIID30470, e); } catch (TeiidComponentException e) { throw new TranslatorException(QueryPlugin.Event.TEIID30471, e); } } RuntimeMetadataImpl(QueryMetadataInterface metadata); @Override Column getColumn(String schema, String table, String name); @Override Procedure getProcedure(String schema, String name); @Override Table getTable(String schema, String name); @Override Column getColumn(String fullName); Column getElement(Object elementId); @Override Table getTable(String fullName); Table getGroup(Object groupId); @Override Procedure getProcedure(String fullName); Procedure getProcedure(StoredProcedureInfo sp); ProcedureParameter getParameter(SPParameter param); byte[] getBinaryVDBResource(String resourcePath); String getCharacterVDBResource(String resourcePath); String[] getVDBResourcePaths(); QueryMetadataInterface getMetadata(); }
RuntimeMetadataImpl implements RuntimeMetadata { public byte[] getBinaryVDBResource(String resourcePath) throws TranslatorException { try { return metadata.getBinaryVDBResource(resourcePath); } catch (QueryMetadataException e) { throw new TranslatorException(QueryPlugin.Event.TEIID30470, e); } catch (TeiidComponentException e) { throw new TranslatorException(QueryPlugin.Event.TEIID30471, e); } } RuntimeMetadataImpl(QueryMetadataInterface metadata); @Override Column getColumn(String schema, String table, String name); @Override Procedure getProcedure(String schema, String name); @Override Table getTable(String schema, String name); @Override Column getColumn(String fullName); Column getElement(Object elementId); @Override Table getTable(String fullName); Table getGroup(Object groupId); @Override Procedure getProcedure(String fullName); Procedure getProcedure(StoredProcedureInfo sp); ProcedureParameter getParameter(SPParameter param); byte[] getBinaryVDBResource(String resourcePath); String getCharacterVDBResource(String resourcePath); String[] getVDBResourcePaths(); QueryMetadataInterface getMetadata();  }