code: protected String onDeleteQuery(EntityMetadata metadata, String tableName, MetamodelImpl metaModel,
          Object keyObject) {
          CQLTranslator translator = new CQLTranslator();
          String deleteQuery = CQLTranslator.DELETE_QUERY;
  
          deleteQuery = StringUtils.replace(deleteQuery, CQLTranslator.COLUMN_FAMILY,
              translator.ensureCase(new StringBuilder(), tableName, false).toString());
  
          StringBuilder deleteQueryBuilder = new StringBuilder(deleteQuery);
  
          deleteQueryBuilder.append(CQLTranslator.ADD_WHERE_CLAUSE);
          onWhereClause(metadata, keyObject, translator, deleteQueryBuilder, metaModel, metadata.getIdAttribute());
  
          // strip last "AND" clause.
          deleteQueryBuilder.delete(deleteQueryBuilder.lastIndexOf(CQLTranslator.AND_CLAUSE),
              deleteQueryBuilder.length());
  
          if (log.isDebugEnabled()) {
              log.debug("Returning delete query {}.", deleteQueryBuilder.toString());
          }
          return deleteQueryBuilder.toString();
      }
docs: On delete query.
  
  @param metadata
  the metadata
  @param tableName
  TODO
  @param metaModel
  the meta model
  @param keyObject
  the compound key object
  @return the string