return criteria.list();
}
@Override
public List<YFTheme> getCategoryThemes(long categoryId) {
HibernateEntityManager hem = (HibernateEntityManager) em.getDelegate();
Criteria criteria = hem.getSession().createCriteria(YFTheme.class);
criteria.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY);
criteria.createAlias("categories", "c");
criteria.add(Restrictions.eq("c.id", categoryId));
return criteria.list();