in DLFolderFinderImpl, the static Method
is called to generate an Iterator for the results of a SQL-Query.
Normally this should work nevertheless which DB you are using, since there is ORM. But in DLFolderFinderImpl there is no class that should be mapped. So there is just a Object and that is not handled well in QueryUtil for databases that don't support the SQL "limit" function, like Derby DB.
Therefor you need som extra treatment. Therefor I created two private methods that handle the Iterator-generation, if the DB does not support "limit".