Package javax.jdo

Examples of javax.jdo.FetchPlan


    children2.add(child21);
    child1.setChildren(children1);
    child2.setChildren(children2);
   
    PersistenceManager pm = pmf.getPersistenceManager();
    FetchPlan fp = pm.getFetchPlan();
    fp.clearGroups();
    fp.addGroup("detailChildren3").removeGroup("default");
    pm.currentTransaction().begin();
    logger.log(BasicLevel.DEBUG, "make persistent the person " + parent.toString());
    pm.makePersistent(parent);
    pm.currentTransaction().commit();
    logger.log(BasicLevel.DEBUG, "FG: " + fp.getGroups());
   
    try {
      pm.currentTransaction().begin();
      Person detachedParent = (Person) pm.detachCopy(parent);
      assertEquals(parent.getName(), detachedParent.getName());
View Full Code Here


   
    n2.addEdge(n4.getName(), new EdgeWeight(7));
    n2.addEdge(n5.getName(), new EdgeWeight(4));
   
    PersistenceManager pm = pmf.getPersistenceManager();
    FetchPlan fp = pm.getFetchPlan();
    fp.clearGroups();
    fp.addGroup("keyValue").removeGroup("default");
    pm.currentTransaction().begin();
    logger.log(BasicLevel.DEBUG, "make persistent the nodes " + n1.toString() + ", " + n2.toString()
        + ", " + n3.toString() + ", " + n4.toString() + ", " + n5.toString());
    pm.makePersistent(n1);
    pm.makePersistent(n2);
    pm.makePersistent(n3);
    pm.makePersistent(n4);
    pm.makePersistent(n5);
    pm.currentTransaction().commit();
    logger.log(BasicLevel.DEBUG, "FG: " + fp.getGroups());
   
    try {
      Node detachedN1 = (Node) pm.detachCopy(n1);
      assertEquals(n1.getName(), detachedN1.getName());
      assertEquals(n1.getEdges().size(), detachedN1.getEdges().size());
View Full Code Here

   
    n2.addEdge(n4.getName(), new EdgeWeight(7));
    n2.addEdge(n5.getName(), new EdgeWeight(4));
   
    PersistenceManager pm = pmf.getPersistenceManager();
    FetchPlan fp = pm.getFetchPlan();
    fp.clearGroups();
    fp.addGroup("keyOnly").removeGroup("default");
    pm.currentTransaction().begin();
    logger.log(BasicLevel.DEBUG, "make persistent the nodes " + n1.toString() + ", " + n2.toString()
        + ", " + n3.toString() + ", " + n4.toString() + ", " + n5.toString());
    pm.makePersistent(n1);
    pm.makePersistent(n2);
    pm.makePersistent(n3);
    pm.makePersistent(n4);
    pm.makePersistent(n5);
    pm.currentTransaction().commit();
    logger.log(BasicLevel.DEBUG, "FG: " + fp.getGroups());
   
    try {
      Node detachedN1 = (Node) pm.detachCopy(n1);
      assertEquals(n1.getName(), detachedN1.getName());
      assertEquals(n1.getEdges().size(), detachedN1.getEdges().size());
View Full Code Here

    children.add(child1);
    children.add(child2);
    parent.setChildren(children);
   
    PersistenceManager pm = pmf.getPersistenceManager();
    FetchPlan fp = pm.getFetchPlan();
    fp.addGroup("all").removeGroup("default");
    pm.currentTransaction().begin();
    logger.log(BasicLevel.DEBUG, "make persistent the person " + parent.toString());
    pm.makePersistent(parent);
    pm.currentTransaction().commit();
   
    FetchPlan f = pm.getFetchPlan();
    logger.log(BasicLevel.DEBUG, "FG: " + f.getGroups());
   
    try{
      pm.currentTransaction().begin();
      Person detachedParent = (Person) pm.detachCopy(parent);
      logger.log(BasicLevel.DEBUG, "All fields can be accessed: " + detachedParent.toString());
View Full Code Here

    children.add(child1);
    children.add(child2);
    parent.setChildren(children);
   
    PersistenceManager pm = pmf.getPersistenceManager();
    FetchPlan fp = pm.getFetchPlan();
    fp.removeGroup("all").addGroup("default");
    pm.currentTransaction().begin();
    logger.log(BasicLevel.DEBUG, "make persistent the person " + parent.toString());
    pm.makePersistent(parent);
    pm.currentTransaction().commit();
   
    FetchPlan f = pm.getFetchPlan();
    logger.log(BasicLevel.DEBUG, "FG: " + f.getGroups());
   
    try{   
      pm.currentTransaction().begin();
      Person detachedParent = (Person) pm.detachCopy(parent);
      logger.log(BasicLevel.DEBUG, "Name can be accessed: " + detachedParent.getName());
View Full Code Here

    children.add(child1);
    children.add(child2);
    parent.setChildren(children);
   
    PersistenceManager pm = pmf.getPersistenceManager();
    FetchPlan fp = pm.getFetchPlan();
    fp.removeGroup("default").addGroup("none");
    pm.currentTransaction().begin();
    logger.log(BasicLevel.DEBUG, "make persistent the person " + parent.toString());
    pm.makePersistent(parent);
    pm.currentTransaction().commit();
   
    FetchPlan f = pm.getFetchPlan();
    logger.log(BasicLevel.DEBUG, "FG: " + f.getGroups());
   
    try
      pm.currentTransaction().begin();
      Person detachedParent = (Person) pm.detachCopy(parent);
      logger.log(BasicLevel.DEBUG, "Name can be accessed: " + detachedParent.getName());
View Full Code Here

    children.add(child1);
    children.add(child2);
    parent.setChildren(children);
   
    PersistenceManager pm = pmf.getPersistenceManager();
    FetchPlan fp = pm.getFetchPlan();
    fp.removeGroup("none").addGroup("values");
    pm.currentTransaction().begin();
    logger.log(BasicLevel.DEBUG, "make persistent the person " + parent.toString());
    pm.makePersistent(parent);
    pm.currentTransaction().commit();
   
    FetchPlan f = pm.getFetchPlan();
    logger.log(BasicLevel.DEBUG, "FG: " + f.getGroups());
   
    try{
      pm.currentTransaction().begin();
      Person detachedParent = (Person) pm.detachCopy(parent);
      logger.log(BasicLevel.DEBUG, "Name can be accessed: " + detachedParent.getName());
View Full Code Here

    }

    /** Set the default plus upper left field as the fetch group.
     */
    protected void setDefaultGroup() {
        FetchPlan fp = getPM().getFetchPlan();
        fp.setGroups(defaultGroup);
    }
View Full Code Here

    }

    /** Set the default plus upper left field as the fetch group.
     */
    protected void setUpperLeftGroup() {
        FetchPlan fp = getPM().getFetchPlan();
        fp.setGroups(upperLeftGroup);
    }
View Full Code Here

    }

    /** Set the default plus lower right field as the fetch group.
     */
    protected void setLowerRightGroup() {
        FetchPlan fp = getPM().getFetchPlan();
        fp.setGroups(upperLeftGroup);
    }
View Full Code Here

TOP

Related Classes of javax.jdo.FetchPlan

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.