Package com.opengamma.master.security

Examples of com.opengamma.master.security.ManageableSecurityLink


  /**
   * Construct an empty instance that must be populated via setters.
   */
  public ManageablePosition() {
    _securityLink = new ManageableSecurityLink();
  }
View Full Code Here


   */
  public ManageablePosition(final BigDecimal quantity, final ExternalId securityId) {
    ArgumentChecker.notNull(quantity, "quantity");
    ArgumentChecker.notNull(securityId, "securityId");
    _quantity = quantity;
    _securityLink = new ManageableSecurityLink(securityId);
  }
View Full Code Here

   */
  public ManageablePosition(final BigDecimal quantity, final ExternalIdBundle securityId) {
    ArgumentChecker.notNull(quantity, "quantity");
    ArgumentChecker.notNull(securityId, "securityId");
    _quantity = quantity;
    _securityLink = new ManageableSecurityLink(securityId);
  }
View Full Code Here

  public ManageablePosition(UniqueId uniqueId, BigDecimal quantity, ExternalIdBundle securityId) {
    ArgumentChecker.notNull(quantity, "quantity");
    ArgumentChecker.notNull(securityId, "securityId");
    setUniqueId(uniqueId);
    setQuantity(quantity);
    _securityLink = new ManageableSecurityLink(securityId);
  }
View Full Code Here

    UniqueId tradeId = UniqueId.parse(tradeIdStr);
    if (!tradeId.isLatest()) {
      throw new IllegalArgumentException("The blotter can only be used to update the latest version of a trade");
    }
    ManageableTrade trade = _positionMaster.getTrade(tradeId);
    ManageableSecurityLink securityLink = trade.getSecurityLink();
    return buildTradeJSON(trade, securityLink);
  }
View Full Code Here

    UniqueId positionId = UniqueId.parse(positionIdStr);
    if (!positionId.isLatest()) {
      throw new IllegalArgumentException("The blotter can only be used to update the latest version of a trade");
    }
    ManageablePosition position = _positionMaster.get(positionId).getPosition();
    ManageableSecurityLink securityLink = position.getSecurityLink();
    ManageableTrade trade = new ManageableTrade();
    trade.setSecurityLink(securityLink);
    if (position.getTrades().size() == 0) {
      trade.setTradeDate(LocalDate.now());
      trade.setCounterpartyExternalId(ExternalId.of(AbstractTradeBuilder.CPTY_SCHEME, AbstractTradeBuilder.DEFAULT_COUNTERPARTY));
View Full Code Here

    manPrt.setUniqueId(UID);
    PortfolioDocument prtDoc = new PortfolioDocument(manPrt);
   
    ManageableTrade manTrade = new ManageableTrade();
    manTrade.setQuantity(BigDecimal.valueOf(1234));
    manTrade.setSecurityLink(new ManageableSecurityLink(ExternalId.of("CC", "DD")));
    manTrade.setUniqueId(UID5);
    ManageablePosition manPos = new ManageablePosition();
    manPos.setQuantity(BigDecimal.valueOf(1235));
    manPos.setSecurityLink(new ManageableSecurityLink(ExternalId.of("AA", "BB")));
    manPos.setUniqueId(UID4);
    manPos.addTrade(manTrade);
    PositionDocument posDoc = new PositionDocument(manPos);
    PositionSearchRequest posRequest = new PositionSearchRequest();
    posRequest.addPositionObjectId(UID4);
View Full Code Here

TOP

Related Classes of com.opengamma.master.security.ManageableSecurityLink

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.