Package org.tarantool.facade

Examples of org.tarantool.facade.TarantoolTemplate7.save()


    }
    User user = new User();
    tpl.delete(User.class, user.getId()).delete();
    assertNull(tpl.find(User.class, 0, "id").condition(123).one());

    assertEquals(1, tpl.save(user).insertOrReplace());
    try {
      tpl.save(user).insert();
      fail();
    } catch (TarantoolException e) {
View Full Code Here


    tpl.delete(User.class, user.getId()).delete();
    assertNull(tpl.find(User.class, 0, "id").condition(123).one());

    assertEquals(1, tpl.save(user).insertOrReplace());
    try {
      tpl.save(user).insert();
      fail();
    } catch (TarantoolException e) {

    }
    user.setBirthday(new Date((user.getBirthday().getTime() / 1000L) * 1000L));
 
View Full Code Here

      fail();
    } catch (TarantoolException e) {

    }
    user.setBirthday(new Date((user.getBirthday().getTime() / 1000L) * 1000L));
    assertTrue(user.equals(tpl.save(user).replaceAndGet()));

    assertNotNull(tpl.find(User.class, 1, "name").condition(user.getName()).one());
  }

  @Test
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.