1 package org.hibernate.hql.ast.tree; 3 4 import org.hibernate.QueryException; 5 import org.hibernate.hql.antlr.HqlSqlTokenTypes; 6 7 12 public class InsertStatement extends AbstractStatement { 13 14 17 public int getStatementType() { 18 return HqlSqlTokenTypes.INSERT; 19 } 20 21 24 public boolean needsExecutor() { 25 return true; 26 } 27 28 33 public void validate() throws QueryException { 34 getIntoClause().validateTypes( getSelectClause() ); 35 } 36 37 42 public IntoClause getIntoClause() { 43 return ( IntoClause ) getFirstChild(); 44 } 45 46 51 public SelectClause getSelectClause() { 52 return ( ( QueryNode ) getIntoClause().getNextSibling() ).getSelectClause(); 53 } 54 55 } 56 | Popular Tags |