Examples of insertObject()


Examples of bm.db.index.Index.insertObject()

        index.setRecordStore( store );
        if( listBrowser != null && listBrowser.equalsIgnoreCase( "native" ) )
        {
            try
            {
                index.insertObject( "listBrowserMode", "native" );
            }
            catch( Exception e )
            {
                throw new ViewCompilerException( e );
            }
View Full Code Here

Examples of bm.db.index.Index.insertObject()

                System.out.println( "Processing language: " + language + ", " + lang.size() + " entries" );
                for( final Iterator j = lang.keySet().iterator(); j.hasNext(); )
                {
                    final String key = (String) j.next();
                    final String value = lang.getProperty( key );
                    index.insertObject( language + "#" + key, value );
                }
            }
            System.out.println( "Index size: " + store.getSize() + " bytes" );
            writeIndex( index, os );
        }
View Full Code Here

Examples of bm.db.index.Index.insertObject()

                        final PropertiesReader r = new PropertiesReader( is );
                        String[] pair = r.next();
                        while( pair != null )
                        {
                            log.debug( "pair: " + pair[0] + " = " + pair[1] );
                            index.insertObject( pair[0], pair[1] );
                            pair = r.next();
                        }
                        is.close();
                        System.gc();
                    }
View Full Code Here

Examples of com.fasterxml.jackson.databind.node.ArrayNode.insertObject()

        n.add(0.5);
        n.add(0.5f);
        assertEquals(7, n.size());

        assertNotNull(n.insertArray(0));
        assertNotNull(n.insertObject(0));
        n.insertPOJO(2, "xxx");
        assertEquals(10, n.size());
    }

    /**
 
View Full Code Here

Examples of com.webobjects.eocontrol.EOEditingContext.insertObject()

            if(stringValue.charAt(0) == '@') { // computed key
                if(stringValue.equals("@new")) {
                    EOClassDescription cd = EOClassDescription.classDescriptionForEntityName(relationshipEntityName);
                    EOEnterpriseObject newObject = cd.createInstanceWithEditingContext(eo.editingContext(), null);
                    ec.insertObject(newObject);
                    eo.addObjectToBothSidesOfRelationshipWithKey(newObject,key);
                } else if(stringValue.startsWith("@threadStorage.")) {
                    String keyPath = stringValue.substring("@threadStorage.".length());
                    Object o = ERXThreadStorage.valueForKey(keyPath);
                    if(keyPath.indexOf(".") > 0) {
View Full Code Here

Examples of com.webobjects.eocontrol.EOEditingContext.insertObject()

      throw new IllegalArgumentException("There was no editing context attached to this rest context.");
    }
    editingContext.lock();
    try {
      EOEnterpriseObject eo = entity.createInstanceWithEditingContext(editingContext, null);
      editingContext.insertObject(eo);
      return eo;
    }
    finally {
      editingContext.unlock();
    }
View Full Code Here

Examples of com.webobjects.eocontrol.EOEditingContext.insertObject()

        }
        EOClassDescription aClassDescription = EOClassDescription.classDescriptionForEntityName("FSDirectory");
        EOEnterpriseObject anObject = aClassDescription.createInstanceWithEditingContext(anEditingContext, null);
        anObject.takeValueForKey((System.getProperty("user.home") + File.separator + "FSItemInsertTest"), "absolutePath");

        anEditingContext.insertObject(anObject);
        anEditingContext.saveChanges();

        anEditingContext.deleteObject(anObject);
        anEditingContext.saveChanges();
    }
View Full Code Here

Examples of com.webobjects.eocontrol.EOEditingContext.insertObject()

    // create new objects and insert them into editing context
    EOEditingContext editingContext = editingContext();
    // generate fee and rental and insert it into editing context
    Fee fee = new Fee();
    Rental rental = new Rental();
    editingContext.insertObject(fee);
    editingContext.insertObject(rental);
    // manipulate relationships after inserting objects
    rental.addObjectToBothSidesOfRelationshipWithKey(unit, Rental.UnitKey);
    rental.addObjectToBothSidesOfRelationshipWithKey(fee, Rental.FeesKey);
    addObjectToBothSidesOfRelationshipWithKey(rental, RentalsKey);
View Full Code Here

Examples of com.webobjects.eocontrol.EOEditingContext.insertObject()

    EOEditingContext editingContext = editingContext();
    // generate fee and rental and insert it into editing context
    Fee fee = new Fee();
    Rental rental = new Rental();
    editingContext.insertObject(fee);
    editingContext.insertObject(rental);
    // manipulate relationships after inserting objects
    rental.addObjectToBothSidesOfRelationshipWithKey(unit, Rental.UnitKey);
    rental.addObjectToBothSidesOfRelationshipWithKey(fee, Rental.FeesKey);
    addObjectToBothSidesOfRelationshipWithKey(rental, RentalsKey);
  }
View Full Code Here

Examples of com.webobjects.eocontrol.EOEditingContext.insertObject()

      feePaid();
    } else {
      EOEditingContext editingContext = editingContext();
      // generate late fee and insert it into editing context
      Fee fee = new Fee(dateDue(), editingContext);
      editingContext.insertObject(fee);
      // manipulate relationship after inserting object
      addObjectToBothSidesOfRelationshipWithKey(fee, FeesKey);
    }
  }
}
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.