def _restore(level)
      # Find the most recently stored state of this object. This could be on
      # any previous stash level or in the regular object DB. If the object
      # was created during the transaction, there is not previous state to
      # restore to.
      data = nil
      if @_stash_map
        (level - 1).downto(0) do |lvl|
          break if (data = @_stash_map[lvl])
        end
      end
      if data
        # We have a stashed version that we can restore from.
        _deserialize(data)
      elsif @store.db.include?(@_id)
        # We have no stashed version but can restore from the database.
        db_obj = store.db.get_object(@_id)
        _deserialize(db_obj['data'])
      end
    end
def _restore(level)
      # Find the most recently stored state of this object. This could be on
      # any previous stash level or in the regular object DB. If the object
      # was created during the transaction, there is not previous state to
      # restore to.
      data = nil
      if @_stash_map
        (level - 1).downto(0) do |lvl|
          break if (data = @_stash_map[lvl])
        end
      end
      if data
        # We have a stashed version that we can restore from.
        _deserialize(data)
      elsif @store.db.include?(@_id)
        # We have no stashed version but can restore from the database.
        db_obj = store.db.get_object(@_id)
        _deserialize(db_obj['data'])
      end
    end
Restore the object state from the storage back-end.
 @param level [Integer] the transaction nesting level