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

Examples of com.google.appengine.datanucleus.test.jdo.HasPolymorphicRelationsSetJDO.HasOneToManySet


  }
  private void testInsertNewParentAndChild(StartEnd startEnd) throws EntityNotFoundException {
    String expectedBidirKind = getEntityKind(BidirTop.class);
    String expectedUnidirKind  = getEntityKind(UnidirTop.class);
   
    testInsert_NewParentAndChild(new HasOneToManySet(), new BidirTop(), startEnd, UnidirLevel.Bottom,
  expectedBidirKind, expectedUnidirKind, 1, 1);
    testInsert_NewParentAndChild(new HasOneToManySet(), new BidirMiddle(), startEnd, UnidirLevel.Top,
  expectedBidirKind, expectedUnidirKind, 2, 2);
    testInsert_NewParentAndChild(new HasOneToManySet(), new BidirBottom(), startEnd, UnidirLevel.Middle,
  expectedBidirKind, expectedUnidirKind, 3, 3);
  }
View Full Code Here


  }
  private void testInsertExistingParentNewChild(StartEnd startEnd) throws EntityNotFoundException {
    String expectedBidirKind = getEntityKind(BidirTop.class);
    String expectedUnidirKind  = getEntityKind(UnidirTop.class);

    testInsert_ExistingParentNewChild(new HasOneToManySet(), new BidirBottom(), startEnd, UnidirLevel.Middle,
  expectedBidirKind, expectedUnidirKind, 1, 1);
    testInsert_ExistingParentNewChild(new HasOneToManySet(), new BidirTop(), startEnd, UnidirLevel.Bottom,
  expectedBidirKind, expectedUnidirKind, 2, 2);
    testInsert_ExistingParentNewChild(new HasOneToManySet(), new BidirMiddle(), startEnd, UnidirLevel.Top,
  expectedBidirKind, expectedUnidirKind, 3, 3);
  }
View Full Code Here

  }
  private void testUpdateUpdateChildWithMerge(StartEnd startEnd) throws EntityNotFoundException {
    String expectedBidirKind = getEntityKind(BidirTop.class);
    String expectedUnidirKind  = getEntityKind(UnidirTop.class);

    testUpdate_UpdateChildWithMerge(new HasOneToManySet(), new BidirTop(), startEnd,
  expectedBidirKind, expectedUnidirKind, UnidirLevel.Bottom, 1);
    testUpdate_UpdateChildWithMerge(new HasOneToManySet(), new BidirMiddle(), startEnd,
  expectedBidirKind, expectedUnidirKind, UnidirLevel.Top, 2);
    testUpdate_UpdateChildWithMerge(new HasOneToManySet(), new BidirBottom(), startEnd,
  expectedBidirKind, expectedUnidirKind, UnidirLevel.Middle, 3);
  }
View Full Code Here

    testUpdateUpdateChild(NEW_PM_START_END);
  }
  private void testUpdateUpdateChild(StartEnd startEnd) throws EntityNotFoundException {
    String expectedBidirKind = getEntityKind(BidirTop.class);
    String expectedUnidirKind  = getEntityKind(UnidirTop.class);
    testUpdate_UpdateChild(new HasOneToManySet(), new BidirTop(), startEnd,
  expectedBidirKind, expectedUnidirKind, UnidirLevel.Middle, 1);
    testUpdate_UpdateChild(new HasOneToManySet(), new BidirMiddle(), startEnd,
  expectedBidirKind, expectedUnidirKind, UnidirLevel.Top, 2);
    testUpdate_UpdateChild(new HasOneToManySet(), new BidirBottom(), startEnd,
  expectedBidirKind, expectedUnidirKind, UnidirLevel.Bottom, 3);
  }
View Full Code Here

    switchDatasource(PersistenceManagerFactoryName.nontransactional);
    getExecutionContext().setProperty(PROP_DETACH_ON_CLOSE, true);
    testUpdateNullOutChildren(NEW_PM_DETACH_ON_CLOSE_START_END);
  }
  private void testUpdateNullOutChildren(StartEnd startEnd) throws EntityNotFoundException {
    testUpdate_NullOutChildren(new HasOneToManySet(), new BidirBottom(), startEnd,
  UnidirLevel.Bottom, 1);
    testUpdate_NullOutChildren(new HasOneToManySet(), new BidirMiddle(), startEnd,
  UnidirLevel.Middle, 2);
    testUpdate_NullOutChildren(new HasOneToManySet(), new BidirTop(), startEnd,
  UnidirLevel.Top, 3);
  }
View Full Code Here

    switchDatasource(PersistenceManagerFactoryName.nontransactional);
    getExecutionContext().setProperty(PROP_DETACH_ON_CLOSE, true);
    testUpdateClearOutChildren(NEW_PM_DETACH_ON_CLOSE_START_END);
  }
  private void testUpdateClearOutChildren(StartEnd startEnd) throws EntityNotFoundException {
    testUpdate_ClearOutChildren(new HasOneToManySet(), new BidirTop(), startEnd,
  UnidirLevel.Bottom, 1);
    testUpdate_ClearOutChildren(new HasOneToManySet(), new BidirBottom(), startEnd,
  UnidirLevel.Middle, 2);
    testUpdate_ClearOutChildren(new HasOneToManySet(), new BidirMiddle(), startEnd,
  UnidirLevel.Top, 3);
  }
View Full Code Here

    switchDatasource(PersistenceManagerFactoryName.nontransactional);
    getExecutionContext().setProperty(PROP_DETACH_ON_CLOSE, true);
    testRemoveAll(NEW_PM_START_END);
  }
  private void testRemoveAll(StartEnd startEnd) throws EntityNotFoundException {
    testRemoveAll(new HasOneToManySet(), new BidirTop(),
                  new BidirMiddle(), new BidirBottom(), startEnd);
  }
View Full Code Here

    switchDatasource(PersistenceManagerFactoryName.nontransactional);
    getExecutionContext().setProperty(PROP_DETACH_ON_CLOSE, true);
    testChangeParent(NEW_PM_START_END);
  }
  private void testChangeParent(StartEnd startEnd) {
    testChangeParent(new HasOneToManySet(), new HasOneToManySet(), startEnd,
  UnidirLevel.Top);
    testChangeParent(new HasOneToManySet(), new HasOneToManySet(), startEnd,
  UnidirLevel.Middle);
    testChangeParent(new HasOneToManySet(), new HasOneToManySet(), startEnd,
  UnidirLevel.Bottom);
  }
View Full Code Here

    switchDatasource(PersistenceManagerFactoryName.nontransactional);
    getExecutionContext().setProperty(PROP_DETACH_ON_CLOSE, true);
    testNewParentNewChild_NamedKeyOnChild(NEW_PM_START_END);
  }
  private void testNewParentNewChild_NamedKeyOnChild(StartEnd startEnd) throws EntityNotFoundException {
    testNewParentNewChild_NamedKeyOnChild(new HasOneToManySet(), startEnd, UnidirLevel.Middle);
    testNewParentNewChild_NamedKeyOnChild(new HasOneToManySet(), startEnd, UnidirLevel.Top);
    testNewParentNewChild_NamedKeyOnChild(new HasOneToManySet(), startEnd, UnidirLevel.Bottom);
  }
View Full Code Here

  }

  public void testAddAlreadyPersistedChildToParent_NoTxnSamePm() {
    switchDatasource(PersistenceManagerFactoryName.nontransactional);
    getExecutionContext().setProperty(PROP_DETACH_ON_CLOSE, true);
    testAddAlreadyPersistedChildToParent_NoTxnSamePm(new HasOneToManySet(), UnidirLevel.Middle, 1);
    testAddAlreadyPersistedChildToParent_NoTxnSamePm(new HasOneToManySet(), UnidirLevel.Top, 2);
    testAddAlreadyPersistedChildToParent_NoTxnSamePm(new HasOneToManySet(), UnidirLevel.Bottom, 3);

  }
View Full Code Here

TOP

Related Classes of com.google.appengine.datanucleus.test.jdo.HasPolymorphicRelationsSetJDO.HasOneToManySet

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.