use of org.broadleafcommerce.cms.structure.domain.StructuredContentImpl in project BroadleafCommerce by BroadleafCommerce.
the class StructuredContentDaoImpl method findAllContentItems.
@Override
public List<StructuredContent> findAllContentItems() {
CriteriaBuilder builder = em.getCriteriaBuilder();
CriteriaQuery<StructuredContent> criteria = builder.createQuery(StructuredContent.class);
Root<StructuredContentImpl> sc = criteria.from(StructuredContentImpl.class);
criteria.select(sc);
try {
TypedQuery<StructuredContent> query = em.createQuery(criteria);
query.setHint(QueryHints.HINT_CACHEABLE, true);
return query.getResultList();
} catch (NoResultException e) {
return new ArrayList<StructuredContent>();
}
}
Aggregations