Merge pull request #1073 from KevinVdV/DS-2764-CollectionDAOImpl-params-switched

[DS-2764] CollectionDAOImpl - Parameters Switched
This commit is contained in:
Tim Donohue
2015-09-23 10:47:32 -05:00

View File

@@ -58,12 +58,12 @@ public class CollectionDAOImpl extends AbstractHibernateDSODAO<Collection> imple
addMetadataSortQuery(query, Arrays.asList(order), null); addMetadataSortQuery(query, Arrays.asList(order), null);
Query hibernateQuery = createQuery(context, query.toString()); Query hibernateQuery = createQuery(context, query.toString());
if(limit != null) if(offset != null)
{ {
hibernateQuery.setFirstResult(limit); hibernateQuery.setFirstResult(offset);
} }
if(offset != null){ if(limit != null){
hibernateQuery.setMaxResults(offset); hibernateQuery.setMaxResults(limit);
} }
hibernateQuery.setParameter(order.toString(), order.getFieldID()); hibernateQuery.setParameter(order.toString(), order.getFieldID());
return list(hibernateQuery); return list(hibernateQuery);