@@ -582,10 +582,8 @@ public class fflib_QueryFactory { //No explicit sharing declaration - inherit fr
582582 * @param nullsLast whether to sort null values last (NULLS LAST keyword included).
583583 **/
584584 public fflib_QueryFactory setOrdering (String fieldName , SortOrder direction , Boolean nullsLast ){
585- setOrdering (
586- new Ordering (getFieldToken (fieldName ), direction , nullsLast )
587- );
588- return this ;
585+ Ordering ordr = new Ordering (getFieldPath (fieldName ), direction , nullsLast );
586+ return setOrdering (ordr );
589587 }
590588
591589 /**
@@ -599,11 +597,17 @@ public class fflib_QueryFactory { //No explicit sharing declaration - inherit fr
599597 * @param SortOrder the direction to be sorted on (ASCENDING or DESCENDING)
600598 * @param nullsLast whether to sort null values last (NULLS LAST keyword included).
601599 **/
600+ <<<<<<< HEAD
602601 public fflib_QueryFactory addOrdering (SObjectField field , SortOrder direction ){
603602 order .add (
604603 new Ordering (getFieldTokenPath (field ), direction )
605604 );
606605 return this ;
606+ ====== =
607+ public fflib_QueryFactory setOrdering (SObjectField field , SortOrder direction , Boolean nullsLast ){
608+ Ordering ordr = new Ordering (field , direction , nullsLast );
609+ return setOrdering (ordr );
610+ >>>>>> > #162 : updated setOrderings for methods with string field name parameter
607611 }
608612
609613 /**
@@ -619,10 +623,8 @@ public class fflib_QueryFactory { //No explicit sharing declaration - inherit fr
619623 * @param SortOrder the direction to be sorted on (ASCENDING or DESCENDING)
620624 **/
621625 public fflib_QueryFactory setOrdering (String fieldName , SortOrder direction ){
622- setOrdering (
623- new Ordering (getFieldToken (fieldName ), direction )
624- );
625- return this ;
626+ Ordering ordr = new Ordering (getFieldPath (fieldName ), direction );
627+ return setOrdering (ordr );
626628 }
627629
628630 /**
@@ -638,10 +640,8 @@ public class fflib_QueryFactory { //No explicit sharing declaration - inherit fr
638640 * @param SortOrder the direction to be sorted on (ASCENDING or DESCENDING)
639641 **/
640642 public fflib_QueryFactory setOrdering (SObjectField field , SortOrder direction ){
641- setOrdering (
642- new Ordering (field , direction )
643- );
644- return this ;
643+ Ordering ordr = new Ordering (field , direction );
644+ return setOrdering (ordr );
645645 }
646646
647647 /**
0 commit comments