Returns the associations defined by the service
 @return [Hash<OData::Association>]
485674
def associations
      @associations ||= Hash[metadata.xpath('//Association').collect do |association_definition|
        [
            association_definition.attributes['Name'].value,
            build_association(association_definition)
        ]
      end]
    end
322982
def list_section(service_name = nil, section_name = nil, graph_name = nil)
      graphs = list_graph(service_name, section_name, graph_name)
      services = {}
      graphs.each do |graph|
        service_name, section_name = graph['service_name'], graph['section_name']
        services[service_name] ||= {}
        services[service_name][section_name] ||= true
      end
      Hash[services.map {|service_name, sections| [service_name, sections.keys] }]
    end
1285882
def members
      members = member_ids.map do |member_id|
        Member.find(member_id)
      end
      MultiAssociation.new(self, members).proxy
    end
490774
public function listAssociationsAction()
    {
        $this->checkStaticTemplateIsIncluded();
        $this->checkSettings();

        $this->slotExtendedAssignMultiple([
            self::VIEW_VARIABLE_ASSOCIATION_ID => $this->settings[self::SETTINGS_ASSOCIATION_ID],
            self::VIEW_VARIABLE_FILTER => $this->getAssociationsFilter()
        ], __CLASS__, __FUNCTION__);

        return $this->view->render();
    }
348737
public function getWithAssociation($associationIndex, $associatedId)
    {
        $oConfig = Factory::service('Config');
        $oConfig->load('blog/blog');

        $associations = $oConfig->item('blog_post_associations');

        if (!isset($associations[$associationIndex])) {
            return [];
        }

        $oDb = Factory::service('Database');
        $oDb->select('post_id');
        $oDb->where('associated_id', $associatedId);
        $posts = $oDb->get($associations[$associationIndex]->target)->result();

        $ids = [];
        foreach ($posts as $post) {
            $ids[] = $post->post_id;
        }

        if (empty($ids)) {
            //  No IDs? No posts.
            return [];
        }

        $oDb->where_in($this->tableAlias . '.id', $ids);

        return $this->getAll();
    }
158829
public function findAssociationRepertoires()
    {
        $xmlQuery = $this->metaApiService->getAssociationRepertoires();

        $repertoires = new Repertoires();

        $mapper = new \RGU\Dvoconnector\Mapper\AssociationRepertoires($xmlQuery);
        $mapper->mapToAbstractEntity($repertoires);

        return $repertoires;
    }
150639
def method_missing(method, *args)
      return self[method] if has_key?(method) # eager loaded with :include
      association_key = :"#{@_resources_key}.#{method}"
      if (polymorphic_association = find_polymorphic_association(self[:links], method))
        attributes = polymorphic_association.last
        ids, type = Array(attributes[:id]), attributes[:type]
        resolved_association_key = :"#{@_resources_key}.#{type.downcase}"
        uri_association_key = "#{association_key}.id"

        extract_resources(ids, resolved_association_key, uri_association_key, *args)
      elsif self[:links] && self[:links].has_key?(method)
        ids = Array(self[:links][method])
        extract_resources(ids, association_key, association_key, *args)
      else
        super
      end
    end
648091
def get_accounts_for_service(cls, service_type):
        
        return [
            a for a in cls.get_accounts().values()
            if a.service_type == service_type
        ]
503403
def association(name)
      association = super

      return association unless Logidze.associations_versioning

      should_apply_logidze =
        logidze_past? &&
        association.klass.respond_to?(:has_logidze?) &&
        !association.singleton_class.include?(Logidze::VersionedAssociation)

      return association unless should_apply_logidze

      association.singleton_class.prepend Logidze::VersionedAssociation

      if association.is_a? ActiveRecord::Associations::CollectionAssociation
        association.singleton_class.prepend(
          Logidze::VersionedAssociation::CollectionAssociation
        )
      end

      association
    end
1044490
public List<Affiliation> getAffiliations() throws NoResponseException, XMPPErrorException,
                    NotConnectedException, InterruptedException {
        return getAffiliations(null, null);
    }
1171669
public java.util.List<DBInstanceRole> getAssociatedRoles() {
        if (associatedRoles == null) {
            associatedRoles = new com.amazonaws.internal.SdkInternalList<DBInstanceRole>();
        }
        return associatedRoles;
    }
85798
function (model) {
            //if we have them return them;
            if (this.associationLoaded(model)) {
                var assoc = this.getAssociation(model);
                return this.isEager() ? assoc : when(assoc);
            } else if (model.isNew) {
                return null;
            } else {
                return this.fetch(model);
            }
        }
87837
def association(name) #:nodoc:
      association = association_instance_get(name)

      if association.nil?
        unless reflection = self.class._reflect_on_association(name)
          raise AssociationNotFoundError.new(self, name)
        end
        association = reflection.association_class.new(self, reflection)
        association_instance_set(name, association)
      end

      association
    end
1366131
def attributes
      fields.each_with_object(HashWithIndifferentAccess.new) do |field, acc|
        acc[field.alias] = field.value
      end
    end
1218018
def list
      hash = JSON.parse(CrateAPI::Base.call("#{CrateAPI::Base::CRATES_URL}/#{CRATE_ACTIONS[:list]}", :get))
      return Crates.from_array(hash["crates"])
    end
1264369
def associations
      {
        css:    ['css'],
        scss:   ['scss', 'sass'],
        js:     ['js'],
        ruby:   ['rb', 'Gemfile', 'lock', 'yml', 'Rakefile', 'ru', 'rdoc', 'rake', 'Capfile', 'jbuilder'],
        rails:  ['slim', 'haml', 'jbuilder', 'erb'],
        images: ['png', 'jpg', 'jpeg', 'gif'],
        static: ['pdf', 'txt', 'doc', 'docx', 'csv', 'xls', 'xlsx'],
        markup: ['html', 'xml', 'xhtml'],
        markdown: ['md', 'markdown', 'mdown'],
        php:    ['php', 'ini']
      }
    end
842604
def properties
      return [] if @definition['properties'].nil?
      @definition['properties'].each_with_object([]) do |(key, value), results|
        content = { name: key, definition: value }
        results << Openapi2ruby::Openapi::Schema::Property.new(content)
      end
    end