String save(@NotNull @Valid GameLog gameLog) { Preconditions.checkNotNull(gameLog); WriteResult<GameLog, String> insert = this.gameLogCollection.insert(gameLog); log.debug("Saved Gamelog with _id " + insert.getSavedId()); return insert.getSavedId(); }
@Override public Output create(Output request) throws ValidationException { final OutputImpl outputImpl = implOrFail(request); final WriteResult<OutputImpl, String> writeResult = coll.save(outputImpl); return writeResult.getSavedObject(); }
@Override public Shipment addShipment(Shipment s) { WriteResult<Shipment, String> result = shipments.insert(s); return result.getSavedObject(); }