Skip to content

Commit ede2c24

Browse files
committed
Changes allRows method to no parameters, adds curly braces
1 parent 0016af1 commit ede2c24

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

sfdx-source/apex-common/main/classes/fflib_QueryFactory.cls

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -666,8 +666,8 @@ public class fflib_QueryFactory { //No explicit sharing declaration - inherit fr
666666
/**
667667
* @param addAllRows whether an ALL ROWS clause will be added to the resulting query.
668668
**/
669-
public fflib_QueryFactory setAllRows(Boolean addAllRows){
670-
this.allRows = addAllRows;
669+
public fflib_QueryFactory setAllRows(){
670+
this.allRows = true;
671671
return this;
672672
}
673673

@@ -713,8 +713,9 @@ public class fflib_QueryFactory { //No explicit sharing declaration - inherit fr
713713
if(offsetCount != null)
714714
result += ' OFFSET '+offsetCount;
715715

716-
if(allRows)
716+
if(allRows) {
717717
result += ' ALL ROWS';
718+
}
718719

719720
return result;
720721
}
@@ -728,7 +729,6 @@ public class fflib_QueryFactory { //No explicit sharing declaration - inherit fr
728729
fflib_QueryFactory clone = new fflib_QueryFactory(this.table)
729730
.setLimit(this.limitCount)
730731
.setOffset(this.offsetCount)
731-
.setAllRows(this.allRows)
732732
.setCondition(this.conditionExpression)
733733
.setEnforceFLS(this.enforceFLS);
734734

sfdx-source/apex-common/test/classes/fflib_QueryFactoryTest.cls

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,6 @@ private class fflib_QueryFactoryTest {
564564
.selectField('Description')
565565
.addOrdering(new fflib_QueryFactory.Ordering('Contact','name',fflib_QueryFactory.SortOrder.ASCENDING) )
566566
.addOrdering( new fflib_QueryFactory.Ordering('Contact','CreatedDATE',fflib_QueryFactory.SortOrder.DESCENDING))
567-
.setAllRows(true)
568567
.setEnforceFLS(true);
569568

570569
fflib_QueryFactory qf2 = qf.deepClone();
@@ -585,7 +584,6 @@ private class fflib_QueryFactoryTest {
585584
.selectField('Description')
586585
.addOrdering(new fflib_QueryFactory.Ordering('Account','Name',fflib_QueryFactory.SortOrder.ASCENDING) )
587586
.addOrdering( new fflib_QueryFactory.Ordering('Account','Description',fflib_QueryFactory.SortOrder.DESCENDING))
588-
.setAllRows(true)
589587
.setEnforceFLS(true);
590588

591589
qf.subselectQuery('Contacts', true);
@@ -609,7 +607,6 @@ private class fflib_QueryFactoryTest {
609607
.selectField('Description')
610608
.addOrdering(new fflib_QueryFactory.Ordering('Contact','name',fflib_QueryFactory.SortOrder.ASCENDING) )
611609
.addOrdering( new fflib_QueryFactory.Ordering('Contact','CreatedDATE',fflib_QueryFactory.SortOrder.DESCENDING))
612-
.setAllRows(true)
613610
.setEnforceFLS(true);
614611

615612

@@ -701,7 +698,7 @@ private class fflib_QueryFactoryTest {
701698
//Given
702699
fflib_QueryFactory qf = new fflib_QueryFactory(User.SObjectType);
703700
qf.selectField('Id');
704-
qf.setAllRows(true);
701+
qf.setAllRows();
705702

706703
String allRowsQuery =
707704
'SELECT Id '

0 commit comments

Comments
 (0)