merge push infos into feeds

This commit is contained in:
Athou
2013-06-05 21:50:26 +02:00
parent 7943c8e1e6
commit dbe7b48a04
9 changed files with 55 additions and 187 deletions

View File

@@ -7,7 +7,6 @@ import java.util.List;
import javax.ejb.Stateless;
import javax.persistence.TypedQuery;
import javax.persistence.criteria.CriteriaQuery;
import javax.persistence.criteria.JoinType;
import javax.persistence.criteria.Predicate;
import javax.persistence.criteria.Root;
@@ -60,7 +59,6 @@ public class FeedDAO extends GenericDAO<Feed> {
Root<Feed> root = query.from(getType());
query.where(getUpdatablePredicates(root).toArray(new Predicate[0]));
root.fetch(Feed_.pushInfo, JoinType.LEFT);
query.orderBy(builder.asc(root.get(Feed_.lastUpdated)));
@@ -88,4 +86,8 @@ public class FeedDAO extends GenericDAO<Feed> {
criteria.setMaxResults(limit);
return criteria.getSingleResult();
}
public List<Feed> findByTopic(String topic) {
return findByField(Feed_.pushTopic, topic);
}
}