Package org.apache.jackrabbit.ocm.mapper.model

Examples of org.apache.jackrabbit.ocm.mapper.model.CollectionDescriptor


      assertNotNull("BeanDescriptor is null", beanDescriptor);
      assertTrue("Invalid jcrName for field b", beanDescriptor  .getJcrName().equals("b"));     
      assertNotNull("Invalid bean default converter", beanDescriptor.getConverter());
     

      CollectionDescriptor collectionDescriptor = classDescriptor.getCollectionDescriptor("collection");
      assertNotNull("CollectionDescriptor is null", collectionDescriptor);
      assertTrue("Invalid jcrName for field collection",collectionDescriptor.getJcrName().equals("collection"));
    } catch (JcrMappingException e) {
      e.printStackTrace();
      fail("Impossible to retrieve the converter " + e);
    }
  }
View Full Code Here


      assertFalse(beanDescriptor.isJcrMandatory());
      assertFalse(beanDescriptor.isJcrProtected());
      assertFalse(beanDescriptor.isJcrSameNameSiblings());
      assertEquals(beanDescriptor.getJcrOnParentVersion(), "IGNORE");

      CollectionDescriptor collectionDescriptor = classDescriptor2
          .getCollectionDescriptor("collection");
      assertNotNull(collectionDescriptor);
      assertEquals(collectionDescriptor.getJcrType(), "nt:unstructured");
      assertFalse(collectionDescriptor.isJcrAutoCreated());
      assertFalse(collectionDescriptor.isJcrMandatory());
      assertFalse(collectionDescriptor.isJcrProtected());
      assertFalse(collectionDescriptor.isJcrSameNameSiblings());
      assertEquals(collectionDescriptor.getJcrOnParentVersion(), "IGNORE");
     
      classDescriptor = mapper.getClassDescriptorByClass(OcmTestProperty.class);
      assertNotNull(classDescriptor);
      FieldDescriptor fieldDescriptor = classDescriptor.getFieldDescriptor("requiredWithConstraintsProp");
      assertNotNull(fieldDescriptor.getJcrValueConstraints());
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.ocm.mapper.model.CollectionDescriptor

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.