@org.jnario.runner.Extension
public EntityDataAccessModuleFileCompiler _entityDataAccessModuleFileCompiler;
private DataSource datasource(final CharSequence input, final String datasourceName) {
try {
DataSource _xblockexpression = null;
{
final Model model = this._parseHelper.parse(input);
EList<NamedElement> _elements = model.getElements();
Iterable<DataSource> _filter = Iterables.<DataSource>filter(_elements, DataSource.class);
final Function1<DataSource,Boolean> _function = new Function1<DataSource,Boolean>() {
public Boolean apply(final DataSource it) {
String _name = it.getName();
boolean _equals = Objects.equal(_name, datasourceName);
return Boolean.valueOf(_equals);
}
};
DataSource _findFirst = IterableExtensions.<DataSource>findFirst(_filter, _function);
_xblockexpression = (_findFirst);
}
return _xblockexpression;
} catch (Throwable _e) {
throw Exceptions.sneakyThrow(_e);