Package com.opengamma.id

Examples of com.opengamma.id.UniqueId


        return new InterestRateNotional(currencyBeanToCurrency(bean.getCurrency()), bean.getAmount());
      }

      @Override
      public Notional visitSecurityNotional(SecurityNotional ignore) {
        UniqueId uniqueId = uniqueIdBeanToUniqueId(bean.getIdentifier());
        return new SecurityNotional(uniqueId);
      }

      @Override
      public Notional visitVarianceSwapNotional(VarianceSwapNotional notional) {
View Full Code Here


        202, 3);
  }

  //-------------------------------------------------------------------------
  protected void assert101(final ExchangeDocument test) {
    UniqueId uniqueId = UniqueId.of("DbExg", "101", "0");
    assertNotNull(test);
    assertEquals(uniqueId, test.getUniqueId());
    assertEquals(_version1Instant, test.getVersionFromInstant());
    assertEquals(null, test.getVersionToInstant());
    assertEquals(_version1Instant, test.getCorrectionFromInstant());
View Full Code Here

    assertEquals(ZoneId.of("Europe/London"), exchange.getTimeZone());
    assertEquals(ExternalIdBundle.of(ExternalId.of("A", "B"), ExternalId.of("C", "D"), ExternalId.of("E", "F")), exchange.getExternalIdBundle());
  }

  protected void assert102(final ExchangeDocument test) {
    UniqueId uniqueId = UniqueId.of("DbExg", "102", "0");
    assertNotNull(test);
    assertEquals(uniqueId, test.getUniqueId());
    assertEquals(_version1Instant, test.getVersionFromInstant());
    assertEquals(null, test.getVersionToInstant());
    assertEquals(_version1Instant, test.getCorrectionFromInstant());
View Full Code Here

    assertEquals(ZoneId.of("Europe/Paris"), exchange.getTimeZone());
    assertEquals(ExternalIdBundle.of(ExternalId.of("A", "B"), ExternalId.of("C", "D"), ExternalId.of("G", "H")), exchange.getExternalIdBundle());
  }

  protected void assert201(final ExchangeDocument test) {
    UniqueId uniqueId = UniqueId.of("DbExg", "201", "0");
    assertNotNull(test);
    assertEquals(uniqueId, test.getUniqueId());
    assertEquals(_version1Instant, test.getVersionFromInstant());
    assertEquals(_version2Instant, test.getVersionToInstant());
    assertEquals(_version1Instant, test.getCorrectionFromInstant());
View Full Code Here

    assertEquals(ZoneId.of("Asia/Tokyo"), exchange.getTimeZone());
    assertEquals(ExternalIdBundle.of(ExternalId.of("C", "D"), ExternalId.of("E", "F")), exchange.getExternalIdBundle());
  }

  protected void assert202(final ExchangeDocument test) {
    UniqueId uniqueId = UniqueId.of("DbExg", "201", "1");
    assertNotNull(test);
    assertEquals(uniqueId, test.getUniqueId());
    assertEquals(_version2Instant, test.getVersionFromInstant());
    assertEquals(null, test.getVersionToInstant());
    assertEquals(_version2Instant, test.getCorrectionFromInstant());
View Full Code Here

   
    final ManageableMarketDataSnapshot marketDataSnaphshot = document.getSnapshot();
    final long docId = nextId("snp_snapshot_seq");
    final long docOid = (document.getUniqueId() != null ? extractOid(document.getUniqueId()) : docId);
    // set the uniqueId (needs to go in Fudge message)
    final UniqueId uniqueId = createUniqueId(docOid, docId);
    marketDataSnaphshot.setUniqueId(uniqueId);
    document.setUniqueId(uniqueId);
   
    // the arguments for inserting into the marketDataSnaphshot table
    FudgeMsgEnvelope env = FUDGE_CONTEXT.toFudgeMsg(marketDataSnaphshot);
View Full Code Here

    ArgumentChecker.notNull(document.getPortfolio(), "document.portfolio");
    ArgumentChecker.notNull(document.getPortfolio().getRootNode(), "document.portfolio.rootNode");

    final Long portfolioId = nextId("prt_master_seq");
    final Long portfolioOid = (document.getUniqueId() != null ? extractOid(document.getUniqueId()) : portfolioId);
    final UniqueId portfolioUid = createUniqueId(portfolioOid, portfolioId);

    // the arguments for inserting into the portfolio table
    final DbMapSqlParameterSource docArgs = new DbMapSqlParameterSource()
        .addValue("portfolio_id", portfolioId)
        .addValue("portfolio_oid", portfolioOid)
View Full Code Here

      final Long portfolioId, final Long portfolioOid, final Long parentNodeId, final Long parentNodeOid,
      final AtomicInteger counter, final int depth, final List<DbMapSqlParameterSource> argsList, final List<DbMapSqlParameterSource> posList) {
    // need to insert parent before children for referential integrity
    final Long nodeId = nextId("prt_master_seq");
    final Long nodeOid = (update && node.getUniqueId() != null ? extractOid(node.getUniqueId()) : nodeId);
    UniqueId nodeUid = createUniqueId(nodeOid, nodeId);
    node.setUniqueId(nodeUid);
    node.setParentNodeId(parentNodeUid);
    node.setPortfolioId(portfolioUid);
    final DbMapSqlParameterSource treeArgs = new DbMapSqlParameterSource()
        .addValue("node_id", nodeId)
View Full Code Here

  private RiskRun getRiskRun(ViewComputationResultModel fullFragment, ViewDeltaResultModel deltaFragment) {
    return _riskRuns.get(getCycleId(fullFragment, deltaFragment));
  }

  private static UniqueId getCycleId(ViewComputationResultModel fullFragment, ViewDeltaResultModel deltaFragment) {
    UniqueId cycleId;
    if (fullFragment != null) {
      cycleId = fullFragment.getViewCycleId();
    } else if (deltaFragment != null) {
      cycleId = deltaFragment.getViewCycleId();
    } else {
View Full Code Here

      final long docOid = rs.getLong("DOC_OID");
      final Timestamp versionFrom = rs.getTimestamp("VER_FROM_INSTANT");
      final Timestamp versionTo = rs.getTimestamp("VER_TO_INSTANT");
      final Timestamp correctionFrom = rs.getTimestamp("CORR_FROM_INSTANT");
      final Timestamp correctionTo = rs.getTimestamp("CORR_TO_INSTANT");
      UniqueId uniqueId = createUniqueId(docOid, docId);
     
      ManageableMarketDataSnapshot marketDataSnapshot;
      //PLAT-1378
      if (_includeData) {
        LobHandler lob = getDialect().getLobHandler();
View Full Code Here

TOP

Related Classes of com.opengamma.id.UniqueId

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.