code: private StringBuilder createSelectQuery(Object rowId, EntityMetadata metadata, String tableName) {
          MetamodelImpl metaModel =
              (MetamodelImpl) kunderaMetadata.getApplicationMetadata().getMetamodel(metadata.getPersistenceUnit());
  
          CQLTranslator translator = new CQLTranslator();
  
          String select_Query = translator.SELECTALL_QUERY;
          select_Query = StringUtils.replace(select_Query, CQLTranslator.COLUMN_FAMILY,
              translator.ensureCase(new StringBuilder(), tableName, false).toString());
          StringBuilder builder = new StringBuilder(select_Query);
  
          builder.append(CQLTranslator.ADD_WHERE_CLAUSE);
          onWhereClause(metadata, rowId, translator, builder, metaModel, metadata.getIdAttribute());
          builder.delete(builder.lastIndexOf(CQLTranslator.AND_CLAUSE), builder.length());
  
          return builder;
      }
docs: Creates the select query.
  
  @param rowId
  the row id
  @param metadata
  the metadata
  @param tableName
  the table name
  @return the string builder