Search in sources :

Example 16 with AbstractMetadataRecord

use of org.teiid.metadata.AbstractMetadataRecord in project teiid by teiid.

the class MockConnector method createProcedureExecution.

@Override
public ProcedureExecution createProcedureExecution(Call procedure, ExecutionContext executionContext, RuntimeMetadata metadata, Object connection) throws TranslatorException {
    Properties props = new Properties();
    // $NON-NLS-1$ //$NON-NLS-2$
    props.setProperty("customBehaviour", "SkipExecute");
    AbstractMetadataRecord metaObject = procedure.getMetadataObject();
    // $NON-NLS-1$
    TestCase.assertEquals("AnyModel.ProcedureB", procedure.getProcedureName());
    // $NON-NLS-1$
    TestCase.assertEquals("PROC", metaObject.getNameInSource());
    TestCase.assertEquals(props, metaObject.getProperties());
    ProcedureExecution exec = Mockito.mock(ProcedureExecution.class);
    Mockito.stub(exec.next()).toReturn(null);
    return exec;
}
Also used : ProcedureExecution(org.teiid.translator.ProcedureExecution) Properties(java.util.Properties) AbstractMetadataRecord(org.teiid.metadata.AbstractMetadataRecord)

Aggregations

AbstractMetadataRecord (org.teiid.metadata.AbstractMetadataRecord)16 NamedTable (org.teiid.language.NamedTable)3 SQLStringVisitor (org.teiid.language.visitor.SQLStringVisitor)3 Column (org.teiid.metadata.Column)3 List (java.util.List)2 Properties (java.util.Properties)2 DocumentFilter (org.teiid.infinispan.api.DocumentFilter)2 ColumnReference (org.teiid.language.ColumnReference)2 Select (org.teiid.language.Select)2 Table (org.teiid.metadata.Table)2 SObject (com.sforce.soap.partner.sobject.SObject)1 XmlObject (com.sforce.ws.bind.XmlObject)1 ArrayList (java.util.ArrayList)1 HashSet (java.util.HashSet)1 IteratorSetting (org.apache.accumulo.core.client.IteratorSetting)1 Test (org.junit.Test)1 PermissionType (org.teiid.adminapi.DataPolicy.PermissionType)1 VDBMetaData (org.teiid.adminapi.impl.VDBMetaData)1 QueryValidatorException (org.teiid.api.exception.query.QueryValidatorException)1 Cachable (org.teiid.cache.Cachable)1