Returns the identifier class for an aggregate root class.
332876
@SuppressWarnings("unchecked")
    public static <A extends AggregateRoot<I>, I> Class<I> resolveAggregateIdClass(Class<A> aggregateRootClass) {
        checkNotNull(aggregateRootClass, "aggregateRootClass should not be null");
        return (Class<I>) resolveGenerics(AggregateRoot.class, aggregateRootClass)[0];
    }
915399
def identifier(self):
        
        if self.primary_key not in self._data:
            return 'Unknown'
        return str(self._data[self.primary_key])
803898
@SuppressWarnings("unchecked")
	@Override
	public Class<ID> getIdType() {
		Field idField = MetadataParser.getIdField(getJavaType());
		return (Class<ID>) idField.getType();
	}
1241347
private String getInstanceClass(
		final Tuple resultset,
		final int i,
		final Loadable persister,
		final Serializable id,
		final SharedSessionContractImplementor session)
	throws HibernateException {
		String discriminatorColumnName = persister.getDiscriminatorColumnName();
		if ( discriminatorColumnName == null ) {
			return persister.getEntityName();
		}
		else {
			Object value = resultset.get( discriminatorColumnName );
			return persister.getSubclassForDiscriminatorValue( value );
		}
	}
838738
def get_identifiers(sysmeta_pyxb):
    
    pid = d1_common.xml.get_opt_val(sysmeta_pyxb, 'identifier')
    sid = d1_common.xml.get_opt_val(sysmeta_pyxb, 'seriesId')
    obsoletes_pid = d1_common.xml.get_opt_val(sysmeta_pyxb, 'obsoletes')
    obsoleted_by_pid = d1_common.xml.get_opt_val(sysmeta_pyxb, 'obsoletedBy')
    return pid, sid, obsoletes_pid, obsoleted_by_pid
79481
private static Class<?> getIdClass(Class<?> entityClass) {
        Type[] genTypes = entityClass.getGenericInterfaces();

        for (int i = 0; i < genTypes.length; i++) {
            Type genType = genTypes[i];
            String s1 = genType.getClass().getName();
            String s2 = BaseEntity.class.getName();
            if (s1.startsWith(s2)) {
                Type[] params = ((ParameterizedType) genType).getActualTypeArguments();
                // ID真实的class
                Class<?> mapperClass = (Class<?>) params[0];
                return mapperClass;
            }
        }

        return null;
    }
359276
def _dep_id(self, dependency):
    """"""
    params = dict(sep=self.separator)

    if isinstance(dependency, JarDependency):
      # TODO(kwilson): handle 'classifier' and 'type'.
      params.update(org=dependency.org, name=dependency.name, rev=dependency.rev)
      is_internal_dep = False
    else:
      params.update(org='internal', name=dependency.id)
      is_internal_dep = True

    return ('{org}{sep}{name}{sep}{rev}' if params.get('rev') else
            '{org}{sep}{name}').format(**params), is_internal_dep
796081
private function getChildDiscriminatorsFromClassMetadata(ClassMetadata $rootClass, AST\InstanceOfExpression $instanceOfExpr) : string
    {
        $sqlParameterList = [];
        $discriminators   = [];

        foreach ($instanceOfExpr->value as $parameter) {
            if ($parameter instanceof AST\InputParameter) {
                $this->rsm->discriminatorParameters[$parameter->name] = $parameter->name;

                $sqlParameterList[] = $this->walkInputParameter($parameter);

                continue;
            }

            // Get name from ClassMetadata to resolve aliases.
            $entityClass     = $this->em->getClassMetadata($parameter);
            $entityClassName = $entityClass->getClassName();

            if ($entityClassName !== $rootClass->getClassName()) {
                if (! $entityClass->getReflectionClass()->isSubclassOf($rootClass->getClassName())) {
                    throw QueryException::instanceOfUnrelatedClass($entityClassName, $rootClass->getClassName());
                }
            }

            $discriminators += HierarchyDiscriminatorResolver::resolveDiscriminatorsForClass($entityClass, $this->em);
        }

        foreach (array_keys($discriminators) as $discriminator) {
            $sqlParameterList[] = $this->conn->quote($discriminator);
        }

        return '(' . implode(', ', $sqlParameterList) . ')';
    }
1224274
@Override
    public <Y> SingularAttribute<? super X, Y> getId(Class<Y> paramClass)
    {
        if (idAttribute != null)
        {
            if (idAttribute.getJavaType().equals(paramClass) && !isIdClass)
            {
                return (SingularAttribute<? super X, Y>) idAttribute;
            }
            else
            {
                onError();
            }
        }
        else
        {

            AbstractIdentifiableType<? super X> superType = (AbstractIdentifiableType<? super X>) getSupertype();
            if (superType != null)
            {
                return superType.getId(paramClass);
            }
        }

        onError();

        return null;

    }
306939
def get_member_class(resource):
    
    reg = get_current_registry()
    if IInterface in provided_by(resource):
        member_class = reg.getUtility(resource, name='member-class')
    else:
        member_class = reg.getAdapter(resource, IMemberResource,
                                      name='member-class')
    return member_class
453377
def FindClassIdInMoMetaIgnoreCase(classId):
		
		if not classId:
			return None
		if classId in _ManagedObjectMeta:
			return classId
		lClassId = classId.lower()
		for key in _ManagedObjectMeta.keys():
			if (key.lower() == lClassId):
				return key
		return None
1125183
def getPyClass(self):
        '''
        '''
        # --> EXTENDED
        if self.hasExtPyClass():
            classInfo = self.extPyClasses[self.name]
            return ".".join(classInfo)
        # <-- 
        
        return 'Holder'
657767
def get_from_ident(self, ident):
        
        model_repr, job_pk = ident.split(':', 1)
        klass = import_class(model_repr)
        return klass.get(job_pk)
1171504
def get_class_by_id(self, ac_id: int) -> AssetClass:
        
        assert isinstance(ac_id, int)

        # iterate recursively
        for ac in self.asset_classes:
            if ac.id == ac_id:
                return ac
        # if nothing returned so far.
        return None
614781
def get_ancestors(self):
        
        if self.is_root():
            return get_result_class(self.__class__).objects.none()
        return get_result_class(self.__class__).objects.filter(
            tree_id=self.tree_id,
            lft__lt=self.lft,
            rgt__gt=self.rgt)
1160781
function classIDbyIdentifier( $params )
    {
        $classID = false;

        $contentClass = $this->classByIdentifier( $params );

        if( is_object( $contentClass ) )
        {
            $classID = $contentClass->attribute( 'id' );
        }

        return $classID;
    }
778346
def retrieve(self, identifier, *criterion):
        
        return self._retrieve(
            self.model_class.id == identifier,
            *criterion
        )