1 package org.hibernate.hql.ast.tree; 3 4 import org.hibernate.hql.antlr.HqlSqlTokenTypes; 5 import org.hibernate.hql.antlr.SqlTokenTypes; 6 import org.hibernate.hql.ast.util.ASTUtil; 7 8 import antlr.collections.AST; 9 10 import org.apache.commons.logging.Log; 11 import org.apache.commons.logging.LogFactory; 12 13 18 public class UpdateStatement extends AbstractRestrictableStatement { 19 20 private static final Log log = LogFactory.getLog( UpdateStatement.class ); 21 22 25 public int getStatementType() { 26 return SqlTokenTypes.UPDATE; 27 } 28 29 32 public boolean needsExecutor() { 33 return true; 34 } 35 36 protected int getWhereClauseParentTokenType() { 37 return SqlTokenTypes.SET; 38 } 39 40 protected Log getLog() { 41 return log; 42 } 43 44 public AST getSetClause() { 45 return ASTUtil.findTypeInChildren( this, HqlSqlTokenTypes.SET ); 46 } 47 } 48 | Popular Tags |