code: private void appendPrimaryKey(CQLTranslator translator, EmbeddableType compoEmbeddableType, Field[] fields,
              StringBuilder queryBuilder)
      {
          for (Field f : fields)
          {
              if (!ReflectUtils.isTransientOrStatic(f))
              {
                  if (f.getType().isAnnotationPresent(Embeddable.class))
                  { // compound partition key
                      MetamodelImpl metaModel = (MetamodelImpl) kunderaMetadata.getApplicationMetadata().getMetamodel(
                              puMetadata.getPersistenceUnitName());
                      queryBuilder.append(translator.OPEN_BRACKET);
                      queryBuilder.append(translator.SPACE_STRING);
                      appendPrimaryKey(translator, (EmbeddableType) metaModel.embeddable(f.getType()), f.getType()
                              .getDeclaredFields(), queryBuilder);
                      queryBuilder.deleteCharAt(queryBuilder.length() - 1);
                      queryBuilder.append(translator.CLOSE_BRACKET);
                      queryBuilder.append(Constants.SPACE_COMMA);
  
                  }
                  else
                  {
                      Attribute attribute = compoEmbeddableType.getAttribute(f.getName());
                      translator.appendColumnName(queryBuilder, ((AbstractAttribute) attribute).getJPAColumnName());
                      queryBuilder.append(Constants.SPACE_COMMA);
                  }
              }
          }
      }
docs: Append primary key.
  
  @param translator
  the translator
  @param compoEmbeddableType
  the compo embeddable type
  @param fields
  the fields
  @param queryBuilder
  the query builder