/*
 * blanco Framework
 * Copyright (C) 2004-2005 IGA Tosiki
 * 
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 */
package blanco.db.conf;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

/**
 * @author Yasuo Nakanishi
 */
public class TableDotNet {
    /**
     * テーブル名を記憶します。
     */
    private String _name = "";

    /**
     * キーのフィールド一覧を記憶します。
     */
    private final List _keyFieldList = new ArrayList();

    public TableDotNet(final String name) {
        _name = name;
    }

    public String getName() {
        return _name;
    }

    public void setName(final String name) {
        _name = name;
    }

    public void addKeyField(final String name) {
        _keyFieldList.add(name);
    }

    public boolean hasKeyField() {
        return _keyFieldList.size() != 0;
    }

    public Iterator getKeyFieldItrator() {
        return _keyFieldList.iterator();
    }
}