UPDATED to the latest MongoDB Java and Morphia driver
CHANGED to the diamond operator from JDK6 syntax
CHANGED some boolean logic to a simpler form (?)