Package org.apache.jackrabbit.ocm.manager

Examples of org.apache.jackrabbit.ocm.manager.ObjectContentManager.save()


          a.setInputStream(new ByteArrayInputStream("Another Stream".getBytes()));
        }
        ocm.insert(a);

      }
      ocm.save();

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


    try
    {
     
      ObjectContentManager ocm = this.getObjectContentManager();
      ocm.remove("/test5");
      ocm.save();

      assertFalse("Test5 has not been removed", ocm.objectExists("/test5"));

      QueryManager queryManager = this.getQueryManager();
      Filter filter = queryManager.createFilter(Atomic.class);
View Full Code Here

      QueryManager queryManager = this.getQueryManager();
      Filter filter = queryManager.createFilter(Atomic.class);
      filter.addEqualTo("booleanObject" , new Boolean(false));
      Query query = queryManager.createQuery(filter);
      ocm.remove(query);
      ocm.save();

      filter = queryManager.createFilter(Atomic.class);
      filter.setScope("//");
      query = queryManager.createQuery(filter);     
      Collection result = ocm.getObjects(query);
View Full Code Here

          a.setInputStream(new ByteArrayInputStream("Another Stream".getBytes()));
        }
        ocm.insert(a);

      }
      ocm.save();

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

            a.setPath("/test");
            a.setA1("a1");
            a.setA2("a2");
           
            ocm.insert(a);
            ocm.save();

            // --------------------------------------------------------------------------------
            // Get the object
            // --------------------------------------------------------------------------------          
            a = (A) ocm.getObject( "/test");
View Full Code Here

            b2.setB2("b2.2");           
            b2.setA(a);
            a.addB(b2);

            ocm.update(a);
            ocm.save();
           

            // --------------------------------------------------------------------------------
            // Get the object
            // --------------------------------------------------------------------------------          
View Full Code Here

            collection.add(c3);
           
            a.setCollection(collection);
           
            ocm.insert(a);
            ocm.save();
           

            // --------------------------------------------------------------------------------
            // Get the object
            // --------------------------------------------------------------------------------          
View Full Code Here

            newB.setB2("new B2");
            a.setB(newB);
           
           
            ocm.update(a);
            ocm.save();

            // --------------------------------------------------------------------------------
            // Get the object
            // --------------------------------------------------------------------------------          
            a = (A) ocm.getObject("/test");
View Full Code Here

            // --------------------------------------------------------------------------------
           Discriminator discriminatorObject = new Discriminator();
           discriminatorObject.setPath("/test");
           discriminatorObject.setContent("This is my content");
             ocm.insert(discriminatorObject);            
             ocm.save();
            

             // --------------------------------------------------------------------------------
             // Get the object
             // --------------------------------------------------------------------------------          
View Full Code Here

             // Update the object
             // --------------------------------------------------------------------------------
             discriminatorObject.setContent("new content");            
            
             ocm.update(discriminatorObject);
             ocm.save();

             // --------------------------------------------------------------------------------
             // Get the object
             // --------------------------------------------------------------------------------          
             discriminatorObject = (Discriminator) ocm.getObject( "/test");
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.