"and published = 'Y'";
Query query = em.createQuery(sql);
query.setParameter("siteDomain", siteDomain);
Iterator<?> iterator = query.getResultList().iterator();
while (iterator.hasNext()) {
Menu menu = (Menu) iterator.next();
vector.add(menu);
}
Menu menus[] = new Menu[vector.size()];
vector.copyInto(menus);
return menus;
}