code: private Object populateCompositeId(EntityMetadata m, Object entity, String thriftColumnName,
              Object thriftColumnValue, MetamodelImpl metaModel, Attribute attribute, Class entityClazz)
              throws InstantiationException, IllegalAccessException
      {
          Class javaType = ((AbstractAttribute) attribute).getBindableJavaType();
  
          if (metaModel.isEmbeddable(javaType))
          {
              EmbeddableType compoundKey = metaModel.embeddable(javaType);
              Object compoundKeyObject = null;
              try
              {
                  Set<Attribute> attributes = compoundKey.getAttributes();
                  entity = KunderaCoreUtils.initialize(entityClazz, entity);
  
                  for (Attribute compoundAttribute : attributes)
                  {
                      compoundKeyObject = compoundKeyObject == null ? getCompoundKey(attribute, entity)
                              : compoundKeyObject;
  
                      if (metaModel.isEmbeddable(((AbstractAttribute) compoundAttribute).getBindableJavaType()))
                      {
                          Object compoundObject = populateCompositeId(m, compoundKeyObject, thriftColumnName,
                                  thriftColumnValue, metaModel, compoundAttribute, javaType);
                          PropertyAccessorHelper.set(entity, (Field) attribute.getJavaMember(), compoundObject);
                      }
                      else if (((AbstractAttribute) compoundAttribute).getJPAColumnName().equals(thriftColumnName))
                      {
                          setFieldValueViaCQL(compoundKeyObject, thriftColumnValue, compoundAttribute);
                          PropertyAccessorHelper.set(entity, (Field) attribute.getJavaMember(), compoundKeyObject);
                          break;
                      }
                  }
              }
              catch (IllegalArgumentException iaex)
              {
                  // ignore as it might not represented within entity.
                  // No need for any logger message
              }
              catch (Exception e)
              {
                  log.error("Error while retrieving data, Caused by: .", e);
                  throw new PersistenceException(e);
              }
          }
          return entity;
      }
docs: Populate composite id.
  
  @param m
  the m
  @param entity
  the entity
  @param thriftColumnName
  the thrift column name
  @param thriftColumnValue
  the thrift column value
  @param metaModel
  the meta model
  @param attribute
  the attribute
  @param entityClazz
  the entity clazz
  @return the object
  @throws InstantiationException
  the instantiation exception
  @throws IllegalAccessException
  the illegal access exception