public DBObject toDBObject ( final Object entity ) { try { return mapper . toDBObject ( entity ) ; } catch ( Exception e ) { throw new MappingException ( "Could not map entity to DBObject" , e ) ; } }
Converts an entity to a DBObject . This method is primarily an internal method . Reliance on this method may break your application in future releases .