@ SuppressWarnings ( "unchecked" ) public static Object getMapEntry ( final Map < String , ? > iMap , final Object iKey ) { if ( iMap == null || iKey == null ) return null ; if ( iKey instanceof String ) { String iName = ( String ) iKey ; int pos = iName . indexOf ( ' ' ) ; if ( pos > - 1 ) iName = iName . substring ( 0 , pos ) ; final Object value = iMap . get ( iName ) ; if ( value == null ) return null ; if ( pos > - 1 ) { final String restFieldName = iName . substring ( pos + 1 ) ; if ( value instanceof ODocument ) return getFieldValue ( value , restFieldName ) ; else if ( value instanceof Map < ? , ? > ) return getMapEntry ( ( Map < String , ? > ) value , restFieldName ) ; } return value ; } else return iMap . get ( iKey ) ; }
Retrieves the value crossing the map with the dotted notation