diff --git a/force-app/main/default/classes/SOQL.cls b/force-app/main/default/classes/SOQL.cls index 4e86e88..df720b0 100644 --- a/force-app/main/default/classes/SOQL.cls +++ b/force-app/main/default/classes/SOQL.cls @@ -573,21 +573,21 @@ public virtual inherited sharing class SOQL implements Queryable { } public Map toMap() { - Map idToSObject = (Map) Type.forName('Map').newInstance(); - idToSObject.putAll(toList()); - return idToSObject; + Map recordPerId = (Map) Type.forName('Map').newInstance(); + recordPerId.putAll(toList()); + return recordPerId; } public Map toMap(SObjectField keyField) { with(keyField); - Map cutomKeyToRecord = (Map) Type.forName('Map').newInstance(); + Map recordPerCustomKey = (Map) Type.forName('Map').newInstance(); for (SObject record : toList()) { - cutomKeyToRecord.put(String.valueOf(record.get(keyField)), record); + recordPerCustomKey.put(String.valueOf(record.get(keyField)), record); } - return cutomKeyToRecord; + return recordPerCustomKey; } public Map toMap(SObjectField keyField, SObjectField valueField) { @@ -595,34 +595,34 @@ public virtual inherited sharing class SOQL implements Queryable { with(keyField, valueField); - Map cutomKeyToCustomValue = new Map(); + Map customValuePerCustomKey = new Map(); for (SObject record : toList()) { - cutomKeyToCustomValue.put( + customValuePerCustomKey.put( String.valueOf(record.get(keyField)), String.valueOf(record.get(valueField)) ); } - return cutomKeyToCustomValue; + return customValuePerCustomKey; } public Map> toAggregatedMap(SObjectField keyField) { with(keyField); - Map> cutomKeyToRecords = (Map>) Type.forName('Map>').newInstance(); + Map> recordsPerCustomKey = (Map>) Type.forName('Map>').newInstance(); for (SObject record : toList()) { - String customKey = String.valueOf(record.get(keyField)); + String key = String.valueOf(record.get(keyField)); - if (!cutomKeyToRecords.containsKey(customKey)) { - cutomKeyToRecords.put(customKey, new List()); + if (!recordsPerCustomKey.containsKey(key)) { + recordsPerCustomKey.put(key, new List()); } - cutomKeyToRecords.get(customKey).add(record); + recordsPerCustomKey.get(key).add(record); } - return cutomKeyToRecords; + return recordsPerCustomKey; } public Map> toAggregatedMap(SObjectField keyField, SObjectField valueField) { @@ -630,19 +630,19 @@ public virtual inherited sharing class SOQL implements Queryable { with(keyField, valueField); - Map> customKeyToValues = new Map>(); + Map> customValuesPerCustomKey = new Map>(); for (SObject record : toList()) { - String customKey = String.valueOf(record.get(keyField)); + String key = String.valueOf(record.get(keyField)); - if (!customKeyToValues.containsKey(customKey)) { - customKeyToValues.put(customKey, new List()); + if (!customValuesPerCustomKey.containsKey(key)) { + customValuesPerCustomKey.put(key, new List()); } - customKeyToValues.get(customKey).add(String.valueOf(record.get(valueField))); + customValuesPerCustomKey.get(key).add(String.valueOf(record.get(valueField))); } - return customKeyToValues; + return customValuesPerCustomKey; } public Database.QueryLocator toQueryLocator() {