Examples of atVersion()


Examples of com.opengamma.id.ObjectId.atVersion()

  public PositionDocument add(final PositionDocument document) {
    ArgumentChecker.notNull(document, "document");
    ArgumentChecker.notNull(document.getPosition(), "document.position");

    final ObjectId objectId = _objectIdSupplier.get();
    final UniqueId uniqueId = objectId.atVersion("");
    final Instant now = Instant.now();

    final PositionDocument clonedDoc = clonePositionDocument(document);
    setDocumentID(document, clonedDoc, uniqueId);
    setVersionTimes(document, clonedDoc, now, null, now, null);
View Full Code Here

Examples of com.opengamma.id.ObjectId.atVersion()

  }

  private void storeTrades(final List<ManageableTrade> clonedTrades, final List<ManageableTrade> trades, final UniqueId parentPositionId) {
    for (int i = 0; i < clonedTrades.size(); i++) {
      final ObjectId objectId = _objectIdSupplier.get();
      final UniqueId uniqueId = objectId.atVersion("");
      final ManageableTrade origTrade = trades.get(i);
      final ManageableTrade clonedTrade = clonedTrades.get(i);
      clonedTrade.setUniqueId(uniqueId);
      origTrade.setUniqueId(uniqueId);
      clonedTrade.setParentPositionId(parentPositionId);
View Full Code Here

Examples of com.opengamma.id.ObjectId.atVersion()

    ArgumentChecker.notNull(document, "document");
    ArgumentChecker.notNull(document.getName(), "document.name");
    ArgumentChecker.notNull(document.getHoliday(), "document.holiday");

    final ObjectId objectId = _objectIdSupplier.get();
    final UniqueId uniqueId = objectId.atVersion("");
    final ManageableHoliday holiday = document.getHoliday();
    holiday.setUniqueId(uniqueId);
    document.setUniqueId(uniqueId);
    final Instant now = Instant.now();
    document.setVersionFromInstant(now);
View Full Code Here

Examples of com.opengamma.id.ObjectId.atVersion()

    ArgumentChecker.notNull(document.getConfig().getName(), "document.object.name");
    ArgumentChecker.notNull(document.getConfig().getValue(), "document.object.value");

    final ConfigItem<?> item = document.getConfig();
    final ObjectId objectId = _objectIdSupplier.get();
    final UniqueId uniqueId = objectId.atVersion(Long.toString(_versions.incrementAndGet()));
    final Instant now = Instant.now();
    item.setUniqueId(uniqueId);
    IdUtils.setInto(item.getValue(), uniqueId);
    final ConfigDocument doc = new ConfigDocument(item);
    doc.setConfig(document.getConfig());
View Full Code Here

Examples of com.opengamma.id.ObjectId.atVersion()

  public MarketDataSnapshotDocument add(final MarketDataSnapshotDocument document) {
    ArgumentChecker.notNull(document, "document");
    ArgumentChecker.notNull(document.getSnapshot(), "document.snapshot");

    final ObjectId objectId = _objectIdSupplier.get();
    final UniqueId uniqueId = objectId.atVersion("");
    final ManageableMarketDataSnapshot snapshot = document.getSnapshot();
    snapshot.setUniqueId(uniqueId);
    final Instant now = Instant.now();
    final MarketDataSnapshotDocument doc = new MarketDataSnapshotDocument(snapshot);
    doc.setVersionFromInstant(now);
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.