Examples of MyCustomIdBean


Examples of me.prettyprint.hom.beans.MyCustomIdBean

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

Examples of me.prettyprint.hom.beans.MyCustomIdBean

    ColumnSliceMockImpl slice = new ColumnSliceMockImpl();
    slice.add("lp1", LongSerializer.get().toBytes(longProp1));

    CFMappingDef<MyCustomIdBean, Colors> cfMapDef = cacheMgr.getCfMapDef(MyCustomIdBean.class, true);
    MyCustomIdBean obj = new HectorObjectMapper(cacheMgr).createObject(cfMapDef, id, slice);

    assertEquals(id, obj.getId());
    assertEquals(longProp1, obj.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.