Package com.commafeed.backend.model

Examples of com.commafeed.backend.model.QFeedSubscription


    return Iterables.getFirst(list, null);
  }

  public List<FeedEntry> findWithoutSubscriptions(int max) {
    QFeed feed = QFeed.feed;
    QFeedSubscription sub = QFeedSubscription.feedSubscription;
    return newQuery().from(entry).join(entry.feed, feed).leftJoin(feed.subscriptions, sub).where(sub.id.isNull()).limit(max)
        .list(entry);
  }
View Full Code Here


    disabledDatePredicate.or(feed.disabledUntil.isNull());
    disabledDatePredicate.or(feed.disabledUntil.lt(new Date()));

    HibernateQuery query = newQuery().from(feed);
    if (lastLoginThreshold != null) {
      QFeedSubscription subs = QFeedSubscription.feedSubscription;
      QUser user = QUser.user;
      query.join(feed.subscriptions, subs).join(subs.user, user).where(disabledDatePredicate, user.lastLogin.gt(lastLoginThreshold));
    } else {
      query.where(disabledDatePredicate);
    }
View Full Code Here

  public List<Feed> findByTopic(String topic) {
    return newQuery().from(feed).where(feed.pushTopicHash.eq(DigestUtils.sha1Hex(topic))).list(feed);
  }

  public List<Feed> findWithoutSubscriptions(int max) {
    QFeedSubscription sub = QFeedSubscription.feedSubscription;
    return newQuery().from(feed).leftJoin(feed.subscriptions, sub).where(sub.id.isNull()).limit(max).list(feed);
  }
View Full Code Here

TOP

Related Classes of com.commafeed.backend.model.QFeedSubscription

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.