sql.append("where dse.name = :name");
Query query = session.createQuery(sql.toString());
query.setString("name", name);
query.setCacheable(true);
results.addAll(query.list());
session.setFlushMode(flushMode);
}}.execute();
if (results.size() > 0) {
if (results.size() > 1) log.error("There are " + results.size() + " data sources with name=" + name);
return (DataSourceEntry)results.get(0);