code: void parse(QEntityFactory entityFactory, EntityType<?> metadata, SessionFactoryImplementor sessionFactory)
  	{
  		this.metamodelEntity = metadata;
  		this.name = metadata.getName();
  
  		for (Attribute<?, ?> attribute : metadata.getAttributes())
  		{
  			parseFields(entityFactory, sessionFactory, null, attribute);
  		}
  
  		// Parse top-level properties
  
  		// Add identifier property
  		{
  			if (!metadata.hasSingleIdAttribute())
  				throw new IllegalArgumentException("@IdClass Entity not supported! " + metadata.getJavaType());
  
  			Type idType = metadata.getIdType();
  
  			switch (idType.getPersistenceType())
  			{
  				case BASIC:
  					break; // No action necessary, will be processed like a normal field
  				case EMBEDDABLE:
  				{
  					EmbeddableType<?> emb = (EmbeddableType<?>) idType;
  
  					parseEmbeddable(entityFactory, sessionFactory, "id", emb);
  					break;
  				}
  				default:
  					throw new IllegalArgumentException("Cannot handle id type: " + idType.getPersistenceType() + ": " + idType);
  			}
  		}
  
  		// Add links to descendants
  		{
  			final List<QEntity> descendants = entityFactory.getSubclasses(clazz);
  
  			if (!descendants.isEmpty())
  				this.descendants = descendants;
  		}
  
  
  		// Figure out the id method/field
  		final String idPropertyName = getIdPropertyName();
  
  		if (idPropertyName != null)
  			this.idProperty = new PropertyWrapper(clazz, idPropertyName);
  	}
docs: Parse an @Entity
  
  @param entityFactory
  @param metadata
  @param sessionFactory