-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into js_html_css_refactoring
- Loading branch information
Showing
26 changed files
with
3,928 additions
and
3,635 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,47 @@ | ||
/** | ||
* @description : | ||
* @author : [email protected] | ||
* @last modified on : 10-16-2022 | ||
* @last modified by : | ||
**/ | ||
public with sharing class CacheListViewConfig { | ||
|
||
public static List_View_Config__c get(String objectName, String listViewName) | ||
{ | ||
List_View_Config__c result = null; | ||
|
||
String key = CacheHelper.getValidKey(objectName + CacheHelper.SPLITTER + listViewName); | ||
System.debug(LoggingLevel.DEBUG, 'CacheListViews.get(' + key + ')'); | ||
if (key.length() < 50) //stupid restriction on key size!! | ||
{ | ||
result = (List_View_Config__c) CacheHelper.PARTITION.get(key); | ||
if (result == null) | ||
{ | ||
System.debug(LoggingLevel.DEBUG, 'RESULT IS NULL'); | ||
result = getData(objectName, listViewName); | ||
System.debug(LoggingLevel.DEBUG, 'RESULT IS NOW ' + result); | ||
if (result != null) | ||
CacheHelper.PARTITION.put(key, result); | ||
} else { | ||
System.debug(LoggingLevel.DEBUG, 'RESULT NOT NULL - ' + result); | ||
} | ||
} else { | ||
result = getData(objectName, listViewName); | ||
} | ||
return result; | ||
} | ||
|
||
public static void remove(String objectName, String listViewName) | ||
{ | ||
String key = CacheHelper.getValidKey(objectName + CacheHelper.SPLITTER + listViewName); | ||
System.debug(LoggingLevel.DEBUG, 'CacheListViews.remove(' + key + ')'); | ||
if (key.length() < 50) | ||
CacheHelper.PARTITION.remove(key); | ||
} | ||
|
||
private static List_View_Config__c getData(String objectName, String listViewName) | ||
{ | ||
return ListViewConfigHelper.getListViewConfigCache(objectName, listViewName); | ||
} | ||
|
||
/** | ||
* @description : | ||
* @author : [email protected] | ||
* @last modified on : 10-16-2022 | ||
* @last modified by : | ||
**/ | ||
public with sharing class CacheListViewConfig { | ||
|
||
public static List_View_Config__c get(String objectName, String listViewName) | ||
{ | ||
List_View_Config__c result = null; | ||
|
||
String key = CacheHelper.getValidKey(objectName + CacheHelper.SPLITTER + listViewName); | ||
System.debug(LoggingLevel.DEBUG, 'CacheListViews.get(' + key + ')'); | ||
if (key.length() < 50) //stupid restriction on key size!! | ||
{ | ||
result = (List_View_Config__c) CacheHelper.PARTITION.get(key); | ||
if (result == null) | ||
{ | ||
System.debug(LoggingLevel.DEBUG, 'RESULT IS NULL'); | ||
result = getData(objectName, listViewName); | ||
System.debug(LoggingLevel.DEBUG, 'RESULT IS NOW ' + result); | ||
if (result != null) | ||
CacheHelper.PARTITION.put(key, result); | ||
} else { | ||
System.debug(LoggingLevel.DEBUG, 'RESULT NOT NULL - ' + result); | ||
} | ||
} else { | ||
result = getData(objectName, listViewName); | ||
} | ||
return result; | ||
} | ||
|
||
public static void remove(String objectName, String listViewName) | ||
{ | ||
String key = CacheHelper.getValidKey(objectName + CacheHelper.SPLITTER + listViewName); | ||
System.debug(LoggingLevel.DEBUG, 'CacheListViews.remove(' + key + ')'); | ||
if (key.length() < 50) | ||
CacheHelper.PARTITION.remove(key); | ||
} | ||
|
||
private static List_View_Config__c getData(String objectName, String listViewName) | ||
{ | ||
return ListViewConfigHelper.getListViewConfigCache(objectName, listViewName); | ||
} | ||
|
||
} |
Oops, something went wrong.