if (storedProcedure == null) {
//discovery
storedProcedure = SqlExpressUtil.lookupStoredProcedure(udc, processorName);
if (storedProcedure == null) {
throw new UnsupportedDataProcessorNameException();
}
else {
DBStore.getInstance().addStoredProcedure(processorName, storedProcedure);
}
}
selectedDataProcessor = new StoredProcedureProcessor(storedProcedure);
}
else if (DataProcessorTypes.FUNCTION_PROCESSOR.equals(processorType)) {
Function function = DBStore.getInstance().getFunction(processorName);
if (function == null) {
//discovery
function = SqlExpressUtil.lookupFunction(udc, processorName);
if (function == null) {
throw new UnsupportedDataProcessorNameException();
}
else {
DBStore.getInstance().addFunction(processorName, function);
}
}