Package org.hibernate.hql.ast

Examples of org.hibernate.hql.ast.SqlGenerator


    String userWhereClause = "";
    if ( whereClause.getNumberOfChildren() != 0 ) {
      // If a where clause was specified in the update/delete query, use it to limit the
      // returned ids here...
      try {
        SqlGenerator sqlGenerator = new SqlGenerator( getFactory() );
        sqlGenerator.whereClause( whereClause );
        userWhereClause = sqlGenerator.getSQL().substring( 7 )// strip the " where "
      }
      catch ( RecognitionException e ) {
        throw new HibernateException( "Unable to generate id select for DML operation", e );
      }
      if ( whereJoinFragment.length() > 0 ) {
View Full Code Here


  public BasicExecutor(HqlSqlWalker walker, Queryable persister) {
    super( walker, log );
    this.persister = persister;
    try {
      SqlGenerator gen = new SqlGenerator( getFactory() );
      gen.statement( walker.getAST() );
      sql = gen.getSQL();
      gen.getParseErrorHandler().throwQueryException();
    }
    catch ( RecognitionException e ) {
      throw QuerySyntaxException.convert( e );
    }
  }
View Full Code Here

TOP

Related Classes of org.hibernate.hql.ast.SqlGenerator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.