Package com.opengamma

Examples of com.opengamma.DataNotFoundException


      if (target != null) {
        setTarget(target);
        return target;
      }
    }
    throw new DataNotFoundException("Unable to resolve security: " + getBestName());
  }
View Full Code Here


  public Portfolio getPortfolio(final UniqueId uniqueId, final VersionCorrection versionCorrection) {
    ArgumentChecker.notNull(uniqueId, "uniqueId");
    ArgumentChecker.notNull(versionCorrection, "versionCorrection");
    Portfolio portfolio = _portfolios.get(uniqueId.getObjectId());
    if (portfolio == null) {
      throw new DataNotFoundException("Portfolio not found: " + uniqueId);
    }
    return portfolio;
  }
View Full Code Here

  public Portfolio getPortfolio(ObjectId objectId, VersionCorrection versionCorrection) {
    ArgumentChecker.notNull(objectId, "objectId");
    ArgumentChecker.notNull(versionCorrection, "versionCorrection");
    Portfolio portfolio = _portfolios.get(objectId);
    if (portfolio == null) {
      throw new DataNotFoundException("Portfolio not found: " + objectId);
    }
    return portfolio;
  }
View Full Code Here

  public PortfolioNode getPortfolioNode(final UniqueId uniqueId, final VersionCorrection versionCorrection) {
    ArgumentChecker.notNull(uniqueId, "uniqueId");
    ArgumentChecker.notNull(versionCorrection, "versionCorrection");
    PortfolioNode node = _nodes.get(uniqueId.getObjectId());
    if (node == null) {
      throw new DataNotFoundException("PortfolioNode not found: " + uniqueId);
    }
    return node;
  }
View Full Code Here

  @Override
  public Position getPosition(UniqueId uniqueId) {
    ArgumentChecker.notNull(uniqueId, "uniqueId");
    Position position = _positions.get(uniqueId.getObjectId());
    if (position == null) {
      throw new DataNotFoundException("Position not found: " + uniqueId);
    }
    return position;
  }
View Full Code Here

  public Position getPosition(final ObjectId objectId, final VersionCorrection versionCorrection) {
    ArgumentChecker.notNull(objectId, "objectId");
    ArgumentChecker.notNull(versionCorrection, "versionCorrection");
    Position position = _positions.get(objectId);
    if (position == null) {
      throw new DataNotFoundException("Position not found: " + objectId);
    }
    return position;
  }
View Full Code Here

  @Override
  public Trade getTrade(UniqueId uniqueId) {
    ArgumentChecker.notNull(uniqueId, "uniqueId");
    Trade trade = _trades.get(uniqueId.getObjectId());
    if (trade == null) {
      throw new DataNotFoundException("Trade not found: " + uniqueId);
    }
    return trade;
  }
View Full Code Here

      }
     
    }
   
    if (portfolio == null) {
      throw new DataNotFoundException("Unable to locate portfolio with UniqueId " + uniqueId);
    }
   
    return portfolio;
  }
View Full Code Here

      }
     
    }
   
    if (position == null) {
      throw new DataNotFoundException("Unable to find position with UniqueId " + uniqueId);
    }
   
    return position;
  }
View Full Code Here

  public <T> List<T> map(ManageablePortfolioNode node, Function<T> function) {
    List<T> results = Lists.newArrayList();
    for (ObjectId positionId : node.getPositionIds()) {
      ManageablePosition position = _positionMaster.get(positionId, _versionCorrection).getPosition();
      if (position == null) {
        throw new DataNotFoundException("No position found with ID " + positionId + " and " +
                                            "version-correction " + _versionCorrection);
      }
      ManageableSecurity security = (ManageableSecurity) position.getSecurityLink().resolve(_securitySource);
      ExternalId underlyingId = FinancialSecurityUtils.getUnderlyingId(security);
      ManageableSecurity underlying;
View Full Code Here

TOP

Related Classes of com.opengamma.DataNotFoundException

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.