How to encapsulate SalatMongoCurser in Salat DAO?

Here a solution is explained on how to encapsulate database specific MongoDBObject when making a call to a salat DAO method. Now if I use the find method that returns a SalatMongoCursor, my code will again be dependent on the specific database. I see Here that changing the cursor to a list is bad for performance. Is there a better way out?

Answers


Having received no reactions so far to my question, I conclude the answer is "No". Personally, I decided to convert to a List because I will need to traverse it several times later anyway.


Need Your Help

Can you configure Windows to open JAR files like ZIP files without a 3rd party tool?

windows windows-explorer java zip jar

I'd like to be able to examine the contents of a JAR file without having to install Winzip or some other tool and without having to rename the file. Windows Explorer can open ZIP files just fine; is

Programmaticly report if ACL support is enable in Linux

linux shell acl

I am building a server install script and want to to check if ACL support has been enabled before setting directory default permissions.