Examples of OrganizationHistoryRequest


Examples of com.opengamma.master.orgs.OrganizationHistoryRequest

  }

  //-------------------------------------------------------------------------
  @Override
  public AbstractHistoryResult<OrganizationDocument> historyByVersionsCorrections(AbstractHistoryRequest request) {
    OrganizationHistoryRequest historyRequest = new OrganizationHistoryRequest();
    historyRequest.setCorrectionsFromInstant(request.getCorrectionsFromInstant());
    historyRequest.setCorrectionsToInstant(request.getCorrectionsToInstant());
    historyRequest.setVersionsFromInstant(request.getVersionsFromInstant());
    historyRequest.setVersionsToInstant(request.getVersionsToInstant());
    historyRequest.setObjectId(request.getObjectId());
    return history(historyRequest);
  }
View Full Code Here

Examples of com.opengamma.master.orgs.OrganizationHistoryRequest

    assertEquals(now, old.getVersionToInstant())// old version ended
    assertEquals(base.getCorrectionFromInstant(), old.getCorrectionFromInstant());
    assertEquals(base.getCorrectionToInstant(), old.getCorrectionToInstant());
    assertEquals(base.getOrganization(), old.getOrganization());

    OrganizationHistoryRequest search = new OrganizationHistoryRequest(base.getUniqueId(), null, now);
    OrganizationHistoryResult searchResult = _orgMaster.history(search);
    assertEquals(2, searchResult.getDocuments().size());
  }
View Full Code Here

Examples of com.opengamma.master.orgs.OrganizationHistoryRequest


  @Test
  public void test_history_documents() {
    ObjectId oid = ObjectId.of("DbOrg", "201");
    OrganizationHistoryRequest request = new OrganizationHistoryRequest(oid);
    OrganizationHistoryResult test = _orgMaster.history(request);

    assertEquals(2, test.getDocuments().size());
    assert202(test.getDocuments().get(0));
    assert201(test.getDocuments().get(1));
View Full Code Here

Examples of com.opengamma.master.orgs.OrganizationHistoryRequest

  }

  @Test
  public void test_history_documentCountWhenMultipleOrganizations() {
    ObjectId oid = ObjectId.of("DbOrg", "102");
    OrganizationHistoryRequest request = new OrganizationHistoryRequest(oid);
    OrganizationHistoryResult test = _orgMaster.history(request);

    assertEquals(1, test.getPaging().getTotalItems());

    assertEquals(1, test.getDocuments().size());
View Full Code Here

Examples of com.opengamma.master.orgs.OrganizationHistoryRequest


  @Test
  public void test_history_noInstants() {
    ObjectId oid = ObjectId.of("DbOrg", "201");
    OrganizationHistoryRequest request = new OrganizationHistoryRequest(oid);
    OrganizationHistoryResult test = _orgMaster.history(request);

    assertEquals(PagingRequest.ALL, test.getPaging().getRequest());
    assertEquals(2, test.getPaging().getTotalItems());
View Full Code Here

Examples of com.opengamma.master.orgs.OrganizationHistoryRequest

  @Test
  public void test_history_noInstants_pageOne() {
    ObjectId oid = ObjectId.of("DbOrg", "201");
    PagingRequest pr = PagingRequest.ofPage(1, 1);
    OrganizationHistoryRequest request = new OrganizationHistoryRequest(oid);
    request.setPagingRequest(pr);
    OrganizationHistoryResult test = _orgMaster.history(request);

    assertEquals(pr, test.getPaging().getRequest());
    assertEquals(2, test.getPaging().getTotalItems());
View Full Code Here

Examples of com.opengamma.master.orgs.OrganizationHistoryRequest

  @Test
  public void test_history_noInstants_pageTwo() {
    ObjectId oid = ObjectId.of("DbOrg", "201");
    PagingRequest pr = PagingRequest.ofPage(2, 1);
    OrganizationHistoryRequest request = new OrganizationHistoryRequest(oid);
    request.setPagingRequest(pr);
    OrganizationHistoryResult test = _orgMaster.history(request);

    assertNotNull(test);
    assertNotNull(test.getPaging());
    assertEquals(pr, test.getPaging().getRequest());
View Full Code Here

Examples of com.opengamma.master.orgs.OrganizationHistoryRequest


  @Test
  public void test_history_versionsFrom_preFirst() {
    ObjectId oid = ObjectId.of("DbOrg", "201");
    OrganizationHistoryRequest request = new OrganizationHistoryRequest(oid);
    request.setVersionsFromInstant(_version1Instant.minusSeconds(5));
    OrganizationHistoryResult test = _orgMaster.history(request);

    assertEquals(2, test.getPaging().getTotalItems());

    assertEquals(2, test.getDocuments().size());
View Full Code Here

Examples of com.opengamma.master.orgs.OrganizationHistoryRequest

  }

  @Test
  public void test_history_versionsFrom_firstToSecond() {
    ObjectId oid = ObjectId.of("DbOrg", "201");
    OrganizationHistoryRequest request = new OrganizationHistoryRequest(oid);
    request.setVersionsFromInstant(_version1Instant.plusSeconds(5));
    OrganizationHistoryResult test = _orgMaster.history(request);

    assertEquals(2, test.getPaging().getTotalItems());

    assertEquals(2, test.getDocuments().size());
View Full Code Here

Examples of com.opengamma.master.orgs.OrganizationHistoryRequest

  }

  @Test
  public void test_history_versionsFrom_postSecond() {
    ObjectId oid = ObjectId.of("DbOrg", "201");
    OrganizationHistoryRequest request = new OrganizationHistoryRequest(oid);
    request.setVersionsFromInstant(_version2Instant.plusSeconds(5));
    OrganizationHistoryResult test = _orgMaster.history(request);

    assertEquals(1, test.getPaging().getTotalItems());

    assertEquals(1, test.getDocuments().size());
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.