You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: fflib/src/classes/fflib_QueryFactory.cls
+30-40Lines changed: 30 additions & 40 deletions
Original file line number
Diff line number
Diff line change
@@ -338,9 +338,10 @@ public class fflib_QueryFactory { //No explicit sharing declaration - inherit fr
338
338
this.order.add(o);
339
339
returnthis;
340
340
}
341
+
341
342
/**
342
343
* @paramo an instance of {@link fflib_QueryFactory.Ordering} to remove all existing (for instance defaults) and be added to the query's ORDER BY clause.
343
-
**/
344
+
**/
344
345
publicfflib_QueryFactorysetOrdering(Orderingo){
345
346
this.order=newList<Ordering>{ o };
346
347
returnthis;
@@ -547,7 +548,7 @@ public class fflib_QueryFactory { //No explicit sharing declaration - inherit fr
System.assertEquals(1, qf.getOrderings().size(), 'Unexpected order size - setOrder should replace default Orderings');
175
175
System.assertEquals(Contact.OwnerId.getDescribe().getName(), qf.getOrderings()[0].getField(), 'Unexpected order field - should have been resolved from the field OwnerId');
176
176
System.assertEquals(fflib_QueryFactory.SortOrder.DESCENDING, qf.getOrderings()[0].getDirection(), 'Unexpected order direction.');
177
177
178
178
//test method overload with ordering by LastModifiedDate Ascending
System.assertEquals(1, qf.getOrderings().size(), 'Unexpected order size - setOrder should replace previous Orderings');
182
182
System.assertEquals(Contact.LastModifiedDate.getDescribe().getName(), qf.getOrderings()[0].getField(), 'Unexpected order field - should have been resolved from the field LastModifiedDate');
183
183
System.assertEquals(fflib_QueryFactory.SortOrder.ASCENDING, qf.getOrderings()[0].getDirection(), 'Unexpected order direction.');
0 commit comments