Continuing the discussion with @Dale_Culpin from Cannot figure out how to do a GROUP BY using the MongoDB Java Sync driver API: because I missed the final reply.
Yes
Example:
String query_string = "{ 'username' : 'steevej' }" ;
Document query = Document.parse( query_string ) ;