private Object getMapValue ( Class < ? > keyType , Class < ? > valueType , String propertyName , EDBObject object ) { Map < Object , Object > temp = new HashMap <> ( ) ; for ( int i = 0 ; ; i ++ ) { String keyProperty = getEntryNameForMapKey ( propertyName , i ) ; String valueProperty = getEntryNameForMapValue ( propertyName , i ) ; if ( ! object . containsKey ( keyProperty ) ) { break ; } Object key = object . getObject ( keyProperty ) ; Object value = object . getObject ( valueProperty ) ; if ( OpenEngSBModel . class . isAssignableFrom ( keyType ) ) { key = convertEDBObjectToUncheckedModel ( keyType , edbService . getObject ( key . toString ( ) ) ) ; } if ( OpenEngSBModel . class . isAssignableFrom ( valueType ) ) { value = convertEDBObjectToUncheckedModel ( valueType , edbService . getObject ( value . toString ( ) ) ) ; } temp . put ( key , value ) ; object . remove ( keyProperty ) ; object . remove ( valueProperty ) ; } return temp ; }
Gets a map object out of an EDBObject .