Examples of HasTableAndColumnsInMappingJDO


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

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

  public void testInsert() throws EntityNotFoundException {
    HasTableAndColumnsInMappingJDO htacim = new HasTableAndColumnsInMappingJDO();
    htacim.setFoo("foo val");
    makePersistentInTxn(htacim, TXN_START_END);
    assertNotNull(htacim.getId());
    Entity entity = ds.get(KeyFactory.createKey(
        HasTableAndColumnsInMappingJDO.TABLE_NAME, htacim.getId()));
    assertNotNull(entity);
    assertEquals(HasTableAndColumnsInMappingJDO.TABLE_NAME, entity.getKind());
    assertEquals("foo val", entity.getProperty(HasTableAndColumnsInMappingJDO.FOO_COLUMN_NAME));
  }
View Full Code Here

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

    entity.setProperty(HasTableAndColumnsInMappingJDO.FOO_COLUMN_NAME, "foo val");
    Key key = ds.put(entity);

    String keyStr = KeyFactory.keyToString(key);
    beginTxn();
    HasTableAndColumnsInMappingJDO htacim =
        pm.getObjectById(HasTableAndColumnsInMappingJDO.class, keyStr);
    assertNotNull(htacim);
    assertEquals(Long.valueOf(key.getId()), htacim.getId());
    assertEquals("foo val", htacim.getFoo());
    commitTxn();
  }
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.