Package com.opengamma.master.marketdatasnapshot

Examples of com.opengamma.master.marketdatasnapshot.MarketDataSnapshotSearchRequest$Meta


  private List<String> getMarketDataSpecificationNames() {
    return _namedMarketDataSpecificationRepository.getNames();
  }

  private Map<String, Map<String, String>> getSnapshotDetails() {
    MarketDataSnapshotSearchRequest snapshotSearchRequest = new MarketDataSnapshotSearchRequest();
    snapshotSearchRequest.setIncludeData(false);

    Map<String, Map<String, String>> snapshotsByBasisView = new HashMap<String, Map<String, String>>();
    for (MarketDataSnapshotDocument doc : MarketDataSnapshotSearchIterator.iterable(_snapshotMaster, snapshotSearchRequest)) {
      ManageableMarketDataSnapshot snapshot = doc.getSnapshot();
      if (snapshot.getUniqueId() == null) {
View Full Code Here


                                 EHCachingSearchCache.extractUniqueIds(result.getDocuments()));
      }
    });

    // Prime document search cache
    MarketDataSnapshotSearchRequest defaultSearch = new MarketDataSnapshotSearchRequest();
    _documentSearchCache.prefetch(defaultSearch, PagingRequest.FIRST_PAGE);
  }
View Full Code Here

    assertEquals("Hello", added.getUniqueId().getScheme());
  }

  //-------------------------------------------------------------------------
  public void test_search_emptyMaster() {
    MarketDataSnapshotSearchRequest request = new MarketDataSnapshotSearchRequest();
    MarketDataSnapshotSearchResult result = _testEmpty.search(request);
    assertEquals(0, result.getPaging().getTotalItems());
    assertEquals(0, result.getDocuments().size());
  }
View Full Code Here

    assertEquals(0, result.getPaging().getTotalItems());
    assertEquals(0, result.getDocuments().size());
  }

  public void test_search_populatedMaster_all() {
    MarketDataSnapshotSearchRequest request = new MarketDataSnapshotSearchRequest();
    MarketDataSnapshotSearchResult result = _testPopulated.search(request);
    assertEquals(2, result.getPaging().getTotalItems());
    List<MarketDataSnapshotDocument> docs = result.getDocuments();
    assertEquals(2, docs.size());
    assertEquals(true, docs.contains(_doc1));
View Full Code Here

    assertEquals(true, docs.contains(_doc1));
    assertEquals(true, docs.contains(_doc2));
  }

  public void test_search_populatedMaster_filterByName() {
    MarketDataSnapshotSearchRequest request = new MarketDataSnapshotSearchRequest();
    request.setName("*est 2");
    MarketDataSnapshotSearchResult result = _testPopulated.search(request);
    assertEquals(1, result.getPaging().getTotalItems());
    List<MarketDataSnapshotDocument> docs = result.getDocuments();
    assertEquals(1, docs.size());
    assertEquals(true, docs.contains(_doc2));
View Full Code Here

    assertEquals(1, docs.size());
    assertEquals(true, docs.contains(_doc2));
  }
 
  public void test_search_populatedMaster_filterById() {
    MarketDataSnapshotSearchRequest request = new MarketDataSnapshotSearchRequest();
    request.setSnapshotIds(ImmutableSet.of(_doc1.getUniqueId().getObjectId()));
    MarketDataSnapshotSearchResult result = _testPopulated.search(request);
    assertEquals(1, result.getPaging().getTotalItems());
    MarketDataSnapshotDocument doc = result.getFirstDocument();
    assertEquals(_doc1.getUniqueId(), doc.getUniqueId());
  }
View Full Code Here

    _testEmpty.remove(OTHER_UID);
  }

  public void test_remove_populatedMaster() {
    _testPopulated.remove(_doc1.getUniqueId());
    MarketDataSnapshotSearchRequest request = new MarketDataSnapshotSearchRequest();
    MarketDataSnapshotSearchResult result = _testPopulated.search(request);
    assertEquals(1, result.getPaging().getTotalItems());
    List<MarketDataSnapshotDocument> docs = result.getDocuments();
    assertEquals(1, docs.size());
    assertEquals(true, docs.contains(_doc2));
View Full Code Here

    result.setDocuments(Lists.newArrayList(new MarketDataSnapshotDocument(s_mockUniqueId, new ManageableMarketDataSnapshot())));
    return result;
  }

  private static MarketDataSnapshotSearchRequest makeRequest() {
    MarketDataSnapshotSearchRequest request = new MarketDataSnapshotSearchRequest();
    request.setName("snaphshotName");
    return request;
  }
View Full Code Here

TOP

Related Classes of com.opengamma.master.marketdatasnapshot.MarketDataSnapshotSearchRequest$Meta

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.