public static Properties mapToProperties ( Map < String , Object > map ) { Properties properties = new Properties ( ) ; Iterator < ? extends Map . Entry < ? , ? > > i = map . entrySet ( ) . iterator ( ) ; while ( i . hasNext ( ) ) { Map . Entry < ? , ? > e = i . next ( ) ; properties . setProperty ( ( String ) e . getKey ( ) , ( e . getValue ( ) != null ) ? e . getValue ( ) . toString ( ) : DBConstants . BLANK ) ; } return properties ; }
Convert map to properties .