Lazy loads a Collection

 @return [self]

 @api private
331725
def lazy_load
      if loaded?
        return self
      end

      mark_loaded

      head  = self.head
      tail  = self.tail
      query = self.query

      resources = repository.read(query)

      # remove already known results
      resources -= head          if head.any?
      resources -= tail          if tail.any?
      resources -= @removed.to_a if @removed.any?

      query.add_reversed? ? unshift(*resources.reverse) : concat(resources)

      # TODO: DRY this up with LazyArray
      @array.unshift(*head)
      @array.concat(tail)

      @head = @tail = nil
      @reapers.each { |resource| @array.delete_if(&resource) } if @reapers
      @array.freeze if frozen?

      self
    end
176225
def [](undefined: true, **)
      null = (undefined == false) ? nil : UNDEFINED
      Module.new.tap do |mod|
        mod.extend DSL
        mod.include self
        mod.send(:instance_variable_set, :@null, null)
      end
    end
232125
def eager_load_components!
      $LOAD_PATH.each do |path|
        next unless path.match(/\/components$/)

        glob = File.join(path, '**', '*_component.rb')

        Dir[glob].each do |file|
          load(file)
        end
      end
    end
864170
def _cache_lazy_values
      action_links.each(&:name_to_cache) if cache_action_link_urls
      columns.select(&:sortable?).each(&:sort)
      columns.select(&:searchable?).each(&:search_sql)
      actions.each do |action_name|
        action = send(action_name)
        Array(action.class.columns_collections).each { |method| action.send(method) }
      end
    end
790075
def each
      @dir.synchronize do
        ensure_reader_open
        (0...@reader.max_doc).each do |i|
          yield @reader[i].load unless @reader.deleted?(i)
        end
      end
    end
1003723
function Collection(options) {
  Base.call(this, options);
  this.define('lists', {});
  this.define('_items', {});
  this.define('Item', this.options.Item || require('./item'));
  this.define('List', this.options.List || require('./list'));
  mixins(this);

  /**
   * Get an object representing the current items on the instance.
   *
   * ```js
   * var items = this.items;
   * ```
   *
   * @return {Object} Object of items
   */

  Object.defineProperty(this, 'items', {
    enumerable: false,
    configurable: true,
    get: function () {
      return this._items;
    },
    set: function (items) {
      lazy.forIn(items, function (item, key) {
        delete this._items[key];
        delete this[key];
        this.set(key, item);
      }, this);
    }
  });
}
1059190
def load
      resp = @client.describe_tags(filters: [
        {
          name: "key",
          values: [@key]
        },
        {
          name: "value",
          values: [@value]
        }
      ])
      @data = resp.tags[0]
      self
    end
613887
function lazy(key, get) {
  const uninitialized = {};
  let _val = uninitialized;
  Object.defineProperty(exports, key, {
    get() {
      if (_val === uninitialized) {
        _val = get();
      }
      return _val;
    },
  });
}
720907
@Override
    public <TResult> Lazy<Map<String, TResult>> load(Class<TResult> clazz, Collection<String> ids) {
        return _session.lazyLoadInternal(clazz, ids.toArray(new String[0]), _includes.toArray(new String[0]), null);
    }
700270
def lazy_enumerate(self, **kwargs):
        '''
        '''
        kwargs['lazy'] = True
        for item in self.enumerate(**kwargs):
            yield item
398112
def load_tasks(app = self)
      if Rails::VERSION::MAJOR < 4
        railties.all { |r| r.load_tasks(app) }
      end

      extend Rake::DSL if defined? Rake::DSL
      self.class.rake_tasks.each { |block| instance_exec(app, &block) }
      paths['lib/tasks'].existent.sort.each { |ext| load(ext) }
      self
    end
1231439
protected function lazyLoad()
    {
        if(!empty($this->data)){
            return true;
        }

        if(isset($this->id)){
            $this->get($this);
            return true;
        }

        return false;
    }
339706
def map(&block)
      collection = []

      each do |connection|
        collection << block.call(connection) if block
      end

      collection
    end
1113917
def [](property)
      value = nil
      return value unless (value = super(property)).nil?
      if api and !loaded
        # load the object if trying to access a property
        self.loaded = true
        fetch
      end
      super(property)
    end
647172
def load(data)
      data.each do |key, value|
        check_key!(key)
        set(key, value)
      end
    end
596207
def get_all_collections()
      response = self.get('collections').body
      parsed = JSON.parse(response)
      all_collections = []
      parsed.each do |item_hash|
        all_collections.push OmekaClient::OmekaCollection.new(self, item_hash)
      end
      return all_collections
    end
521578
def get(self, columns=None):
        
        models = self.get_models(columns)

        # If we actually found models we will also eager load any relationships that
        # have been specified as needing to be eager loaded, which will solve the
        # n+1 query issue for the developers to avoid running a lot of queries.
        if len(models) > 0:
            models = self.eager_load_relations(models)

        collection = self._model.new_collection(models)

        return collection