Package com.google.appengine.datanucleus.test.jdo.SubclassesJDO

Examples of com.google.appengine.datanucleus.test.jdo.SubclassesJDO.Parent


    Entity e = new Entity(kindForClass(parentClass));
    e.setProperty("aString", "a");
    ds.put(e);

    beginTxn();
    Parent parent = pm.getObjectById(parentClass, e.getKey());
    assertEquals(parentClass, parent.getClass());
    assertEquals("a", parent.getAString());
    commitTxn();
  }
View Full Code Here


    e = new Entity(kindForClass(parentClass));
    e.setProperty("aString", "z9");
    ds.put(e);

    beginTxn();
    Parent parent = ((List<Parent>) pm.newQuery(
        "select from " + parentClass.getName() + " where aString == 'z8'").execute()).get(0);
    assertEquals(parentClass, parent.getClass());
    assertEquals("z8", parent.getAString());
    commitTxn();

    beginTxn();
    List<Parent> parents = ((List<Parent>) pm.newQuery(
        "select from " + parentClass.getName() + " where aString >= 'z8' order by aString desc").execute());
View Full Code Here

    Entity e = new Entity(kindForClass(parentClass));
    e.setProperty("aString", "a");
    ds.put(e);

    beginTxn();
    Parent parent = pm.getObjectById(parentClass, e.getKey());
    pm.deletePersistent(parent);
    commitTxn();
    try {
      ds.get(e.getKey());
      fail("expected exception");
View Full Code Here

    Entity e = new Entity(kindForClass(parentClass));
    e.setProperty("aString", "a");
    ds.put(e);

    beginTxn();
    Parent parent = pm.getObjectById(parentClass, e.getKey());
    parent.setAString("not a");
    commitTxn();
    e = ds.get(e.getKey());
    assertEquals("not a", e.getProperty("aString"));
  }
View Full Code Here

TOP

Related Classes of com.google.appengine.datanucleus.test.jdo.SubclassesJDO.Parent

Copyright © 2018 www.massapicom. 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.