Examples of UpdateRequest


Examples of org.apache.solr.client.solrj.request.UpdateRequest

   *
   * @return the response from the SolrServer
   */
  public UpdateResponse addBeans(final Iterator<?> beanIterator)
          throws SolrServerException, IOException {
    UpdateRequest req = new UpdateRequest();
    req.setDocIterator(new Iterator<SolrInputDocument>() {

      public boolean hasNext() {
        return beanIterator.hasNext();
      }

      public SolrInputDocument next() {
        Object o = beanIterator.next();
        if (o == null) return null;
        return getBinder().toSolrInputDocument(o);
      }

      public void remove() {
        beanIterator.remove();
      }
    });
    return req.process(this);
  }
View Full Code Here

Examples of org.apache.solr.client.solrj.request.UpdateRequest

    // Now try a timed commit...
    SolrInputDocument doc3 = new SolrInputDocument();
    doc3.addField( "id", "id3", 1.0f );
    doc3.addField( "name", "doc3", 1.0f );
    doc3.addField( "price", 10 );
    UpdateRequest up = new UpdateRequest();
    up.add( doc3 );
    up.setCommitWithin( 500 )// a smaller commitWithin caused failures on the following assert
    up.process( server );
   
    rsp = server.query( new SolrQuery( "*:*") );
    Assert.assertEquals( 0, rsp.getResults().getNumFound() );
   
    Thread.sleep( 1000 ); // wait 1 sec
View Full Code Here

Examples of org.datanucleus.store.rdbms.request.UpdateRequest

    {
        RequestIdentifier reqID = new RequestIdentifier(table, mmds, RequestType.UPDATE, cmd.getFullClassName());
        Request req = requestsByID.get(reqID);
        if (req == null)
        {
            req = new UpdateRequest(table, mmds, cmd, clr);
            requestsByID.put(reqID, req);
        }
        return req;
    }
View Full Code Here

Examples of org.elasticsearch.action.update.UpdateRequest

*/
@SuppressWarnings("unused")
public class UpdateRequestBuilder<JsonInput, JsonOutput> extends AbstractRequestBuilderJsonOutput<UpdateRequest, UpdateResponse, JsonInput, JsonOutput> {

    public UpdateRequestBuilder(Client client, JsonToString<JsonInput> jsonToString, StringToJson<JsonOutput> stringToJson) {
        super(client, new UpdateRequest(null, null, null), jsonToString, stringToJson);
    }
View Full Code Here

Examples of org.graylog2.rest.resources.dashboards.requests.UpdateRequest

    })
    public Response update(@ApiParam(name = "JSON body", required = true) String body,
                           @ApiParam(name = "dashboardId", required = true) @PathParam("dashboardId") String dashboardId) {
        checkPermission(RestPermissions.DASHBOARDS_EDIT, dashboardId);
        try {
            UpdateRequest cr;
            try {
                cr = objectMapper.readValue(body, UpdateRequest.class);
            } catch(IOException e) {
                LOG.error("Error while parsing JSON", e);
                throw new WebApplicationException(e, Response.Status.BAD_REQUEST);
View Full Code Here

Examples of org.jpox.store.rdbms.request.UpdateRequest

            updateTable(supertable, sm, clr, fieldMetaData);
        }

        // Do the actual update of this table
        // TODO Assert if this table is not yet initialised ?
        UpdateRequest req = getUpdateRequest(table, fieldMetaData, sm.getObject().getClass(), clr);
        req.execute(sm);

        // Update any secondary tables
        Collection secondaryTables = table.getSecondaryDatastoreClasses();
        if (secondaryTables != null)
        {
View Full Code Here

Examples of org.vfny.geoserver.wfs.requests.UpdateRequest

                    throw new ServiceException(
                        "Transaction Update support is not enabled");
                }
                LOGGER.finer( "Transaction Update:"+element);
                try {
                    UpdateRequest update = (UpdateRequest) element;
                    Filter filter = update.getFilter();

                    AttributeType[] types = update.getTypes(store.getSchema());
                    Object[] values = update.getValues();

                    DefaultQuery query = new DefaultQuery(update.getTypeName(),
                            filter);

                    // Pass through data to collect fids and damaged region
                    // for validation
                    //
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.