Package com.opengamma.id

Examples of com.opengamma.id.ObjectId


   Get market data snapshot by id
  */
  @GET
  @Path("marketData/{id}")
  public DataMarketDataResource getMarketData(@PathParam("id") final String snapshotId) {
    ObjectId id = ObjectId.parse(snapshotId);
    return new DataMarketDataResource(id, getMaster());
  }
View Full Code Here


    return responseOkFudge(result);
 

  @Path("run/{id}")
  public DataBatchRunResource batchRuns(@PathParam("id") final String runId) {
    ObjectId id = ObjectId.parse(runId);
    return new DataBatchRunResource(id, getMaster());
  }
View Full Code Here

  public void test_ReplaceAllVersions1() {
    Clock origClock = _cfgMaster.getClock();
    try {
      Instant now = Instant.now();

      ObjectId baseOid = setupTestData(now);
      _cfgMaster.setClock(Clock.fixed(now.plus(2, HOURS), ZoneOffset.UTC));
      ConfigDocument latestDoc = _cfgMaster.get(baseOid, VersionCorrection.LATEST);


      List<ConfigDocument> replacement = newArrayList();
View Full Code Here

  public void test_ReplaceAllVersions2() {
    Clock origClock = _cfgMaster.getClock();
    try {
      Instant now = Instant.now();

      ObjectId baseOid = setupTestData(now);
      _cfgMaster.setClock(Clock.fixed(now.plus(2, HOURS), ZoneOffset.UTC));
      ConfigDocument latestDoc = _cfgMaster.get(baseOid, VersionCorrection.LATEST);

      List<ConfigDocument> replacement = newArrayList();
      for (int i = 1; i <= 4; i++) {
View Full Code Here

  public void test_ReplaceAllVersions3() {
    Clock origClock = _cfgMaster.getClock();
    try {
      Instant now = Instant.now();

      ObjectId baseOid = setupTestData(now);
      _cfgMaster.setClock(Clock.fixed(now.plus(2, HOURS), ZoneOffset.UTC));
      ConfigDocument latestDoc = _cfgMaster.get(baseOid, VersionCorrection.LATEST);


      List<ConfigDocument> replacement = newArrayList();
View Full Code Here

  }

  //-------------------------------------------------------------------------
  @Test
  public void test_history_documents() {
    ObjectId oid = ObjectId.of("DbHol", "201");
    HolidayHistoryRequest request = new HolidayHistoryRequest(oid);
    HolidayHistoryResult test = _holMaster.history(request);
   
    assertEquals(2, test.getDocuments().size());
    assert202(test.getDocuments().get(0));
View Full Code Here

    assert201(test.getDocuments().get(1));
  }

  @Test
  public void test_history_documentCountWhenMultipleHolidays() {
    ObjectId oid = ObjectId.of("DbHol", "102");
    HolidayHistoryRequest request = new HolidayHistoryRequest(oid);
    HolidayHistoryResult test = _holMaster.history(request);
   
    assertEquals(1, test.getPaging().getTotalItems());
   
View Full Code Here

  }

  //-------------------------------------------------------------------------
  @Test
  public void test_history_noInstants() {
    ObjectId oid = ObjectId.of("DbHol", "201");
    HolidayHistoryRequest request = new HolidayHistoryRequest(oid);
    HolidayHistoryResult test = _holMaster.history(request);
   
    assertEquals(PagingRequest.ALL, test.getPaging().getRequest());
    assertEquals(2, test.getPaging().getTotalItems());
View Full Code Here

  }

  //-------------------------------------------------------------------------
  @Test
  public void test_history_noInstants_pageOne() {
    ObjectId oid = ObjectId.of("DbHol", "201");
    PagingRequest pr = PagingRequest.ofPage(1, 1);
    HolidayHistoryRequest request = new HolidayHistoryRequest(oid);
    request.setPagingRequest(pr);
    HolidayHistoryResult test = _holMaster.history(request);
   
View Full Code Here

    assert202(test.getDocuments().get(0));
  }

  @Test
  public void test_history_noInstants_pageTwo() {
    ObjectId oid = ObjectId.of("DbHol", "201");
    PagingRequest pr = PagingRequest.ofPage(2, 1);
    HolidayHistoryRequest request = new HolidayHistoryRequest(oid);
    request.setPagingRequest(pr);
    HolidayHistoryResult test = _holMaster.history(request);
   
View Full Code Here

TOP

Related Classes of com.opengamma.id.ObjectId

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.