Package com.google.code.morphia.query

Examples of com.google.code.morphia.query.Query.field()


    }

    List<TorrentStats> torrentStatsList = new ArrayList<TorrentStats>();
    for (byte[] infoHash : infoHashes) {
      Query seedersQuery = Datastore.instance().createQuery(Peer.class);
      seedersQuery.field("infoHash").equal(infoHash);
      seedersQuery.field("left").equal(0);

      Query leechersQuery = Datastore.instance().createQuery(Peer.class);
      leechersQuery.field("infoHash").equal(infoHash);
      leechersQuery.field("left").greaterThan(0);
View Full Code Here


    List<TorrentStats> torrentStatsList = new ArrayList<TorrentStats>();
    for (byte[] infoHash : infoHashes) {
      Query seedersQuery = Datastore.instance().createQuery(Peer.class);
      seedersQuery.field("infoHash").equal(infoHash);
      seedersQuery.field("left").equal(0);

      Query leechersQuery = Datastore.instance().createQuery(Peer.class);
      leechersQuery.field("infoHash").equal(infoHash);
      leechersQuery.field("left").greaterThan(0);
View Full Code Here

      Query seedersQuery = Datastore.instance().createQuery(Peer.class);
      seedersQuery.field("infoHash").equal(infoHash);
      seedersQuery.field("left").equal(0);

      Query leechersQuery = Datastore.instance().createQuery(Peer.class);
      leechersQuery.field("infoHash").equal(infoHash);
      leechersQuery.field("left").greaterThan(0);

      TorrentStats torrentStats = new TorrentStats();
      torrentStats.infoHash = infoHash;
      torrentStats.seeders = (int)seedersQuery.countAll();
View Full Code Here

      seedersQuery.field("infoHash").equal(infoHash);
      seedersQuery.field("left").equal(0);

      Query leechersQuery = Datastore.instance().createQuery(Peer.class);
      leechersQuery.field("infoHash").equal(infoHash);
      leechersQuery.field("left").greaterThan(0);

      TorrentStats torrentStats = new TorrentStats();
      torrentStats.infoHash = infoHash;
      torrentStats.seeders = (int)seedersQuery.countAll();
      torrentStats.completed = 0; // TODO: Для этого поля нам понадобится вести статистику загрузок.
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.