Examples of HasLongPrimitivePkJDO


Examples of com.google.appengine.datanucleus.test.jdo.HasLongPrimitivePkJDO

* @author Max Ross <maxr@google.com>
*/
public class JDOPrimaryKeyTest extends JDOTestCase {

  public void testLongPrimitivePk() throws EntityNotFoundException {
    HasLongPrimitivePkJDO pojo = new HasLongPrimitivePkJDO();
    beginTxn();
    pm.makePersistent(pojo);
    commitTxn();

    assertNotNull(pojo.getId());
    Entity e = ds.get(KeyFactory.createKey(HasLongPrimitivePkJDO.class.getSimpleName(), pojo.getId()));

    beginTxn();
    pm.getObjectById(HasLongPrimitivePkJDO.class, e.getKey().getId());
    pm.getObjectById(HasLongPrimitivePkJDO.class, e.getKey());
    pm.getObjectById(HasLongPrimitivePkJDO.class, KeyFactory.keyToString(e.getKey()));
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.