当前位置: 首页>>代码示例>>Java>>正文


Java Visitable.getClass方法代码示例

本文整理汇总了Java中com.akiban.sql.parser.Visitable.getClass方法的典型用法代码示例。如果您正苦于以下问题:Java Visitable.getClass方法的具体用法?Java Visitable.getClass怎么用?Java Visitable.getClass使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.akiban.sql.parser.Visitable的用法示例。


在下文中一共展示了Visitable.getClass方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: visit

import com.akiban.sql.parser.Visitable; //导入方法依赖的package包/类
@Override
public Visitable visit(Visitable node) throws StandardException {

	switch (((QueryTreeNode) node).getNodeType()) {
	case NodeTypes.JAVA_TO_SQL_VALUE_NODE:
		visit((JavaToSQLValueNode) node);
		break;
	case NodeTypes.RESULT_COLUMN:
		break;
	case NodeTypes.AGGREGATE_NODE:
		visit((AggregateNode) node);
		break;
	case NodeTypes.COLUMN_REFERENCE:
		ColumnStructure tmp = new ColumnStructure(
				((ColumnReference) node).getColumnName(), null);
		tableName = ((ColumnReference) node).getTableName();
		setOperand(tmp);
		break;
	default:

		if (node instanceof BinaryOperatorNode) {
			visit((BinaryOperatorNode) node);
		} else if (node instanceof ConstantNode) {
			visit((ConstantNode) node);
		} else if (node instanceof SQLToJavaValueNode) {

		} else
			throw new StandardException("Unbekannter Parameter: \n "
					+ node.getClass() + "\n" + node.toString());

		break;

	}

	return node;

}
 
开发者ID:UniversityOfWuerzburg-ChairCompSciVI,项目名称:ueps,代码行数:38,代码来源:UpdateColumnVisitor.java

示例2: visit

import com.akiban.sql.parser.Visitable; //导入方法依赖的package包/类
/**
 * Main visit function, delegates entries to the according sub visit
 * function.
 * 
 * @param node
 * @throws StandardException
 * @see com.akiban.sql.parser.Visitor#visit(com.akiban.sql.parser.Visitable)
 */
@Override
public Visitable visit(Visitable node) throws StandardException {

	switch (((QueryTreeNode) node).getNodeType()) {
	case NodeTypes.FROM_LIST:
		break;
	case NodeTypes.FROM_BASE_TABLE:
		tables.add(new TableStructure(((FromTable) node).getOrigTableName().getTableName()));
		break;
	case NodeTypes.FULL_OUTER_JOIN_NODE:
	case NodeTypes.HALF_OUTER_JOIN_NODE:
	case NodeTypes.JOIN_NODE:
		visit((JoinNode) node);
		break;
	default:

		if (node instanceof BinaryOperatorNode) {

		} else if (node instanceof ConstantNode) {

		} else if (node instanceof ColumnReference) {

		} else {
			throw new StandardException("Unbekannter Parameter: \n "
					+ node.getClass() + "\n" + node.toString());
		}

		break;

	}

	return node;

}
 
开发者ID:UniversityOfWuerzburg-ChairCompSciVI,项目名称:ueps,代码行数:43,代码来源:FromListVisitor.java

示例3: visit

import com.akiban.sql.parser.Visitable; //导入方法依赖的package包/类
@Override
public Visitable visit(Visitable node) throws StandardException {

	switch (((QueryTreeNode) node).getNodeType()) {
	case NodeTypes.JAVA_TO_SQL_VALUE_NODE:
		break;
	case NodeTypes.STATIC_METHOD_CALL_NODE:

		for (JavaValueNode nodeChild : ((StaticMethodCallNode) node)
				.getMethodParameters()) {

			WhereClauseVisitor wvisitor = new WhereClauseVisitor();
			nodeChild.accept(wvisitor);

			Structure tmp = wvisitor.getConditionTree();
			operands.add(tmp);

		}

		operator = ((StaticMethodCallNode) node).getMethodName();

		if (operator.equals("COUNT(*)")) {
			operands.add(new Structure("*"));
			conditionTree = (new PrefixOperatorStructure("COUNT", operands));
		} else {
			conditionTree = (new PrefixOperatorStructure(operator, operands));
		}

		break;

	default:
		throw new StandardException("Unbekannter Parameter: \n "
				+ node.getClass() + "\n" + node.toString());
	}

	return node;

}
 
开发者ID:UniversityOfWuerzburg-ChairCompSciVI,项目名称:ueps,代码行数:39,代码来源:StaticMethodCallNodeVisitor.java

示例4: visit

import com.akiban.sql.parser.Visitable; //导入方法依赖的package包/类
/**
 * Main visit function, gets join type and delegates join tables and join
 * clause to the according sub visit function.
 * 
 * @param node
 * @throws StandardException
 * @see com.akiban.sql.parser.Visitor#visit(com.akiban.sql.parser.Visitable)
 */
@Override
public Visitable visit(Visitable node) throws StandardException {

	switch (((QueryTreeNode) node).getNodeType()) {
	case NodeTypes.JOIN_NODE:
		joinType = "JOIN";
		visit((JoinNode) node);
		break;
	case NodeTypes.FULL_OUTER_JOIN_NODE:
		joinType = "FULL_OUTER_JOIN";
		visit((JoinNode) node);
		break;
	case NodeTypes.HALF_OUTER_JOIN_NODE:
		joinType = "HALF_OUTER_JOIN";
		visit((JoinNode) node);
		break;
	case NodeTypes.FROM_BASE_TABLE:		
		setTable(new TableStructure(((FromTable) node).getOrigTableName().getTableName()));
		break;
	default:

		if (node instanceof BinaryOperatorNode)
			visit((BinaryOperatorNode) node);
		else
			throw new StandardException("Unbekannter Parameter: \n "
					+ node.getClass() + "\n" + node.toString());

		break;

	}

	return node;

}
 
开发者ID:UniversityOfWuerzburg-ChairCompSciVI,项目名称:ueps,代码行数:43,代码来源:JoinNodeVisitor.java

示例5: visit

import com.akiban.sql.parser.Visitable; //导入方法依赖的package包/类
/**
 * Main visit function, delegates columns to an according sub visit
 * function.
 * 
 * @param node
 * @throws StandardException
 * @see com.akiban.sql.parser.Visitor#visit(com.akiban.sql.parser.Visitable)
 */
@Override
public Visitable visit(Visitable node) throws StandardException {

	switch (((QueryTreeNode) node).getNodeType()) {
	case NodeTypes.RESULT_COLUMN_LIST:
		break;
	case NodeTypes.RESULT_COLUMN:
		visit((ResultColumn) node);
		break;
	case NodeTypes.ALL_RESULT_COLUMN:
		visit((AllResultColumn) node);
		break;
	case NodeTypes.AGGREGATE_NODE:
		visit((AggregateNode) node);
		break;
	case NodeTypes.COLUMN_REFERENCE:
		visit((ColumnReference) node);
		break;
	case NodeTypes.JAVA_TO_SQL_VALUE_NODE:
		break;
	case NodeTypes.SQL_TO_JAVA_VALUE_NODE:
		break;
	case NodeTypes.STATIC_METHOD_CALL_NODE:
		visit((StaticMethodCallNode) node);
		break;
	default:

		if (node instanceof BinaryOperatorNode) {
			visit((BinaryOperatorNode) node);
		} else if (node instanceof ConstantNode) {

			isPuffering = true;
			extendCol(((ConstantNode) node).getValue().toString());

		} else
			throw new StandardException("Unbekannter Parameter: \n "
					+ node.getClass() + "\n" + node.toString());

	}

	return node;

}
 
开发者ID:UniversityOfWuerzburg-ChairCompSciVI,项目名称:ueps,代码行数:52,代码来源:ResultColumnListVisitor.java

示例6: visit

import com.akiban.sql.parser.Visitable; //导入方法依赖的package包/类
/**
 * Main visit function, gets operator and delegates operands to the
 * according sub visit function.
 * 
 * @param node
 * @throws StandardException
 * @see com.akiban.sql.parser.Visitor#visit(com.akiban.sql.parser.Visitable)
 */
@Override
public Visitable visit(Visitable node) throws StandardException {

	switch (((QueryTreeNode) node).getNodeType()) {
	case NodeTypes.AGGREGATE_NODE:

		if (operator == null) {
			operator = ((AggregateNode) node).getAggregateName();
		} else {
			visit((AggregateNode) node);
			stopChilds = true;
		}

		if (operator.equals("COUNT(*)")) { // count needs special treatment
			operands.add(new Structure("*"));
			conditionTree = (new PrefixOperatorStructure("COUNT", operands));
		}

		break;

	case NodeTypes.COLUMN_REFERENCE:

		ColumnStructure tmp5 = new ColumnStructure(
				((ColumnReference) node).getColumnName(),
				((ColumnReference) node).getTableName());

		setOperand(tmp5);

		break;

	default:

		if (node instanceof BinaryOperatorNode) {
			visit((BinaryOperatorNode) node);
		} else if (node instanceof ConstantNode) {

			Structure tmp2 = new Structure(((ConstantNode) node).getValue()
					.toString());
			setOperand(tmp2);

		} else if (node instanceof StaticMethodCallNode) {

			StaticMethodCallNodeVisitor tvisitor = new StaticMethodCallNodeVisitor();
			node.accept(tvisitor);
			PrefixOperatorStructure tmp4 = tvisitor.getConditionTree();
			setOperand(tmp4);

		} else if (node instanceof SQLToJavaValueNode) {

		} else {
			throw new StandardException("Unbekannter Parameter: \n "
					+ node.getClass() + "\n" + node.toString());
		}

		break;

	}

	return node;

}
 
开发者ID:UniversityOfWuerzburg-ChairCompSciVI,项目名称:ueps,代码行数:70,代码来源:AggregateNodeVisitor.java


注:本文中的com.akiban.sql.parser.Visitable.getClass方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。