Code example for MutablePropertyValues

Methods: addPropertyValue

0
        assertEquals("15/02/2012", dateFormat.format(info.getAttachmentDate()));
    } 
 
    @Test
    public void testBindMapNestedMap() throws Exception {
        MutablePropertyValues values = new MutablePropertyValues();
 
        values.addPropertyValue("resultsMap['fieldValues']['IMAGE_UID']", "1");
        values.addPropertyValue("resultsMap['fieldValues']['SCANLOCATION']", "1");
        values.addPropertyValue("resultsMap['fieldValues']['BUSINESSPROCID']", 0);
        values.addPropertyValue("resultsMap['fieldValues']['MAINCASEID']", 18378);
 
        values.addPropertyValue("resultsMap['fieldTypes']['IMAGE_UID']", "string");
        values.addPropertyValue("resultsMap['fieldTypes']['SCANLOCATION']", "string");
        values.addPropertyValue("resultsMap['fieldTypes']['BUSINESSPROCID']", "integer");
        values.addPropertyValue("resultsMap['fieldTypes']['MAINCASEID']", "integer");
 
        org.jboss.processFlow.console.binding.spring.InternalMapBean target = new org.jboss.processFlow.console.binding.spring.InternalMapBean();
        HashMap<String, Object> sourceMap = new HashMap<String, Object>();
        sourceMap.put("fieldValues", MapUtils.lazyMap(new HashMap(), TransformerUtils.stringValueTransformer()));
        sourceMap.put("fieldTypes", MapUtils.lazyMap(new HashMap(), TransformerUtils.stringValueTransformer()));