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

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

Related Classes of com.google.appengine.datanucleus.test.jdo.HasLongPrimitivePkJDO

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.