Package org.apache.jackrabbit.ocm.testmodel.interfaces

Examples of org.apache.jackrabbit.ocm.testmodel.interfaces.EntityA


  public void testListOfInterface() {

    try {
      ObjectContentManager ocm = getObjectContentManager();

      EntityA a = new EntityA();
      a.setPath("/test");

      List<MyInterface> bList = new ArrayList<MyInterface>();
      EntityB b = new EntityB();
      b.setId("ID_B");
      b.setName("NAME_B");
      bList.add(b);

      a.setEntityB(bList);

      ocm.insert(a);
      ocm.save();
     
     
      a = (EntityA) ocm.getObject("/test");
      bList = a.getEntityB();
      assertNotNull(bList);
      assertEquals(1, bList.size());
     
     
      ocm.remove("/test");
View Full Code Here


  public void testListOfInterface() {

    try {
      ObjectContentManager ocm = this.getObjectContentManager();

      EntityA a = new EntityA();
      a.setPath("/test");

      List<MyInterface> bList = new ArrayList<MyInterface>();
      EntityB b = new EntityB();
      b.setId("ID_B");
      b.setName("NAME_B");
      bList.add(b);

      a.setEntityB(bList);

      ocm.insert(a);
      ocm.save();
     
     
      a = (EntityA) ocm.getObject("/test");
      bList = a.getEntityB();
      assertNotNull(bList);
      assertEquals(1, bList.size());
     
     
      ocm.remove("/test");
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.ocm.testmodel.interfaces.EntityA

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.