public DataSet getDataSet(String uuid) { try { DataSetDef dataSetDef = dataSetDefRegistry.getDataSetDef(uuid); if (dataSetDef == null) { throw new RuntimeException(DATA_SET_NOT_FOUND + uuid); } // Fetch the specified data set return resolveProvider(dataSetDef) .lookupDataSet(dataSetDef, null); } catch (Exception e) { throw new RuntimeException("Can't fetch the specified data set: " + uuid, e); } }
public DataSet lookupDataSet(DataSetLookup lookup) { String uuid = lookup.getDataSetUUID(); if (StringUtils.isBlank(uuid)) { return null; } DataSetDef dataSetDef = dataSetDefRegistry.getDataSetDef(uuid); if (dataSetDef == null) { throw new RuntimeException(DATA_SET_NOT_FOUND + uuid); } List<DataSetPreprocessor> dataSetDefPreProcessors = dataSetDefRegistry.getDataSetDefPreProcessors(uuid); if (dataSetDefPreProcessors != null) { for(DataSetPreprocessor p : dataSetDefPreProcessors){ p.preprocess(lookup); } } try { return resolveProvider(dataSetDef) .lookupDataSet(dataSetDef, lookup); } catch (Exception e) { throw new DataSetLookupException(uuid, "Can't lookup on specified data set: " + lookup.getDataSetUUID(), e); } }
public DataSet lookupDataSet(DataSetDef def, DataSetLookup lookup) throws Exception { try { // Although if using a not registered definition, it must have an uuid set for performing lookups. if (def.getUUID() == null) { final String uuid = uuidGenerator.newUuid(); def.setUUID(uuid); lookup.setDataSetUUID(uuid); } return dataSetManager.resolveProvider(def) .lookupDataSet(def, lookup); } catch (Exception e) { throw exceptionManager.handleException(e); } }
public DataSet lookupDataSet(DataSetDef def, DataSetLookup lookup) throws Exception { try { // Although if using a not registered definition, it must have an uuid set for performing lookups. if (def.getUUID() == null) { final String uuid = uuidGenerator.newUuid(); def.setUUID(uuid); lookup.setDataSetUUID(uuid); } return dataSetManager.resolveProvider(def) .lookupDataSet(def, lookup); } catch (Exception e) { throw exceptionManager.handleException(e); } }