Package me.prettyprint.hom

Examples of me.prettyprint.hom.EntityManagerImpl.save()


    MyPojo pojo1 = new MyPojo();
    pojo1.setId(UUID.randomUUID());
    pojo1.setLongProp1(123L);
    pojo1.setColor(Colors.RED);

    em.save(pojo1);

    // do some stuff

    MyPojo pojo2 = em.load(MyPojo.class, pojo1.getId());
View Full Code Here


  public void testInitializeSaveLoadCustomId() {
    EntityManagerImpl em = new EntityManagerImpl(keyspace, "me.prettyprint.hom.beans");
    MyCustomIdBean o1 = new MyCustomIdBean();
    o1.setId(Colors.GREEN);
    o1.setLongProp1(111L);
    em.save(o1);
    MyCustomIdBean o2 = em.load(MyCustomIdBean.class, Colors.GREEN);

    assertEquals(o1.getId(), o2.getId());
    assertEquals(o1.getLongProp1(), o2.getLongProp1());
  }
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.