Common patterns for Java applications interfacing with MongoDB