Package com.linkedin.restli.client

Examples of com.linkedin.restli.client.RestliRequestOptions


      Assert.assertEquals(status.getKey().longValue(), Long.parseLong(id));
      ids.add(status.getKey());
    }

    //GET again to verify that the create has worked.
    final RestliRequestOptions requestOptions = builders.getRequestOptions();
    Request<BatchKVResponse<Long, EntityResponse<Greeting>>> request = new SubgreetingsRequestBuilders(requestOptions).batchGet().ids(ids).build();

    Response<BatchKVResponse<Long, EntityResponse<Greeting>>> response = REST_CLIENT.sendRequest(request).getResponse();
    BatchKVResponse<Long, EntityResponse<Greeting>> batchResponse = response.getEntity();
    Assert.assertEquals(batchResponse.getResults().size(), ids.size());
View Full Code Here


  }

  @Test(dataProvider = com.linkedin.restli.internal.common.TestConstants.RESTLI_PROTOCOL_1_2_PREFIX + "requestBuilderDataProvider")
  public void testBatchPartialUpdate(RootBuilderWrapper<ComplexResourceKey<TwoPartKey, TwoPartKey>, Message> builders) throws RemoteInvocationException
  {
    final RestliRequestOptions requestOptions = builders.getRequestOptions();
    testBatchPartialUpdateMain(builders.batchPartialUpdate(), new ComplexKeysRequestBuilders(requestOptions).batchGet());
  }
View Full Code Here

  }

  @Test(dataProvider = com.linkedin.restli.internal.common.TestConstants.RESTLI_PROTOCOL_1_2_PREFIX + "requestBuilderDataProvider")
  public void testBatchDelete(RootBuilderWrapper<ComplexResourceKey<TwoPartKey, TwoPartKey>, Message> builders) throws RemoteInvocationException
  {
    final RestliRequestOptions requestOptions = builders.getRequestOptions();
    testBatchDeleteMain(builders.batchDelete(), builders.create(), new ComplexKeysRequestBuilders(requestOptions).batchGet());
  }
View Full Code Here

                                                      .build()).getResponse().getEntity().getResults();
    Assert.assertEquals(results.get(key1).getStatus().intValue(), 204);
    Assert.assertEquals(results.get(key2).getStatus().intValue(), 204);

    // BatchGet memberships
    final RestliRequestOptions requestOptions = membershipBuilders.getRequestOptions();
    Request<BatchKVResponse<CompoundKey, EntityResponse<GroupMembership>>> request = new GroupMembershipsRequestBuilders(requestOptions).batchGet()
                                  .ids(key1, key2)
                                  .fields(GroupMembership.fields().contactEmail())
                                  .build();
    Map<CompoundKey, EntityResponse<GroupMembership>> groupMemberships =
View Full Code Here

                                          .build();
    Response<CollectionResponse<CreateStatus>> createResponse =
        REST_CLIENT.sendRequest(createRequest).getResponse();
    Assert.assertEquals(createResponse.getStatus(), 200);

    final RestliRequestOptions requestOptions = builders.getRequestOptions();
    @SuppressWarnings("unchecked")
    Request<BatchKVResponse<ComplexResourceKey<GroupMembershipKey, GroupMembershipParam>, EntityResponse<ComplexKeyGroupMembership>>> request =
      new GroupMembershipsComplexRequestBuilders(requestOptions).batchGet()
        .ids(complexKey1, complexKey2, complexKey3)
        .fields(GroupMembership.fields().contactEmail())
View Full Code Here

TOP

Related Classes of com.linkedin.restli.client.RestliRequestOptions

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.