protected DataSet loadDataSet(DataProvider dataProvider) throws Exception {
   CodeBlockTrace trace =
       CodeBlockHelper.newCodeBlockTrace(
               CoreCodeBlockTypes.DATASET_LOAD,
               "dataset-load-" + dataProvider.getCode(),
               "Data set load - " + dataProvider.getDescription(LocaleManager.currentLocale()),
               createDataProviderContext(dataProvider))
           .begin();
   try {
     DataSet dataSet = dataProvider.getDataLoader().load(dataProvider);
     dataSet.setDataProvider(dataProvider);
     ((DataProviderImpl) dataProvider).deserializeDataProperties(dataSet);
     return dataSet;
   } finally {
     trace.end();
   }
 }
 public DataSet filterDataSet(DataProvider dataProvider, DataFilter dataFilter) throws Exception {
   CodeBlockTrace trace =
       CodeBlockHelper.newCodeBlockTrace(
               CoreCodeBlockTypes.DATASET_FILTER,
               "dataset-filter-" + dataProvider.getCode(),
               "Data set filter - " + dataProvider.getDescription(LocaleManager.currentLocale()),
               createDataProviderContext(dataProvider))
           .begin();
   try {
     DataSetHolder dataSetHolder = getDataSetHolder(dataProvider);
     dataSetHolder.filteredDataSet = dataSetHolder.originalDataSet.filter(dataFilter);
     if (dataSetHolder.filteredDataSet != null) {
       ((DataProviderImpl) dataProvider).deserializeDataProperties(dataSetHolder.filteredDataSet);
     }
     return dataSetHolder.getDataSet();
   } finally {
     trace.end();
   }
 }