Package com.opengamma.core.security.impl

Examples of com.opengamma.core.security.impl.SimpleSecurityLink


    SimpleSecurityLink test = new SimpleSecurityLink(EXTERNAL_ID_BUNDLE);
    assertEquals(true, LinkUtils.isValid(test));
  }

  public void test_isValid_bothIds() {
    SimpleSecurityLink test = new SimpleSecurityLink(OBJECT_ID);
    test.setExternalId(EXTERNAL_ID_BUNDLE);
    assertEquals(true, LinkUtils.isValid(test));
  }
View Full Code Here


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

    _tradeTime = copyFrom.getTradeTime();
    _premium = copyFrom.getPremium();
    _premiumCurrency = copyFrom.getPremiumCurrency();
    _premiumDate = copyFrom.getPremiumDate();
    _premiumTime = copyFrom.getPremiumTime();
    _securityLink = new SimpleSecurityLink(copyFrom.getSecurityLink());
    setAttributes(copyFrom.getAttributes());
  }
View Full Code Here

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

   */
  public SimplePosition(BigDecimal quantity, ExternalId securityKey) {
    ArgumentChecker.notNull(quantity, "quantity");
    ArgumentChecker.notNull(securityKey, "security key");
    _quantity = quantity;
    _securityLink = new SimpleSecurityLink(securityKey);
  }
View Full Code Here

   */
  public SimplePosition(BigDecimal quantity, ExternalIdBundle securityKey) {
    ArgumentChecker.notNull(quantity, "quantity");
    ArgumentChecker.notNull(securityKey, "security key");
    _quantity = quantity;
    _securityLink = new SimpleSecurityLink(securityKey);
  }
View Full Code Here

    ArgumentChecker.notNull(uniqueId, "uniqueId");
    ArgumentChecker.notNull(quantity, "quantity");
    ArgumentChecker.notNull(securityKey, "securityKey");
    _uniqueId = uniqueId;
    _quantity = quantity;
    _securityLink = new SimpleSecurityLink(securityKey);
  }
View Full Code Here

    ArgumentChecker.notNull(uniqueId, "uniqueId");
    ArgumentChecker.notNull(quantity, "quantity");
    ArgumentChecker.notNull(securityKey, "securityKey");
    _uniqueId = uniqueId;
    _quantity = quantity;
    _securityLink = new SimpleSecurityLink(securityKey);
  }
View Full Code Here

   */
  public SimplePosition(final Position copyFrom) {
    ArgumentChecker.notNull(copyFrom, "copyFrom");
    _uniqueId = copyFrom.getUniqueId();
    _quantity = copyFrom.getQuantity();
    _securityLink = new SimpleSecurityLink(copyFrom.getSecurityLink());
    for (Trade trade : copyFrom.getTrades()) {
      SimpleTrade clonedTrade = new SimpleTrade(trade);
      _trades.add(clonedTrade);
    }
    setAttributes(copyFrom.getAttributes());
View Full Code Here

    SimplePosition position = new SimplePosition();
    position.setUniqueId(uniqueId);
    Map<String, String> hashFields = jedis.hgetAll(redisKey);
    position.setQuantity(new BigDecimal(hashFields.get("QTY")));
    ExternalId secId = ExternalId.parse(hashFields.get("SEC"));
    SimpleSecurityLink secLink = new SimpleSecurityLink();
    secLink.addExternalId(secId);
    position.setSecurityLink(secLink);
   
    for (Map.Entry<String, String> field : hashFields.entrySet()) {
      if (!field.getKey().startsWith("ATT-")) {
        continue;
View Full Code Here

TOP

Related Classes of com.opengamma.core.security.impl.SimpleSecurityLink

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.