Package com.opengamma.master.position

Examples of com.opengamma.master.position.ManageableTrade.addAttribute()


   
    LocalDate tradeDate = _now.toLocalDate();
    OffsetTime tradeTime = _now.toOffsetTime().minusSeconds(500);
   
    ManageableTrade tradeA = new ManageableTrade(BigDecimal.TEN, ExternalId.of("A", "B"), tradeDate, tradeTime, ExternalId.of("CPS", "CPV"));
    tradeA.addAttribute("key11", "Value11");
    tradeA.addAttribute("key12", "Value12");
    pos1.addTrade(tradeA);
   
    ManageableTrade tradeB = new ManageableTrade(BigDecimal.TEN, ExternalId.of("C", "D"), tradeDate, tradeTime, ExternalId.of("CPS2", "CPV2"));
    tradeB.addAttribute("key21", "Value21");
View Full Code Here


    LocalDate tradeDate = _now.toLocalDate();
    OffsetTime tradeTime = _now.toOffsetTime().minusSeconds(500);
   
    ManageableTrade tradeA = new ManageableTrade(BigDecimal.TEN, ExternalId.of("A", "B"), tradeDate, tradeTime, ExternalId.of("CPS", "CPV"));
    tradeA.addAttribute("key11", "Value11");
    tradeA.addAttribute("key12", "Value12");
    pos1.addTrade(tradeA);
   
    ManageableTrade tradeB = new ManageableTrade(BigDecimal.TEN, ExternalId.of("C", "D"), tradeDate, tradeTime, ExternalId.of("CPS2", "CPV2"));
    tradeB.addAttribute("key21", "Value21");
    tradeB.addAttribute("key22", "Value22");
View Full Code Here

    tradeA.addAttribute("key11", "Value11");
    tradeA.addAttribute("key12", "Value12");
    pos1.addTrade(tradeA);
   
    ManageableTrade tradeB = new ManageableTrade(BigDecimal.TEN, ExternalId.of("C", "D"), tradeDate, tradeTime, ExternalId.of("CPS2", "CPV2"));
    tradeB.addAttribute("key21", "Value21");
    tradeB.addAttribute("key22", "Value22");
    pos1.addTrade(tradeB);
   
    PositionDocument doc = new PositionDocument(pos1);
    PositionDocument version1 = _posMaster.add(doc);
View Full Code Here

    tradeA.addAttribute("key12", "Value12");
    pos1.addTrade(tradeA);
   
    ManageableTrade tradeB = new ManageableTrade(BigDecimal.TEN, ExternalId.of("C", "D"), tradeDate, tradeTime, ExternalId.of("CPS2", "CPV2"));
    tradeB.addAttribute("key21", "Value21");
    tradeB.addAttribute("key22", "Value22");
    pos1.addTrade(tradeB);
   
    PositionDocument doc = new PositionDocument(pos1);
    PositionDocument version1 = _posMaster.add(doc);
    assertNotNull(version1.getUniqueId());
View Full Code Here

    assertEquals(version1.getPosition(), _posMaster.get(pos1.getUniqueId()).getPosition());
   
    ManageablePosition pos2 = new ManageablePosition(BigDecimal.TEN, ExternalId.of("A", "B"));
    pos2.setUniqueId(version1.getUniqueId());
    ManageableTrade tradeC = new ManageableTrade(BigDecimal.TEN, ExternalId.of("A", "B"), tradeDate, tradeTime, ExternalId.of("CPS", "CPV"));
    tradeC.addAttribute("A", "B");
    tradeC.addAttribute("C", "D");
    tradeC.addAttribute("E", "F");
    pos2.addTrade(tradeC);
   
    PositionDocument version2 = _posMaster.update(new PositionDocument(pos2));   
View Full Code Here

   
    ManageablePosition pos2 = new ManageablePosition(BigDecimal.TEN, ExternalId.of("A", "B"));
    pos2.setUniqueId(version1.getUniqueId());
    ManageableTrade tradeC = new ManageableTrade(BigDecimal.TEN, ExternalId.of("A", "B"), tradeDate, tradeTime, ExternalId.of("CPS", "CPV"));
    tradeC.addAttribute("A", "B");
    tradeC.addAttribute("C", "D");
    tradeC.addAttribute("E", "F");
    pos2.addTrade(tradeC);
   
    PositionDocument version2 = _posMaster.update(new PositionDocument(pos2));   
    assertNotNull(version2);
View Full Code Here

    ManageablePosition pos2 = new ManageablePosition(BigDecimal.TEN, ExternalId.of("A", "B"));
    pos2.setUniqueId(version1.getUniqueId());
    ManageableTrade tradeC = new ManageableTrade(BigDecimal.TEN, ExternalId.of("A", "B"), tradeDate, tradeTime, ExternalId.of("CPS", "CPV"));
    tradeC.addAttribute("A", "B");
    tradeC.addAttribute("C", "D");
    tradeC.addAttribute("E", "F");
    pos2.addTrade(tradeC);
   
    PositionDocument version2 = _posMaster.update(new PositionDocument(pos2));   
    assertNotNull(version2);
    assertFalse(version1.getUniqueId().equals(version2.getUniqueId()));
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.