mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
merge push infos into feeds
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user