The source code in this project describes how to work with mongodb using Driver version 3 . The source code provides examples that work with new Document class and if you want to work with objects then you should write codecs the source code has examples which you can follow and implement your own codecs for your objects. You can checkout this project into netbeans or any IDE of your choice and start working with the code. You must have installed mongodb listening on the default port or you can change the port in the code. also the source code requires a user in admin database .
Happy Codding!