Package com.rapleaf.jack.test_project.database_1.iface

Examples of com.rapleaf.jack.test_project.database_1.iface.IImagePersistence.find()


    users.create("unwanted", t0, 0, t1, t2, "yet another relatively long string", someBinary, 1.2d, 3.4d, true);

    Set<Long> keysToSearch = new HashSet<Long>();
    keysToSearch.add(bryand.getId());
    keysToSearch.add(notBryand.getId());
    Set<User> foundValues = users.find(keysToSearch);

    assertEquals(2, foundValues.size());
    Iterator<User> iter = foundValues.iterator();
    User bryand_again = users.find(bryand.getId());
    User notBryand_again = users.find(notBryand.getId());
View Full Code Here


    keysToSearch.add(notBryand.getId());
    Set<User> foundValues = users.find(keysToSearch);

    assertEquals(2, foundValues.size());
    Iterator<User> iter = foundValues.iterator();
    User bryand_again = users.find(bryand.getId());
    User notBryand_again = users.find(notBryand.getId());
    while (iter.hasNext()) {
      User curUser = iter.next();
      if (curUser.getId() == bryand.getId()) {
        assertEquals(bryand_again, curUser);
View Full Code Here

    Set<User> foundValues = users.find(keysToSearch);

    assertEquals(2, foundValues.size());
    Iterator<User> iter = foundValues.iterator();
    User bryand_again = users.find(bryand.getId());
    User notBryand_again = users.find(notBryand.getId());
    while (iter.hasNext()) {
      User curUser = iter.next();
      if (curUser.getId() == bryand.getId()) {
        assertEquals(bryand_again, curUser);
      } else if (curUser.getId() == notBryand.getId()) {
View Full Code Here

  public void testFindCache() throws Exception {
    IUserPersistence users = dbs.getDatabase1().users();
    User user = users.create("bryand", System.currentTimeMillis(), 5, System.currentTimeMillis() + 10, System.currentTimeMillis() + 20, "this is a relatively long string", new byte[]{5, 4, 3, 2, 1}, 1.2d, 3.4d, true);

    User u1 = users.find(user.getId());
    User u2 = users.find(user.getId());
    assertEquals(u1, u2);
  }

  public void testFindAllByForeignKey() throws Exception {
View Full Code Here

  public void testFindCache() throws Exception {
    IUserPersistence users = dbs.getDatabase1().users();
    User user = users.create("bryand", System.currentTimeMillis(), 5, System.currentTimeMillis() + 10, System.currentTimeMillis() + 20, "this is a relatively long string", new byte[]{5, 4, 3, 2, 1}, 1.2d, 3.4d, true);

    User u1 = users.find(user.getId());
    User u2 = users.find(user.getId());
    assertEquals(u1, u2);
  }

  public void testFindAllByForeignKey() throws Exception {
    ICommentPersistence comments = dbs.getDatabase1().comments();
View Full Code Here

    User u1 = users.create("bryand", System.currentTimeMillis(), 5, System.currentTimeMillis() + 10, System.currentTimeMillis() + 20, "this is a relatively long string", new byte[]{5, 4, 3, 2, 1}, 1.2d, 3.4d, true);
    User u2 = users.create("thomask", System.currentTimeMillis(), 5, System.currentTimeMillis() + 10, System.currentTimeMillis() + 20, "this is a relatively long string", new byte[]{5, 4, 3, 2, 1}, 1.2d, 3.4d, true);
    User u3 = users.create("emilyl", System.currentTimeMillis(), 5, System.currentTimeMillis() + 10, System.currentTimeMillis() + 20, "this is a relatively long string", new byte[]{5, 4, 3, 2, 1}, 1.2d, 3.4d, true);

    // fills cache
    User u1_1 = users.find(u1.getId());
    User u2_1 = users.find(u2.getId());
    User u3_1 = users.find(u3.getId());

    Set<User> allUsers = users.findAll();
    assertTrue(allUsers.contains(u1));
View Full Code Here

    User u2 = users.create("thomask", System.currentTimeMillis(), 5, System.currentTimeMillis() + 10, System.currentTimeMillis() + 20, "this is a relatively long string", new byte[]{5, 4, 3, 2, 1}, 1.2d, 3.4d, true);
    User u3 = users.create("emilyl", System.currentTimeMillis(), 5, System.currentTimeMillis() + 10, System.currentTimeMillis() + 20, "this is a relatively long string", new byte[]{5, 4, 3, 2, 1}, 1.2d, 3.4d, true);

    // fills cache
    User u1_1 = users.find(u1.getId());
    User u2_1 = users.find(u2.getId());
    User u3_1 = users.find(u3.getId());

    Set<User> allUsers = users.findAll();
    assertTrue(allUsers.contains(u1));
    assertTrue(allUsers.contains(u2));
View Full Code Here

    User u3 = users.create("emilyl", System.currentTimeMillis(), 5, System.currentTimeMillis() + 10, System.currentTimeMillis() + 20, "this is a relatively long string", new byte[]{5, 4, 3, 2, 1}, 1.2d, 3.4d, true);

    // fills cache
    User u1_1 = users.find(u1.getId());
    User u2_1 = users.find(u2.getId());
    User u3_1 = users.find(u3.getId());

    Set<User> allUsers = users.findAll();
    assertTrue(allUsers.contains(u1));
    assertTrue(allUsers.contains(u2));
    assertTrue(allUsers.contains(u3));
View Full Code Here

    Set<User> allUsers = users.findAll();
    assertTrue(allUsers.contains(u1));
    assertTrue(allUsers.contains(u2));
    assertTrue(allUsers.contains(u3));

    User u1_1 = users.find(u1.getId());
    // make sure caching worked as expected
    boolean found = false;
    for (User user : allUsers) {
      if (user.getId() == u1_1.getId()) {
        found = true;
View Full Code Here

    User u1 = users.create("a_handle", 2);
    users.save(u1);

    User u2 = users.create("another_handle", 2);

    Set<User> found = users.find(new HashMap<Enum, Object>() {
      {
        put(User._Fields.handle, "a_handle");
        put(User._Fields.some_float, null);
      }
    });
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.