Examples of ObjectStore


Examples of com.google.code.gaeom.ObjectStore

  }

  @Test
  public void testLoadSingleStringId()
  {
    ObjectStore os = ObjectStore.Factory.create();

    os.beginSession().store(new X(), new X(), new X()).ids("a", "b", "c").now();

    assertEquals(X.class, os.beginSession().load(X.class).id("a").now().getClass());
  }
View Full Code Here

Examples of com.google.code.gaeom.ObjectStore

  }

  @Test
  public void testLoadMultipleStringId()
  {
    ObjectStore os = ObjectStore.Factory.create();

    os.beginSession().store(new X(), new X(), new X()).ids("a", "b", "c").now();

    assertEquals(3, os.beginSession().load(X.class).ids("a", "b", "c").now().size());
  }
View Full Code Here

Examples of com.google.code.gaeom.ObjectStore

  }

  @Test
  public void testLoadSingleKey()
  {
    ObjectStore os = ObjectStore.Factory.create();

    Key key = os.beginSession().store(new X()).now();

    assertEquals(X.class, os.beginSession().load(key).now().getClass());
  }
View Full Code Here

Examples of com.google.code.gaeom.ObjectStore

  }

  @Test
  public void testLoadMultipleKeys()
  {
    ObjectStore os = ObjectStore.Factory.create();

    List<Key> keys = os.beginSession().store(new X(), new X(), new X()).now();

    assertEquals(3, Lists.newArrayList(os.beginSession().load(keys).now()).size());
  }
View Full Code Here

Examples of com.google.code.gaeom.ObjectStore

  }

  @Test
  public void testRefreshSingleKey()
  {
    ObjectStore os = ObjectStore.Factory.create();
    ObjectStoreSession oss = os.beginSession();
    X x = new X();
    x.blah = "fred";
    Key key = oss.store(x).now();
    x.blah = "mary";
    assertEquals("mary", oss.load(key).<X> now().blah);
View Full Code Here

Examples of com.google.code.gaeom.ObjectStore

  }

  @Test
  public void testRefreshSingleKey2()
  {
    ObjectStore os = ObjectStore.Factory.create();
    ObjectStoreSession oss = os.beginSession();
    X x = new X();
    x.blah = "fred";
    Key key = oss.store(x).now();
    x.blah = "mary";
    assertEquals("mary", oss.load(key).<X> now().blah);
View Full Code Here

Examples of com.google.code.gaeom.ObjectStore

  }

  @Test
  public void testRefreshMultipleKeys()
  {
    ObjectStore os = ObjectStore.Factory.create();
    ObjectStoreSession oss = os.beginSession();
    X x1 = new X();
    x1.blah = "fred1";
    X x2 = new X();
    x2.blah = "fred2";
    X x3 = new X();
View Full Code Here

Examples of com.google.code.gaeom.ObjectStore

  }

  @Test
  public void testRefreshMultipleKeys2()
  {
    ObjectStore os = ObjectStore.Factory.create();
    ObjectStoreSession oss = os.beginSession();
    X x1 = new X();
    x1.blah = "fred1";
    X x2 = new X();
    x2.blah = "fred2";
    X x3 = new X();
View Full Code Here

Examples of com.google.code.gaeom.ObjectStore

  }

  @Test
  public void testLoadSingleParentedStringId()
  {
    ObjectStore os = ObjectStore.Factory.create();
    ObjectStoreSession oss = os.beginSession();
    X parent = new X();
    oss.store(parent).now();
    oss.store(new X()).id("a").parent(parent).now();

    assertEquals(X.class, oss.load(X.class).id("a").parent(parent).now().getClass());
View Full Code Here

Examples of com.google.code.gaeom.ObjectStore

  }

  @Test
  public void testLoadMultipleParentedStringId()
  {
    ObjectStore os = ObjectStore.Factory.create();
    ObjectStoreSession oss = os.beginSession();
    X parent = new X();
    oss.store(parent).now();
    oss.store(new X(), new X(), new X()).ids("a", "b", "c").parent(parent).now();

    assertEquals(3, oss.load(X.class).ids("a", "b", "c").parent(parent).now().size());
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.