code: private void onValidateTable(KsDef ksDef, TableInfo tableInfo) throws Exception
      {
          boolean tablefound = false;
          for (CfDef cfDef : ksDef.getCf_defs())
          {
              if (cfDef.getName().equals(tableInfo.getTableName())/*
                                                                   * && (cfDef.
                                                                   * getColumn_type
                                                                   * ().equals(
                                                                   * ColumnFamilyType
                                                                   * .
                                                                   * getInstanceOf
                                                                   * (
                                                                   * tableInfo.getType
                                                                   * ()).name()))
                                                                   */)
              {
                  if (cfDef.getColumn_type().equals(ColumnFamilyType.Standard.name()))
                  {
                      for (ColumnInfo columnInfo : tableInfo.getColumnMetadatas())
                      {
                          onValidateColumn(tableInfo, cfDef, columnInfo);
                      }
                      tablefound = true;
                      break;
                  }
                  else if (cfDef.getColumn_type().equals(ColumnFamilyType.Super.name()))
                  {
                      tablefound = true;
                  }
              }
          }
          if (!tablefound)
          {
              throw new SchemaGenerationException("Column family " + tableInfo.getTableName()
                      + " does not exist in keyspace " + databaseName + "", "Cassandra", databaseName,
                      tableInfo.getTableName());
          }
      }
docs: On validate table.
  
  @param ksDef
  the ks def
  @param tableInfo
  the table info
  @throws Exception
  the exception