Package org.apache.jackrabbit.ocm.manager

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


            a.setNamedProperty("ocm:test");
            a.setPathProperty("/node1/node2");
            a.setUndefinedProperty("aStringData");
           
            ocm.insert(a);
            ocm.save();

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


            {
               // update with an incorrect namespace - Should throws an exception
               a.setNamedProperty("unknown:test");              
               ocm.update(a);
               fail("Exception was not triggered with an invalid namespace");
               ocm.save();
            }
            catch (Exception e)
            {
              
               
View Full Code Here

            {
               // update with an incorrect namespace - Should throws an exception
               a.setPathProperty("//node1");              
               ocm.update(a);
               fail("Exception was not triggered with an invalid path");
               ocm.save();
            }
            catch (Exception e)
            {
              
               
View Full Code Here

            values.add("Value9");
           
            multiValue.setMultiValues(values);
            ocm.insert(multiValue);
                                  
            ocm.save();
           
        }
        catch(Exception e)
        {
          e.printStackTrace();
View Full Code Here

            a = null;
            a = (Atomic) ocm.getObject( "/test");

            a.setUndefinedProperty(new Double(1.2));
            ocm.update(a);
            ocm.save();
           
            // --------------------------------------------------------------------------------
            // Get the object
            // --------------------------------------------------------------------------------
            a = null;
View Full Code Here

            values.add("Value3");
            values.add("Value4");
            multiValue.setMultiValues(values);
           
            ocm.insert(multiValue);
            ocm.save();
           
            // --------------------------------------------------------------------------------
            // Get the object
            // --------------------------------------------------------------------------------          
            multiValue = (MultiValue) ocm.getObject( "/test");
View Full Code Here

            values.add("Value4");
            values.add("Value5");
            multiValue.setMultiValues(values);
           
            ocm.update(multiValue);
            ocm.save();

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

            Main main = new Main();
            main.setPath("/test");
            main.setText("Main text");
                       
            ocm.insert(main);
            ocm.save();

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

            hashMapElement.addObject(e2);
           
            main.setHashMap(hashMapElement);
           
            ocm.update(main);
            ocm.save();
           
            // --------------------------------------------------------------------------------
            // Get the object
            // --------------------------------------------------------------------------------          
            main = (Main) ocm.getObject( "/test");
View Full Code Here

            e3.setText("Element 4");
            hashMapElement.addObject(e3);
            main.setHashMap(hashMapElement);
           
            ocm.update(main);
            ocm.save();

            // --------------------------------------------------------------------------------
            // Get the object
            // --------------------------------------------------------------------------------          
            assertNotNull("main.getElements() is null", main.getHashMap());
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.