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

package hiro.yoshioka.ast.sql.oracle;

import hiro.yoshioka.ast.sql.AbsSQLParser;
import hiro.yoshioka.ast.sql.IQueryTableExpression;

public abstract class ASTDefaultQueryTableExpressionClause extends SimpleNode
		implements IQueryTableExpression {
	public String fSchemaString = "";

	public String fAliasString = "";

	public String fTableNameString = "";

	public boolean fShadowTable;

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

	public ASTDefaultQueryTableExpressionClause(AbsSQLParser p, int id) {
		super(p, id);
	}

	public String getUpperTable() {
		return fTableNameString.toUpperCase();
	}

	public String getUpperSchema() {
		return fSchemaString.toUpperCase();
	}

	public String getSchemaString() {
		return fSchemaString;
	}

	public String getTableNameString() {
		return fTableNameString;
	}

	public String infomation() {
		StringBuffer buf = new StringBuffer();
		if (fSchemaString.length() > 0) {
			buf.append(getUpperSchema()).append(".");
		}
		buf.append(getUpperTable());
		if (fShadowTable) {
			buf.append("[S]");
		}
		if (fAliasString.length() > 0) {
			buf.append(" AS ").append(fAliasString);
		}

		return buf.toString();
	}

}
