This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * @name : SOQLQueryBuilder | |
| * @description | |
| * Fluent SOQL builder with enum-based operators. | |
| * Safe for managed packages and Apex parser. | |
| * @version 2.0.2 | |
| * @since 2026 | |
| */ | |
| public with sharing class SOQLQueryBuilder { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static Map<String,Object> fetchData(String strObjectApiName, String strfieldSetName, | |
| String whereClauseField, String whereClauseFieldValue){ | |
| Map<String, Object> dataMap = new Map<String,Object>(); | |
| if(String.isNotEmpty(strObjectApiName) && String.isNotEmpty(strfieldSetName)){ | |
| SObject sObj = (SObject)(Type.forName('Schema.'+ strObjectApiName).newInstance()); | |
| List<Schema.FieldSetMember> fieldsetMemberList = |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static String buildSOQL(String objectAPIName) { | |
| // Retrieving the field names using the object api name | |
| Set<String> fieldNames = getSObjectFields(objectAPIName); | |
| // Building the SOQL query | |
| String query = 'SELECT '; | |
| for(String fieldName : fieldNames) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class TransactionService { | |
| /** | |
| * Meat of the TransactionService | |
| * | |
| * 1 - Set/get of transactionId | |
| * 2 - Track visitedIds by scopeKey to avoid recursion | |
| * 3 - Track whether a "context" is enabled or disabled - especially useful for testmethods | |
| to switch of async handling | |
| **/ |