use of org.drools.model.DataSourceDefinition in project drools by kiegroup.
the class BruteForceEngine method getPatternDataStore.
private DataStore getPatternDataStore(Pattern pattern) {
DeclarationSource source = ((Declaration) pattern.getPatternVariable()).getSource();
String sourceName = ((DataSourceDefinition) source).getName();
DataStore dataStore = (DataStore) dataSources.get(sourceName);
if (dataStore == null) {
throw new RuntimeException("Unknonw DataSource: " + sourceName);
}
return dataStore;
}
Aggregations