Package org.odbms

Examples of org.odbms.Query.execute()


    Query q1 = gtm.query(Disc.class);
    q1.constrain("DGENRE", OP.EQUALS, FUNCTION.TO_UPPER, "Jazz");
    q1.constrain("DTITLE", OP.CONTAINS, FUNCTION.TO_UPPER, searchFor);
    q1.constrain("DYEAR", OP.GREATER, 1999);
    q1.sortBy("DYEAR");
    ObjectSet<Disc> discs = q1.execute();

    Util.printObjectSet(discs);
    q1.printConstraintInfo();
    gtm.printCacheStatistics();
View Full Code Here


    Query q2 = gtm.query(Disc.class);
    q2.constrain("DTITLE", OP.STARTS_WITH, FUNCTION.TO_UPPER, searchFor);
    q2.constrain("DTITLE", OP.CONTAINS, FUNCTION.TO_UPPER, "live");
    q2.constrain("DYEAR", OP.RANGE, 2000, 2002);
    q2.constrain("DGENRE", OP.EQUALS, FUNCTION.TO_UPPER, "BLUES");
    discs = q2.execute();

    Iterator<Disc> iter = discs.iterator();
    while (iter.hasNext()) {
      Disc disc = iter.next();
      System.out.println(disc);
View Full Code Here

    q1.sortBy("DTITLE");
    q1.sortBy("DGENRE");
    q1.sortByDescending("DYEAR");

    ObjectSet<Disc> discs = q1.execute();
    int discsSize = discs.size();

    int age = Integer.MIN_VALUE;
    for (Disc disc : discs) {
      if (age < disc.getAge()) {
View Full Code Here

      public boolean match(Band band)
      {
        return band.getAritsts().size() > 2;
      }
    });
    ObjectSet<Band> bands = query.execute();
  }

  /**
   *
   */
 
View Full Code Here

      public boolean match(Artist artist)
      {
        return artist.getName().equals("John Lennon");
      }
    });
    ObjectSet<Band> artists = query.execute();
  }

  /**
   *
   */
 
View Full Code Here

      public boolean match(Album album)
      {
        return album.getName().startsWith("Clock");
      }
    });
    ObjectSet<Album> albums = query.execute();

    for (Album album : albums) {
    }
  }
View Full Code Here

      public boolean match(Track track)
      {
        return track.getTitle().contains("road");
      }
    });
    ObjectSet<Track> tracks = query.execute();
  }
}
View Full Code Here

            Query q = broker.query();
            // we are faking a soda query here:
            ((QueryImpl) q).setOjbQuery(ojbQuery());
            int limit = 13;
            q.limitSize(limit);
            ObjectSet oSet = q.execute();
            logger.info("Size of ObjectSet: " + oSet.size());
            assertEquals(limit,oSet.size());
            int count = 0;
            while (oSet.hasNext())
            {
View Full Code Here

            Query q = broker.query();
            // we are faking a soda query here:
            ((QueryImpl) q).setOjbQuery(ojbQuery());
            int limit = 13;
            q.limitSize(limit);
            ObjectSet oSet = q.execute();
            logger.info("Size of ObjectSet: " + oSet.size());
            assertEquals(limit,oSet.size());
            int count = 0;
            for (int i=0; i<7; i++)
            {
View Full Code Here

        {
            Query q = broker.query();
            // we are faking a soda query here:
            ((QueryImpl) q).setOjbQuery(ojbQuery());
           
            ObjectSet oSet = q.execute();
            logger.info("Size of ObjectSet: " + oSet.size());
           
            int count = 0;
            for (int i=0; i<7; i++)
            {
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.