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

package hiro.yoshioka.ast.sql.oracle;

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

import java.util.List;

public class ASTComment extends SimpleNode implements IDOL {
	public ASTEditorTableListHolder fTableHolder;

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

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

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

	public boolean isDML() {
		return false;
	}

	public String infomatin() {
		return null;
	}

	public boolean isDDL() {
		return false;
	}

	public boolean isDOL() {
		return true;
	}

	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;
	}
}
