Gets the class metadata from a given join alias.

@deprecated
174337
public static function getClassMetadataFromJoinAlias(string $alias, QueryBuilder $queryBuilder, ManagerRegistry $managerRegistry): ClassMetadata
    {
        @trigger_error(sprintf('The use of "%s::getClassMetadataFromJoinAlias()" is deprecated since 2.4 and will be removed in 3.0. Use "%s::getEntityClassByAlias()" instead.', __CLASS__, QueryBuilderHelper::class), E_USER_DEPRECATED);

        $entityClass = QueryBuilderHelper::getEntityClassByAlias($alias, $queryBuilder, $managerRegistry);

        return $managerRegistry
            ->getManagerForClass($entityClass)
            ->getClassMetadata($entityClass);
    }
104790
public static function findByMetadataQueryBuilder(
        QueryBuilder $qb,
        $join,
        array $metadata,
        $alias = 'metadata',
        $operator = 'eq',
        $whereOperator = 'and'
    ) {
        $qb->join($join, $alias);

        foreach ($metadata as $key => $data) {
            $andX = $qb->expr()->andX();

            foreach ($data as $field => $value) {
                $itemOperator = $operator;

                if (is_array($value)) {
                    $value = $value['value'];
                    $itemOperator = $value['operator'];
                }

                $parameterName = sprintf('%s_%s_%s', $alias, $field, $key);
                $andX->add(call_user_func_array(
                    array($qb->expr(), $itemOperator),
                    array(
                        sprintf('%s.%s', $alias, $field),
                        sprintf(':%s', $parameterName),
                    )
                ));

                $qb->setParameter($parameterName, $value);
            }

            call_user_func_array(array($qb, sprintf('%sWhere', $whereOperator)), array($andX));
        }

        return $qb;
    }
454952
private function convertJoinColumnAnnotationToJoinColumnMetadata(
        ReflectionProperty $reflectionProperty,
        Annotation\JoinColumn $joinColumnAnnot,
        Mapping\ClassMetadata $classMetadata
    ) {
        $fieldName            = $reflectionProperty->getName();
        $joinColumn           = new Mapping\JoinColumnMetadata();
        $columnName           = empty($joinColumnAnnot->name)
            ? $this->namingStrategy->propertyToColumnName($fieldName, $classMetadata->getClassName())
            : $joinColumnAnnot->name;
        $referencedColumnName = empty($joinColumnAnnot->referencedColumnName)
            ? $this->namingStrategy->referenceColumnName()
            : $joinColumnAnnot->referencedColumnName;

        $joinColumn->setColumnName($columnName);
        $joinColumn->setReferencedColumnName($referencedColumnName);
        $joinColumn->setNullable($joinColumnAnnot->nullable);
        $joinColumn->setUnique($joinColumnAnnot->unique);

        if (! empty($joinColumnAnnot->fieldName)) {
            $joinColumn->setAliasedName($joinColumnAnnot->fieldName);
        }

        if (! empty($joinColumnAnnot->columnDefinition)) {
            $joinColumn->setColumnDefinition($joinColumnAnnot->columnDefinition);
        }

        if ($joinColumnAnnot->onDelete) {
            $joinColumn->setOnDelete(strtoupper($joinColumnAnnot->onDelete));
        }

        return $joinColumn;
    }
597352
@Override
    public ManagedConnectionMetaData getMetaData() throws ResourceException {
        try {
            return new JcrManagedConnectionMetaData(mcf.getRepository(), session);
        } catch (Exception e) {
            throw new ResourceException(e);
        }
    }
398903
def _get_index_class_name(self, index_cls):
        
        cls_name = index_cls.__name__
        aliases = self.Meta.index_aliases
        return aliases.get(cls_name, cls_name.split('.')[-1])
259499
private void buildJoinTreeForColumn(String aColName, boolean useOuterJoin, UserAlias aUserAlias, Map pathClasses)
	{
		String pathName = SqlHelper.cleanPath(aColName);
		int sepPos = pathName.lastIndexOf(".");

		if (sepPos >= 0)
		{
			getTableAlias(pathName.substring(0, sepPos), useOuterJoin, aUserAlias,
						  new String[]{pathName.substring(sepPos + 1)}, pathClasses);
		}
	}
915085
def class_reference_from_action_alias(method_sym)
      alias_found = find_alias(method_sym.to_s)
      return nil unless alias_found

      class_reference_from_action_name(alias_found.to_sym)
    end
957344
public function join_alias() {
        $this->joins[] = sprintf('LEFT JOIN {glossary_alias} %s ON %s = %s',
            self::ALIAS_ALIAS, self::resolve_field('id', 'entries'), self::resolve_field('entryid', 'alias'));
    }
681047
private function getClassMetadata()
    {
        if (null !== $this->metadata) {
            return $this->metadata;
        }

        return $this->metadata = $this->manager->getClassMetadata($this->getSource()->getClass());
    }
1032922
public function selectFields($fields, $tableAlias, &$join)
    {
        //
        if (!$fields) {
            return '*';
        } elseif (is_string($fields)) {
            return $fields;
        } elseif (!is_array($fields)) {
            static::error('selectFields require array');
        }

        //
        $join = '';

        //
        $aliasTable = [];

        //
        $selectFields = [];

        //
        foreach ($fields as $field => $definition) {
            if (is_numeric($field)) {
                $field = $definition;
                $definition = null;
            }

            //
            if (!$definition) {
                $selectFields[] = $this->selectFieldsSingletoneField(
                    $field,
                    $tableAlias
                );
                continue;
            }

            //
            if (is_string($definition)) {
                $selectFields[] = $definition.' AS '.$field;
                continue;
            }

            //
            if (is_array($definition)) {
                $class = $definition['Class'];

                //
                $aliasTable[$class] = isset($aliasTable[$class])
                                    ? $aliasTable[$class] + 1
                                    : 1;

                //
                $joinAlias = $aliasTable[$class] > 1
                           ? $class.''.$aliasTable[$class]
                           : $class;

                //
                $joinTable = $definition['Table'];

                //
                $joinKey = $joinAlias.'.'.$definition['JoinKey'];

                //
                $fieldFrom = $definition['FieldFrom'];

                if ($fieldFrom == '__FIELD__') {
                    $fieldFrom = $field;
                }

                //
                $join .= " LEFT JOIN {$joinTable} AS {$joinAlias}"
                       ." ON {$joinKey} = {$fieldFrom}";

                if (is_array($definition['FieldTo'])) {
                    foreach ($definition['FieldTo'] as $nextFieldTo) {
                        $fieldAlias = $field.'__'.$nextFieldTo;
                        $fieldTo = $joinAlias.'.'.$nextFieldTo;
                        $selectFields[] = $fieldTo.' AS '.$fieldAlias;
                    }
                }

                continue;
            }
        }

        return implode(', ', $selectFields);
    }
637513
@Override
    final public ManagedConnectionMetaData getMetaData()
                    throws ResourceException {

        if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
            SibTr.entry(this, TRACE, "getMetaData");
        }

        if (_metaData == null) {
            _metaData = new JmsJcaManagedConnectionMetaData();
        }

        if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
            SibTr.exit(this, TRACE, "getMetaData", _metaData);
        }
        return _metaData;

    }
1347415
protected void buildSuperJoinTree(TableAlias left, ClassDescriptor cld, String name, boolean useOuterJoin)
    {
        ClassDescriptor superCld = cld.getSuperClassDescriptor();
        if (superCld != null)
        {
            SuperReferenceDescriptor superRef = cld.getSuperReference();
            FieldDescriptor[] leftFields = superRef.getForeignKeyFieldDescriptors(cld);
            TableAlias base_alias = getTableAliasForPath(name, null, null);
            String aliasName = String.valueOf(getAliasChar()) + m_aliasCount++;
            TableAlias right = new TableAlias(superCld, aliasName, useOuterJoin, null);

            Join join1to1 = new Join(left, leftFields, right, superCld.getPkFields(), useOuterJoin, "superClass");
            base_alias.addJoin(join1to1);

            buildSuperJoinTree(right, superCld, name, useOuterJoin);
        }
    }
1170362
@Override
    public ColumnMetadata getColumnMetadata(ConnectorSession session, ConnectorTableHandle tableHandle, ColumnHandle columnHandle)
    {
        return ((HiveColumnHandle) columnHandle).getColumnMetadata(typeManager);
    }
1240292
private MapperMeta getMapperMeta(Configuration conf, final String statementId) throws ClassNotFoundException {
    MapperMeta meta = CACHED.get(statementId);
    if (meta == null) {
      int pos = statementId.lastIndexOf('.');
      String namespace = statementId.substring(0, pos);// mapper类名
      String methodName = statementId.substring(pos + 1);

      Class<?> mapperClass;
      mapperClass = Class.forName(namespace);
      synchronized (this) {
        meta = CACHED.get(statementId);
        if (meta == null) {
          meta = buildMapperMeta(conf, namespace, methodName, mapperClass);
          CACHED.put(statementId, meta);
        }
      }
    }
    return meta;
  }
1331653
def get_metadata(bind):
    """"""
    if bind == '':
        bind = None
    m = MetaData()
    for t in target_metadata.tables.values():
        if t.info.get('bind_key') == bind:
            t.tometadata(m)
    return m
1140615
protected List<String> getEdges(String join) {
        List<String> results = new ArrayList<>();
        for (Many2ManyAssociation a : many2ManyAssociations) {
            if (a.getJoin().equalsIgnoreCase(join)) {
                results.add(getMetaModel(a.getSourceClass()).getTableName());
                results.add(getMetaModel(a.getTargetClass()).getTableName());
            }
        }
        return results;
    }
1286030
def get_class_alias(klass_or_alias):
    
    if isinstance(klass_or_alias, python.str_types):
        try:
            return CLASS_CACHE[klass_or_alias]
        except KeyError:
            return load_class(klass_or_alias)

    try:
        return CLASS_CACHE[klass_or_alias]
    except KeyError:
        raise UnknownClassAlias('Unknown alias for %r' % (klass_or_alias,))