/* Generated By:JJTree: Do not edit this line. ASTAlterTable.java */

package hiro.yoshioka.ast.sql.oracle;

import hiro.yoshioka.ast.sql.IDDL;
import hiro.yoshioka.ast.sql.util.ASTEditorTableListHolder;
import hiro.yoshioka.sql.resource.IDBTable;

import java.util.List;

public class ASTAlterTable extends SimpleNode implements IDDL {
	public ASTEditorTableListHolder fTableHolder;

	public ASTAlterTable(int id) {
		super(id);
	}

	public ASTAlterTable(WolfSQLParser p, int id) {
		super(p, id);
	}

	/** Accept the visitor. **/
	public Object jjtAccept(WolfSQLParserVisitor visitor, Object data) {
		return visitor.visit(this, data);
	}

	public boolean isDML() {
		return false;
	}

	/**
	 * @return
	 */
	public String infomatin() {
		return null;
	}

	public boolean isDDL() {
		return true;
	}

	public boolean isDOL() {
		return false;
	}

	private void test() {
		if (fTableHolder == null) {
			fTableHolder = new ASTEditorTableListHolder();
		}
	}

	@Override
	public void addTable(IDBTable table) {
		test();
		fTableHolder.addTable(table);
	}

	@Override
	public void addTableList(List list) {
		test();
		fTableHolder.addTableList(list);
	}

	@Override
	public boolean emptyTableList() {
		return fTableHolder == null || fTableHolder.size() == 0;
	}

	@Override
	public ASTEditorTableListHolder getEditorTableListHolder() {
		return fTableHolder;
	}

}
