public void setEntityProperties(Object entity, StructuredType entityType, Map<String, Object> map,
                                    Object currentNode) throws ODataException {

        Set<String> keySet = map.keySet();
        for (StructuralProperty property : getAllProperties(entityType, entityDataModel)) {
            Field field = property.getJavaField();
            String node = property.getName();
            LOG.debug("Property Name is {}", node);

            if (property.isCollection()) {
                if (currentNode == null) {
                    fillCollectionProperty(entity, keySet, property, field, node, map);
                } else {
                    fillUpdatedCollectionProperty(entity, currentNode, property, field, node, map);
                }
            } else {
                if (currentNode == null) {
                    fillPrimitiveProperty(entity, keySet, property, field, node, map);
                } else {
                    if (currentNode instanceof String) {
                        fillEntryFeed(entity, currentNode, property, field, node, map);
                    } else {
                        fillUpdatedObjectProperty(entity, currentNode, property, field, node, map);
                    }
                }
            }
        }
    }
public void setEntityProperties ( Object entity , StructuredType entityType , Map < String , Object > map , Object currentNode ) throws ODataException { Set < String > keySet = map . keySet ( ) ; for ( StructuralProperty property : getAllProperties ( entityType , entityDataModel ) ) { Field field = property . getJavaField ( ) ; String node = property . getName ( ) ; LOG . debug ( "Property Name is {}" , node ) ; if ( property . isCollection ( ) ) { if ( currentNode == null ) { fillCollectionProperty ( entity , keySet , property , field , node , map ) ; } else { fillUpdatedCollectionProperty ( entity , currentNode , property , field , node , map ) ; } } else { if ( currentNode == null ) { fillPrimitiveProperty ( entity , keySet , property , field , node , map ) ; } else { if ( currentNode instanceof String ) { fillEntryFeed ( entity , currentNode , property , field , node , map ) ; } else { fillUpdatedObjectProperty ( entity , currentNode , property , field , node , map ) ; } } } } }
Sets the given entity with structural properties from the fields.

@param entity      entity
@param entityType  entityType
@param map         a map of field values
@param currentNode the current node to process
@throws ODataException If unable to set entity properties