Package org.apache.jackrabbit.ocm.testmodel.inheritance

Examples of org.apache.jackrabbit.ocm.testmodel.inheritance.Descendant


    ObjectContentManager ocm = this.getObjectContentManager();

    //--------------------------------------------------------------------------------------------------------- 
    // Insert  descendant objects
    //---------------------------------------------------------------------------------------------------------     
    Descendant descendant = new Descendant();
    descendant.setDescendantField("descendantValue");
    descendant.setAncestorField("ancestorValue");
    descendant.setPath("/descendant1");
    ocm.insert(descendant);

    descendant = new Descendant();
    descendant.setDescendantField("descendantValue2");
    descendant.setAncestorField("ancestorValue2");
    descendant.setPath("/descendant2");
    ocm.insert(descendant);

    SubDescendant subDescendant = new SubDescendant();
    subDescendant.setDescendantField("descendantValue2");
    subDescendant.setAncestorField("ancestorValue2");
View Full Code Here


    ObjectContentManager ocm = this.getObjectContentManager();

    //--------------------------------------------------------------------------------------------------------- 
    // Insert  descendant objects
    //---------------------------------------------------------------------------------------------------------     
    Descendant descendant = new Descendant();
    descendant.setDescendantField("descendantValue");
    descendant.setAncestorField("ancestorValue");
    descendant.setPath("/descendant1");
    ocm.insert(descendant);

    descendant = new Descendant();
    descendant.setDescendantField("descendantValue2");
    descendant.setAncestorField("ancestorValue2");
    descendant.setPath("/descendant2");
    ocm.insert(descendant);

    SubDescendant subDescendant = new SubDescendant();
    subDescendant.setDescendantField("descendantValue2");
    subDescendant.setAncestorField("ancestorValue2");
View Full Code Here

      ObjectContentManager ocm = this.getObjectContentManager();

      //---------------------------------------------------------------------------------------------------------
      // Insert a descendant object
      //---------------------------------------------------------------------------------------------------------     
      Descendant descendant = new Descendant();
      descendant.setDescendantField("descendantValue");
      descendant.setAncestorField("ancestorValue");
      descendant.setIntField(200);
      descendant.setPath("/test");
      ocm.insert(descendant);
      ocm.save();

      //---------------------------------------------------------------------------------------------------------
      // Retrieve a descendant object
      //---------------------------------------------------------------------------------------------------------           
      descendant = null;
      descendant = (Descendant) ocm.getObject(   "/test");
      assertEquals("Descendant path is invalid", descendant.getPath(), "/test");
      assertEquals("Descendant ancestorField is invalid", descendant.getAncestorField(), "ancestorValue");
      assertEquals("Descendant descendantField is invalid", descendant.getDescendantField(), "descendantValue");
      assertEquals("Descendant intField is invalid", descendant.getIntField(), 200);

      //---------------------------------------------------------------------------------------------------------
      // Update  a descendant object
      //---------------------------------------------------------------------------------------------------------           
      descendant.setAncestorField("anotherAncestorValue");
      descendant.setIntField(123);
      ocm.update(descendant);
      ocm.save();

      //---------------------------------------------------------------------------------------------------------
      // Retrieve the updated descendant object
      //---------------------------------------------------------------------------------------------------------           
      descendant = null;
      descendant = (Descendant) ocm.getObject(   "/test");
      assertEquals("Descendant path is invalid", descendant.getPath(), "/test");
      assertEquals("Descendant ancestorField is invalid", descendant.getAncestorField(), "anotherAncestorValue");
      assertEquals("Descendant descendantField is invalid", descendant  .getDescendantField(), "descendantValue");
      assertEquals("Descendant intField is invalid", descendant.getIntField(), 123);

      Ancestor ancestor = (Ancestor) ocm.getObject("/test");
      assertTrue("Invalid object instance", ancestor instanceof Descendant );
      assertEquals("Ancestor  path is invalid", ancestor.getPath(), "/test");
      assertEquals("Ancestor ancestorField is invalid", ancestor.getAncestorField(), "anotherAncestorValue");
View Full Code Here

    ObjectContentManager ocm = this.getObjectContentManager();

    //--------------------------------------------------------------------------------------------------------- 
    // Insert  descendant objects
    //---------------------------------------------------------------------------------------------------------     
    Descendant descendant = new Descendant();
    descendant.setDescendantField("descendantValue");
    descendant.setAncestorField("ancestorValue");
    descendant.setPath("/descendant1");
    ocm.insert(descendant);

    descendant = new Descendant();
    descendant.setDescendantField("descendantValue2");
    descendant.setAncestorField("ancestorValue2");
    descendant.setPath("/descendant2");
    ocm.insert(descendant);

    SubDescendant subDescendant = new SubDescendant();
    subDescendant.setDescendantField("descendantValue2");
    subDescendant.setAncestorField("ancestorValue2");
View Full Code Here

      ObjectContentManager ocm = this.getObjectContentManager();

      //---------------------------------------------------------------------------------------------------------
      // Insert a descendant object
      //---------------------------------------------------------------------------------------------------------     
      Descendant descendant = new Descendant();
      descendant.setDescendantField("descendantValue");
      descendant.setAncestorField("ancestorValue");
      descendant.setIntField(200);
      descendant.setPath("/test");
      ocm.insert(descendant);
      ocm.save();

      //---------------------------------------------------------------------------------------------------------
      // Retrieve a descendant object
      //---------------------------------------------------------------------------------------------------------           
      descendant = null;
      descendant = (Descendant) ocm.getObject(   "/test");
      assertEquals("Descendant path is invalid", descendant.getPath(), "/test");
      assertEquals("Descendant ancestorField is invalid", descendant.getAncestorField(), "ancestorValue");
      assertEquals("Descendant descendantField is invalid", descendant.getDescendantField(), "descendantValue");
      assertEquals("Descendant intField is invalid", descendant.getIntField(), 200);

      //---------------------------------------------------------------------------------------------------------
      // Update  a descendant object
      //---------------------------------------------------------------------------------------------------------           
      descendant.setAncestorField("anotherAncestorValue");
      descendant.setIntField(123);
      ocm.update(descendant);
      ocm.save();

      //---------------------------------------------------------------------------------------------------------
      // Retrieve the updated descendant object
      //---------------------------------------------------------------------------------------------------------           
      descendant = null;
      descendant = (Descendant) ocm.getObject(   "/test");
      assertEquals("Descendant path is invalid", descendant.getPath(), "/test");
      assertEquals("Descendant ancestorField is invalid", descendant.getAncestorField(), "anotherAncestorValue");
      assertEquals("Descendant descendantField is invalid", descendant  .getDescendantField(), "descendantValue");
      assertEquals("Descendant intField is invalid", descendant.getIntField(), 123);

      Ancestor ancestor = (Ancestor) ocm.getObject("/test");
      assertTrue("Invalid object instance", ancestor instanceof Descendant );
      assertEquals("Ancestor  path is invalid", ancestor.getPath(), "/test");
      assertEquals("Ancestor ancestorField is invalid", ancestor.getAncestorField(), "anotherAncestorValue");
View Full Code Here

    ObjectContentManager ocm = this.getObjectContentManager();

    //--------------------------------------------------------------------------------------------------------- 
    // Insert  descendant objects
    //---------------------------------------------------------------------------------------------------------     
    Descendant descendant = new Descendant();
    descendant.setDescendantField("descendantValue");
    descendant.setAncestorField("ancestorValue");
    descendant.setPath("/descendant1");
    ocm.insert(descendant);

    descendant = new Descendant();
    descendant.setDescendantField("descendantValue2");
    descendant.setAncestorField("ancestorValue2");
    descendant.setPath("/descendant2");
    ocm.insert(descendant);

    SubDescendant subDescendant = new SubDescendant();
    subDescendant.setDescendantField("descendantValue2");
    subDescendant.setAncestorField("ancestorValue2");
View Full Code Here

    ObjectContentManager ocm = this.getObjectContentManager();

    //--------------------------------------------------------------------------------------------------------- 
    // Insert  descendant objects
    //---------------------------------------------------------------------------------------------------------     
    Descendant descendant = new Descendant();
    descendant.setDescendantField("descendantValue");
    descendant.setAncestorField("ancestorValue");
    descendant.setPath("/descendant1");
    ocm.insert(descendant);

    descendant = new Descendant();
    descendant.setDescendantField("descendantValue2");
    descendant.setAncestorField("ancestorValue2");
    descendant.setPath("/descendant2");
    ocm.insert(descendant);

    SubDescendant subDescendant = new SubDescendant();
    subDescendant.setDescendantField("descendantValue2");
    subDescendant.setAncestorField("ancestorValue2");
View Full Code Here

      ObjectContentManager ocm = this.getObjectContentManager();

      //---------------------------------------------------------------------------------------------------------
      // Insert a descendant object
      //---------------------------------------------------------------------------------------------------------     
      Descendant descendant = new Descendant();
      descendant.setDescendantField("descendantValue");
      descendant.setAncestorField("ancestorValue");
      descendant.setIntField(200);
      descendant.setPath("/test");
      ocm.insert(descendant);
      ocm.save();

      //---------------------------------------------------------------------------------------------------------
      // Retrieve a descendant object
      //---------------------------------------------------------------------------------------------------------           
      descendant = null;
      descendant = (Descendant) ocm.getObject(   "/test");
      assertEquals("Descendant path is invalid", descendant.getPath(), "/test");
      assertEquals("Descendant ancestorField is invalid", descendant.getAncestorField(), "ancestorValue");
      assertEquals("Descendant descendantField is invalid", descendant.getDescendantField(), "descendantValue");
      assertEquals("Descendant intField is invalid", descendant.getIntField(), 200);

      //---------------------------------------------------------------------------------------------------------
      // Update  a descendant object
      //---------------------------------------------------------------------------------------------------------           
      descendant.setAncestorField("anotherAncestorValue");
      descendant.setIntField(123);
      ocm.update(descendant);
      ocm.save();

      //---------------------------------------------------------------------------------------------------------
      // Retrieve the updated descendant object
      //---------------------------------------------------------------------------------------------------------           
      descendant = null;
      descendant = (Descendant) ocm.getObject(   "/test");
      assertEquals("Descendant path is invalid", descendant.getPath(), "/test");
      assertEquals("Descendant ancestorField is invalid", descendant.getAncestorField(), "anotherAncestorValue");
      assertEquals("Descendant descendantField is invalid", descendant  .getDescendantField(), "descendantValue");
      assertEquals("Descendant intField is invalid", descendant.getIntField(), 123);

      Ancestor ancestor = (Ancestor) ocm.getObject("/test");
      assertTrue("Invalid object instance", ancestor instanceof Descendant );
      assertEquals("Ancestor  path is invalid", ancestor.getPath(), "/test");
      assertEquals("Ancestor ancestorField is invalid", ancestor.getAncestorField(), "anotherAncestorValue");
View Full Code Here

    ObjectContentManager ocm = this.getObjectContentManager();

    //--------------------------------------------------------------------------------------------------------- 
    // Insert  descendant objects
    //---------------------------------------------------------------------------------------------------------     
    Descendant descendant = new Descendant();
    descendant.setDescendantField("descendantValue");
    descendant.setAncestorField("ancestorValue");
    descendant.setPath("/descendant1");
    ocm.insert(descendant);

    descendant = new Descendant();
    descendant.setDescendantField("descendantValue2");
    descendant.setAncestorField("ancestorValue2");
    descendant.setPath("/descendant2");
    ocm.insert(descendant);

    SubDescendant subDescendant = new SubDescendant();
    subDescendant.setDescendantField("descendantValue2");
    subDescendant.setAncestorField("ancestorValue2");
View Full Code Here

    ObjectContentManager ocm = this.getObjectContentManager();

    //--------------------------------------------------------------------------------------------------------- 
    // Insert  descendant objects
    //---------------------------------------------------------------------------------------------------------     
    Descendant descendant = new Descendant();
    descendant.setDescendantField("descendantValue");
    descendant.setAncestorField("ancestorValue");
    descendant.setPath("/descendant1");
    ocm.insert(descendant);

    descendant = new Descendant();
    descendant.setDescendantField("descendantValue2");
    descendant.setAncestorField("ancestorValue2");
    descendant.setPath("/descendant2");
    ocm.insert(descendant);

    SubDescendant subDescendant = new SubDescendant();
    subDescendant.setDescendantField("descendantValue2");
    subDescendant.setAncestorField("ancestorValue2");
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.ocm.testmodel.inheritance.Descendant

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.