Examples of usesNodeTypePerHierarchyStrategy()


Examples of org.apache.jackrabbit.ocm.mapper.model.ClassDescriptor.usesNodeTypePerHierarchyStrategy()

          .isAbstract());
      assertNull("The ancestor class has an ancestor", classDescriptor
          .getSuperClassDescriptor());
      assertTrue(
          "Ancestor class doesn't have a node type per hierarchy strategy",
          classDescriptor.usesNodeTypePerHierarchyStrategy());
      assertFalse(
          "Ancestor class  have a node type per hierarchy strategy",
          classDescriptor.usesNodeTypePerConcreteClassStrategy());

      Collection descendandDescriptors = classDescriptor
View Full Code Here

Examples of org.apache.jackrabbit.ocm.mapper.model.ClassDescriptor.usesNodeTypePerHierarchyStrategy()

          .getDescendantClassDescriptors();
      assertEquals("Invalid number of descendants", descendandDescriptors
          .size(), 1);
      assertTrue(
          "Descendant  class doesn't have a node type per hierarchy strategy",
          classDescriptor.usesNodeTypePerHierarchyStrategy());
      assertFalse(
          "Descendant class  have a node type per hierarchy strategy",
          classDescriptor.usesNodeTypePerConcreteClassStrategy());

      classDescriptor = mapper.getClassDescriptorByClass(SubDescendant.class);
View Full Code Here

Examples of org.apache.jackrabbit.ocm.mapper.model.ClassDescriptor.usesNodeTypePerHierarchyStrategy()

          .getDescendantClassDescriptors();
      assertEquals("Invalid number of descendants", descendandDescriptors
          .size(), 0);
      assertTrue(
          "SubDescendant  class doesn't have a node type per hierarchy strategy",
          classDescriptor.usesNodeTypePerHierarchyStrategy());
      assertFalse(
          "SubDescendant class  have a node type per hierarchy strategy",
          classDescriptor.usesNodeTypePerConcreteClassStrategy());

    } catch (JcrMappingException e) {
View Full Code Here

Examples of org.apache.jackrabbit.ocm.mapper.model.ClassDescriptor.usesNodeTypePerHierarchyStrategy()

          .isAbstract());
      assertNull("The cmsobject class has an ancestor", classDescriptor
          .getSuperClassDescriptor());
      assertFalse(
          "The cmsobject class  have a node type per hierarchy strategy",
          classDescriptor.usesNodeTypePerHierarchyStrategy());
      assertTrue(
          "The cmsobject class  have not a node type per hierarchy strategy",
          classDescriptor.usesNodeTypePerConcreteClassStrategy());
      assertTrue("The cmsobject class has no descendant ",
          classDescriptor.hasDescendants());
View Full Code Here

Examples of org.apache.jackrabbit.ocm.mapper.model.ClassDescriptor.usesNodeTypePerHierarchyStrategy()

      assertEquals("The document class has an invalid ancestor ancestor",
          classDescriptor.getSuperClassDescriptor().getClassName(),
          "org.apache.jackrabbit.ocm.testmodel.inheritance.impl.ContentImpl");
      assertFalse(
          "The document class  have a node type per hierarchy strategy",
          classDescriptor.usesNodeTypePerHierarchyStrategy());
      assertTrue(
          "The document class  have not a node type per hierarchy strategy",
          classDescriptor.usesNodeTypePerConcreteClassStrategy());
      assertFalse("The document class has no descendant ",
          classDescriptor.hasDescendants());
View Full Code Here

Examples of org.apache.jackrabbit.ocm.mapper.model.ClassDescriptor.usesNodeTypePerHierarchyStrategy()

      assertNull("The interface has an ancestor", classDescriptor.getSuperClassDescriptor());
      assertTrue("The interface has not implementation/descendant", classDescriptor.hasDescendants());
      Collection descendants = classDescriptor.getDescendantClassDescriptors();
      assertEquals("Invalid number of implementation/descendants", descendants.size(), 1);
      assertEquals("Invalid interface implementation",( (ClassDescriptor) descendants.iterator().next()).getClassName(), "org.apache.jackrabbit.ocm.testmodel.inheritance.AnotherDescendant");
      assertTrue("Invalid extend strategy", classDescriptor.usesNodeTypePerHierarchyStrategy());
      assertFalse("Incalid extend strategy", classDescriptor.usesNodeTypePerConcreteClassStrategy());
     
      classDescriptor = mapper.getClassDescriptorByClass(AnotherDescendant.class);
      assertNotNull("Classdescriptor is null", classDescriptor);
      assertFalse("Interface is  an interface", classDescriptor.isInterface());
View Full Code Here

Examples of org.apache.jackrabbit.ocm.mapper.model.ClassDescriptor.usesNodeTypePerHierarchyStrategy()

      assertNotNull("Classdescriptor is null", classDescriptor);
      assertFalse("Interface is  an interface", classDescriptor.isInterface());
      assertTrue("AnotherDescendant  has not a discriminator", classDescriptor.hasDiscriminator());
      assertEquals("Invalid number of implemented interface", classDescriptor.getImplements().size(), 1);
      assertEquals("Invalid  interface name", classDescriptor.getImplements().iterator().next(), "org.apache.jackrabbit.ocm.testmodel.interfaces.Interface");
      assertTrue("Invalid extend strategy", classDescriptor.usesNodeTypePerHierarchyStrategy());
      assertFalse("Invalid extend strategy", classDescriptor.usesNodeTypePerConcreteClassStrategy());
     

    } catch (JcrMappingException e) {
      e.printStackTrace();
View Full Code Here

Examples of org.apache.jackrabbit.ocm.mapper.model.ClassDescriptor.usesNodeTypePerHierarchyStrategy()

      assertEquals("Invalid mixin type for the interface",mixinTypes.length , 0);
      assertNull("The interface has an ancestor", classDescriptor.getSuperClassDescriptor());
      assertTrue("The interface has not implementation/descendant", classDescriptor.hasDescendants());
      Collection descendants = classDescriptor.getDescendantClassDescriptors();
      assertEquals("Invalid number of implementation/descendants", descendants.size(),3);     
      assertFalse("Invalid extend strategy", classDescriptor.usesNodeTypePerHierarchyStrategy());
      assertTrue("Invalid extend strategy", classDescriptor.usesNodeTypePerConcreteClassStrategy());
     
     
      classDescriptor = mapper.getClassDescriptorByClass(Document.class);
      assertNotNull("Classdescriptor is null", classDescriptor);
View Full Code Here

Examples of org.apache.jackrabbit.ocm.mapper.model.ClassDescriptor.usesNodeTypePerHierarchyStrategy()

      classDescriptor = mapper.getClassDescriptorByClass(Document.class);
      assertNotNull("Classdescriptor is null", classDescriptor);
      assertTrue("Document is not  an interface", classDescriptor.isInterface());
      assertFalse("Document  has a discriminator", classDescriptor.hasDiscriminator());
      assertEquals("Invalid number of implemented interface", classDescriptor.getImplements().size(), 0);     
      assertFalse("Invalid extend strategy", classDescriptor.usesNodeTypePerHierarchyStrategy());
      assertTrue("Invalid extend strategy", classDescriptor.usesNodeTypePerConcreteClassStrategy());
      descendants = classDescriptor.getDescendantClassDescriptors();     
      assertEquals("Invalid number of implementation/descendants", descendants.size(),1);
   
View Full Code Here

Examples of org.apache.jackrabbit.ocm.mapper.model.ClassDescriptor.usesNodeTypePerHierarchyStrategy()

      assertNotNull("Classdescriptor is null", classDescriptor);
      assertFalse("DocumentImpl is  an interface", classDescriptor.isInterface());
      assertFalse("DocumentImpl  has a discriminator", classDescriptor.hasDiscriminator());
      assertTrue("DocumentImpl has not interface", classDescriptor.hasInterfaces())
      assertEquals("Invalid number of implemented interface", classDescriptor.getImplements().size(), 1);       
      assertFalse("Invalid extend strategy", classDescriptor.usesNodeTypePerHierarchyStrategy());
      assertTrue("Invalid extend strategy", classDescriptor.usesNodeTypePerConcreteClassStrategy());
     
     
    } catch (JcrMappingException e) {
      e.printStackTrace();
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.