public void setComplexTable(ComplexTable complexTable) {
    this.complexTable = complexTable;

    Table mainTable = complexTable.getMainTable();
    mainTableDeletor = new TableDeletorImpl();
    mainTableDeletor.setTable(mainTable);

    Table[] singleValueTables = complexTable.getSingleValueTables();
    singleValueTableDeletors = getSingleValueTableDeletors(singleValueTables);

    Table[] multiValueTables = complexTable.getMultiValueTables();
    multiValueTableDeletors = getMultiValueTableDeletors(multiValueTables, complexTable);
  }
  /**
   * @param idColumns
   * @param multiValueTables
   * @return
   */
  private TableDeletorImpl[] getMultiValueTableDeletors(Table[] tables, ComplexTable complexTable) {
    TableDeletorImpl[] impls = null;
    if (tables != null) {
      impls = new TableDeletorImpl[tables.length];
      for (int i = 0; i < tables.length; i++) {
        TableDeletorImpl impl = new TableDeletorImpl();
        Table multiValueTable = tables[i];
        Table newTable = new Table();
        newTable.setId(multiValueTable.getId());
        newTable.setName(multiValueTable.getName());
        newTable.setIdColumnNames(complexTable.getMainTable().getIdColumnNames());
        newTable.setIdColumns(complexTable.getMainTable().getIdColumns());

        impl.setTable(newTable);
        impls[i] = impl;
      }
    }

    return impls;
  }