protected void buildQuery(Session session) throws HibernateException, SQLException { Criteria c = session.createCriteria(ExperimenterGroup.class); Criteria m = c.createCriteria("groupExperimenterMap",Query.LEFT_JOIN); Criteria e = m.createCriteria("child",Query.LEFT_JOIN);  if (value("name") != null) { c.add( Restrictions.eq("name", value("name"))); }  else if (value("id") != null) { c.add( Restrictions.eq("id", value("id"))); }
protected void buildQuery(Session session) throws HibernateException, SQLException { Criteria c = session.createCriteria(ExperimenterGroup.class); Criteria m = c.createCriteria("groupExperimenterMap", Query.LEFT_JOIN); Criteria e = m.createCriteria("child", Query.LEFT_JOIN);
    	protected void buildQuery(Session session)     	throws HibernateException, SQLException {    		Criteria c = session.createCriteria(ExperimenterGroup.class);    		    		Criteria m = c.createCriteria("groupExperimenterMap",Query.LEFT_JOIN);    		Criteria e = m.createCriteria("child",Query.LEFT_JOIN);    		    		if (value("name") != null)    		{    			c.add( Restrictions.eq("name", value("name")));    		}     		    		else if (value("id") != null)    		{    			c.add( Restrictions.eq("id", value("id")));    		}    		else     		{    			throw new InternalException(    					"Name and id are both null for group query.");    		}    		setCriteria( c );    		    	}