Package org.mule.common.metadata

Examples of org.mule.common.metadata.DefaultListMetaDataModel


        List<MessageProcessor> messageProcessors = flowConstruct.getMessageProcessors();
        AbstractDbMessageProcessor messageProcessor = (AbstractDbMessageProcessor) messageProcessors.get(0);
        Result<MetaData> inputMetaData = messageProcessor.getInputMetaData();

        DefaultListMetaDataModel listMetaDataModel = (DefaultListMetaDataModel) inputMetaData.get().getPayload();
        DefinedMapMetaDataModel mapDataModel = (DefinedMapMetaDataModel) listMetaDataModel.getElementModel();
        assertThat(mapDataModel.getKeys().size(), equalTo(2));
        MetaDataModel id = mapDataModel.getValueMetaDataModel("position");
        assertThat(id.getDataType(), equalTo(testDatabase.getIdFieldInputMetaDataType()));
        MetaDataModel data = mapDataModel.getValueMetaDataModel("name");
        assertThat(data.getDataType(), equalTo(DataType.STRING));
View Full Code Here


        List<MessageProcessor> messageProcessors = flowConstruct.getMessageProcessors();
        BulkExecuteMessageProcessor bulkExecuteMessageProcessor = (BulkExecuteMessageProcessor) messageProcessors.get(0);
        Result<MetaData> outputMetaData = bulkExecuteMessageProcessor.getOutputMetaData(null);

        DefaultListMetaDataModel listMetaDataModel = (DefaultListMetaDataModel) outputMetaData.get().getPayload();
        SimpleMetaDataModel elementModel = (SimpleMetaDataModel) listMetaDataModel.getElementModel();
        assertThat(elementModel.getDataType(), equalTo(DataType.DOUBLE));
    }
View Full Code Here

        List<MessageProcessor> messageProcessors = flowConstruct.getMessageProcessors();
        AbstractSingleQueryDbMessageProcessor queryMessageProcessor = (AbstractSingleQueryDbMessageProcessor) messageProcessors.get(0);
        Result<MetaData> outputMetaData = queryMessageProcessor.getOutputMetaData(null);

        DefaultListMetaDataModel listMetaDataModel = (DefaultListMetaDataModel) outputMetaData.get().getPayload();
        assertEquals(ArrayList.class.getName(), listMetaDataModel.getImplementationClass());
        DefaultParameterizedMapMetaDataModel mapMetaDataModel = (DefaultParameterizedMapMetaDataModel) listMetaDataModel.getElementModel();
        assertEquals(DataType.STRING, mapMetaDataModel.getKeyMetaDataModel().getDataType());
        assertEquals(DataType.POJO, mapMetaDataModel.getValueMetaDataModel().getDataType());
    }
View Full Code Here

        List<MessageProcessor> messageProcessors = flowConstruct.getMessageProcessors();
        PreparedBulkUpdateMessageProcessor queryMessageProcessor = (PreparedBulkUpdateMessageProcessor) messageProcessors.get(0);
        Result<MetaData> outputMetaData = queryMessageProcessor.getOutputMetaData(null);

        DefaultListMetaDataModel listMetaDataModel = (DefaultListMetaDataModel) outputMetaData.get().getPayload();
        assertThat(listMetaDataModel.isArray(), equalTo(true));
        SimpleMetaDataModel elementModel = (SimpleMetaDataModel) listMetaDataModel.getElementModel();
        assertThat(elementModel.getDataType(), equalTo(DataType.DOUBLE));
    }
View Full Code Here

        List<MessageProcessor> messageProcessors = flowConstruct.getMessageProcessors();
        AbstractSingleQueryDbMessageProcessor queryMessageProcessor = (AbstractSingleQueryDbMessageProcessor) messageProcessors.get(0);
        Result<MetaData> outputMetaData = queryMessageProcessor.getOutputMetaData(null);

        DefaultListMetaDataModel listMetaDataModel = (DefaultListMetaDataModel) outputMetaData.get().getPayload();
        assertEquals(implementationClass, listMetaDataModel.getImplementationClass());
        DefinedMapMetaDataModel mapDataModel = (DefinedMapMetaDataModel) listMetaDataModel.getElementModel();

        assertThat(mapDataModel.getKeys().size(), equalTo(3));
        MetaDataModel id = mapDataModel.getValueMetaDataModel("ID");
        assertThat(id.getDataType(), equalTo(testDatabase.getIdFieldOutputMetaDataType()));
        MetaDataModel type = mapDataModel.getValueMetaDataModel("POSITION");
View Full Code Here

TOP

Related Classes of org.mule.common.metadata.DefaultListMetaDataModel

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.