Examples of toLatest()


Examples of com.opengamma.id.UniqueId.toLatest()

        s_logger.info("Attempting to port portfolio id " + viewDefinition.getPortfolioId());
      }
      UniqueId replacementId = lookupPortfolioByName(idNameMap.get(viewDefinition.getPortfolioId()));
      if (replacementId != null) {
        if (viewDefinition.getPortfolioId().isLatest()) {
          replacementId = replacementId.toLatest();
        }
        return viewDefinition.copyWith(viewDefinition.getName(), replacementId, viewDefinition.getMarketDataUser());
      }
    }
    return viewDefinition;
View Full Code Here

Examples of com.opengamma.id.UniqueId.toLatest()

      public List<PortfolioGridRow> apply(PortfolioNode parentNode, Position position) {
        ComputationTargetSpecification nodeSpec = ComputationTargetSpecification.of(parentNode);
        // TODO I don't think toLatest() will do long term. resolution time available on the result model
        UniqueId positionId = position.getUniqueId();
        ComputationTargetSpecification target = nodeSpec.containing(ComputationTargetType.POSITION,
                                                                    positionId.toLatest());
        Security security = position.getSecurity();
        List<PortfolioGridRow> rows = Lists.newArrayList();
        UniqueId nodeId = parentNode.getUniqueId();
        if (isFungible(position.getSecurity())) {
          rows.add(new PortfolioGridRow(target, security.getName(), security.getUniqueId(), nodeId, positionId));
View Full Code Here

Examples of com.opengamma.id.UniqueId.toLatest()

    final ComputationTargetReference key;
    final UniqueId uid;
    if (link.getTarget() != null) {
      uid = link.getTarget().getUniqueId();
      if (link.getObjectId() != null) {
        key = new ComputationTargetSpecification(ComputationTargetType.SECURITY, uid.toLatest());
      } else if (!link.getExternalId().isEmpty()) {
        key = new ComputationTargetRequirement(ComputationTargetType.SECURITY, link.getExternalId());
      } else {
        return;
      }
View Full Code Here

Examples of com.opengamma.id.UniqueId.toLatest()

   * @param type the type of the object, not null
   * @param resolved the resolved object, not null
   */
  protected void log(final ComputationTargetType type, final UniqueIdentifiable resolved) {
    final UniqueId resolvedId = resolved.getUniqueId();
    log(new ComputationTargetSpecification(type, resolvedId.toLatest()), resolvedId);
  }

  /**
   * Logs a resolution.
   *
 
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.