Examples of BidirectionalChildLongPkListJDO


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

    switchDatasource(PersistenceManagerFactoryName.nontransactional);
    getExecutionContext().setProperty(PROP_DETACH_ON_CLOSE, true);
    testRemoveAll_LongPkOnParent(NEW_PM_START_END);
  }
  private void testRemoveAll_LongPkOnParent(StartEnd startEnd) throws EntityNotFoundException {
    testRemoveAll_LongPkOnParent(new HasOneToManyLongPkListJDO(), new BidirectionalChildLongPkListJDO(),
                  new BidirectionalChildLongPkListJDO(), new BidirectionalChildLongPkListJDO(),
                  startEnd);
  }
View Full Code Here

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

    switchDatasource(PersistenceManagerFactoryName.nontransactional);
    getExecutionContext().setProperty(PROP_DETACH_ON_CLOSE, true);
    testInsert_NewParentAndChild_LongPk(NEW_PM_START_END);
  }
  private void testInsert_NewParentAndChild_LongPk(StartEnd startEnd) throws EntityNotFoundException {
    BidirectionalChildLongPkListJDO bidirChild = new BidirectionalChildLongPkListJDO();
    bidirChild.setChildVal("yam");

    Flight f = newFlight();

    HasKeyPkJDO hasKeyPk = new HasKeyPkJDO();
    hasKeyPk.setStr("yag");

    HasOneToManyLongPkListJDO parent = new HasOneToManyLongPkListJDO();
    parent.addBidirChild(bidirChild);
    bidirChild.setParent(parent);
    parent.addFlight(f);
    parent.addHasKeyPk(hasKeyPk);
    parent.setVal("yar");

    startEnd.start();
    pm.makePersistent(parent);
    startEnd.end();

    assertNotNull(bidirChild.getId());
    assertNotNull(f.getId());
    assertNotNull(hasKeyPk.getKey());

    Entity bidirChildEntity = ds.get(KeyFactory.stringToKey(bidirChild.getId()));
    assertNotNull(bidirChildEntity);
    assertEquals("yam", bidirChildEntity.getProperty("childVal"));
    assertEquals(KeyFactory.stringToKey(bidirChild.getId()), bidirChildEntity.getKey());
    assertKeyParentEquals(parent.getClass(), parent.getId(), bidirChildEntity, bidirChild.getId());

    // TODO This is only for older storage versions; check owner relation List positions for current
    if (isIndexed() &&
        getStorageVersion(pm).ordinal() < StorageVersion.READ_OWNED_CHILD_KEYS_FROM_PARENTS.ordinal()) {
      assertEquals(0L, bidirChildEntity.getProperty("bidirChildren_INTEGER_IDX"));
View Full Code Here

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

    getExecutionContext().setProperty(PROP_DETACH_ON_CLOSE, true);
    testAddChildToOneToManyParentWithLongPk(NEW_PM_START_END);
  }
  private void testAddChildToOneToManyParentWithLongPk(StartEnd startEnd) throws EntityNotFoundException {
    testAddChildToOneToManyParentWithLongPk(
        new HasOneToManyLongPkListJDO(), new BidirectionalChildLongPkListJDO(), startEnd);
  }
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.