Search in sources :

Example 1 with TransformIOMeta

use of org.apache.hop.pipeline.transform.TransformIOMeta in project hop by apache.

the class SimpleMappingMeta method getTransformIOMeta.

@Override
public ITransformIOMeta getTransformIOMeta() {
    ITransformIOMeta ioMeta = super.getTransformIOMeta(false);
    if (ioMeta == null) {
        ioMeta = new TransformIOMeta(true, true, false, false, false, false);
        setTransformIOMeta(ioMeta);
    }
    return ioMeta;
}
Also used : ITransformIOMeta(org.apache.hop.pipeline.transform.ITransformIOMeta) TransformIOMeta(org.apache.hop.pipeline.transform.TransformIOMeta) ITransformIOMeta(org.apache.hop.pipeline.transform.ITransformIOMeta)

Example 2 with TransformIOMeta

use of org.apache.hop.pipeline.transform.TransformIOMeta in project hop by apache.

the class StreamLookupTest method mockProcessRowMeta.

private StreamLookupMeta mockProcessRowMeta(boolean memoryPreservationActive) throws HopTransformException {
    StreamLookupMeta meta = smh.iTransformMeta;
    TransformMeta lookupTransformMeta = when(mock(TransformMeta.class).getName()).thenReturn("Lookup").getMock();
    doReturn(lookupTransformMeta).when(smh.pipelineMeta).findTransform("Lookup");
    TransformIOMeta transformIOMeta = new TransformIOMeta(true, true, false, false, false, false);
    transformIOMeta.addStream(new Stream(IStream.StreamType.INFO, lookupTransformMeta, null, StreamIcon.INFO, null));
    doReturn(transformIOMeta).when(meta).getTransformIOMeta();
    doReturn(new String[] { "Id" }).when(meta).getKeylookup();
    doReturn(new String[] { "Id" }).when(meta).getKeystream();
    doReturn(new String[] { "Value" }).when(meta).getValue();
    doReturn(memoryPreservationActive).when(meta).isMemoryPreservationActive();
    doReturn(false).when(meta).isUsingSortedList();
    doReturn(false).when(meta).isUsingIntegerPair();
    doReturn(new int[] { -1 }).when(meta).getValueDefaultType();
    doReturn(new String[] { "" }).when(meta).getValueDefault();
    doReturn(new String[] { "Value" }).when(meta).getValueName();
    doReturn(new String[] { "Value" }).when(meta).getValue();
    doCallRealMethod().when(meta).getFields(nullable(IRowMeta.class), nullable(String.class), nullable(IRowMeta[].class), nullable(TransformMeta.class), nullable(IVariables.class), nullable(IHopMetadataProvider.class));
    return meta;
}
Also used : TransformIOMeta(org.apache.hop.pipeline.transform.TransformIOMeta) IRowMeta(org.apache.hop.core.row.IRowMeta) IVariables(org.apache.hop.core.variables.IVariables) TransformMeta(org.apache.hop.pipeline.transform.TransformMeta) IHopMetadataProvider(org.apache.hop.metadata.api.IHopMetadataProvider) IStream(org.apache.hop.pipeline.transform.stream.IStream) Stream(org.apache.hop.pipeline.transform.stream.Stream) ValueMetaString(org.apache.hop.core.row.value.ValueMetaString)

Aggregations

TransformIOMeta (org.apache.hop.pipeline.transform.TransformIOMeta)2 IRowMeta (org.apache.hop.core.row.IRowMeta)1 ValueMetaString (org.apache.hop.core.row.value.ValueMetaString)1 IVariables (org.apache.hop.core.variables.IVariables)1 IHopMetadataProvider (org.apache.hop.metadata.api.IHopMetadataProvider)1 ITransformIOMeta (org.apache.hop.pipeline.transform.ITransformIOMeta)1 TransformMeta (org.apache.hop.pipeline.transform.TransformMeta)1 IStream (org.apache.hop.pipeline.transform.stream.IStream)1 Stream (org.apache.hop.pipeline.transform.stream.Stream)1