Code example for MutablePropertyValues

Methods: addPropertyValue

0
        assertEquals(4, fieldTypes.size());
    } 
 
    @Test
    public void testBindMap() throws Exception {
        MutablePropertyValues values = new MutablePropertyValues();
        // navigate map with dot 
        values.addPropertyValue("fieldValues.IMAGE_UID", "1");
        values.addPropertyValue("fieldValues.SCANLOCATION", "1");
        values.addPropertyValue("fieldValues.BUSINESSPROCID", 0);
        values.addPropertyValue("fieldValues.MAINCASEID", 18378);
 
        // navigate map with bracket 
        values.addPropertyValue("fieldTypes['IMAGE_UID']", "string");
        values.addPropertyValue("fieldTypes['SCANLOCATION']", "string");
        values.addPropertyValue("fieldTypes['BUSINESSPROCID']", "integer");
        values.addPropertyValue("fieldTypes['MAINCASEID']", "integer");
 
        KeyValuesResultBean target = new KeyValuesResultBean();
        DataBinder binder = new DataBinder(target);
 
        // set the conversion service to convert the date