Package com.opengamma.master.position

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


    final LocalDate tradeDate = _now.toLocalDate();
    final OffsetTime tradeTime = _now.toOffsetTime().minusSeconds(500);

    final ManageableTrade trade1 = new ManageableTrade(BigDecimal.TEN, ExternalId.of("A", "B"), tradeDate, tradeTime, ExternalId.of("CPS", "CPV"));
    trade1.addAttribute("key11", "Value11");
    trade1.addAttribute("key12", "Value12");
    position.getTrades().add(trade1);

    final ManageableTrade trade2 = new ManageableTrade(BigDecimal.TEN, ExternalId.of("C", "D"), tradeDate, tradeTime, ExternalId.of("CPS2", "CPV2"));
    trade2.addAttribute("key21", "Value21");
    trade2.addAttribute("key22", "Value22");
View Full Code Here


    trade1.addAttribute("key11", "Value11");
    trade1.addAttribute("key12", "Value12");
    position.getTrades().add(trade1);

    final ManageableTrade trade2 = new ManageableTrade(BigDecimal.TEN, ExternalId.of("C", "D"), tradeDate, tradeTime, ExternalId.of("CPS2", "CPV2"));
    trade2.addAttribute("key21", "Value21");
    trade2.addAttribute("key22", "Value22");
    position.getTrades().add(trade2);

    final PositionDocument doc = new PositionDocument();
    doc.setPosition(position);
View Full Code Here

    trade1.addAttribute("key12", "Value12");
    position.getTrades().add(trade1);

    final ManageableTrade trade2 = new ManageableTrade(BigDecimal.TEN, ExternalId.of("C", "D"), tradeDate, tradeTime, ExternalId.of("CPS2", "CPV2"));
    trade2.addAttribute("key21", "Value21");
    trade2.addAttribute("key22", "Value22");
    position.getTrades().add(trade2);

    final PositionDocument doc = new PositionDocument();
    doc.setPosition(position);
    _posMaster.add(doc);
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");
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

    ManageablePosition pos2 = new ManageablePosition(BigDecimal.TEN, ExternalId.of("A", "B"));
    pos2.setUniqueId(version1.getUniqueId());
    pos1.addAttribute("A11", "V21");
    pos1.addAttribute("A12", "V22");
    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

    pos2.setUniqueId(version1.getUniqueId());
    pos1.addAttribute("A11", "V21");
    pos1.addAttribute("A12", "V22");
    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

    pos1.addAttribute("A11", "V21");
    pos1.addAttribute("A12", "V22");
    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.