public Set<PanelInstance> getPanelsByParameter(final String paramId, final String value) throws Exception {
final Set<PanelInstance> results = new HashSet<PanelInstance>();
new HibernateTxFragment() {
protected void txFragment(Session session) throws Exception {
FlushMode flushMode = session.getFlushMode();
session.setFlushMode(FlushMode.COMMIT);
StringBuffer sql = new StringBuffer();
sql.append("select p ");
sql.append("from ").append(PanelInstance.class.getName()).append(" as p join p.panelParams as param ");