/** * Modify the SQL, adding lock hints and comments, if necessary */ protected String preprocessSQL( String sql, QueryParameters parameters, SessionFactoryImplementor sessionFactory, List<AfterLoadAction> afterLoadActions) throws HibernateException { Dialect dialect = sessionFactory.getServiceRegistry().getService( JdbcServices.class ).getDialect(); sql = applyLocks( sql, parameters, dialect, afterLoadActions ); sql = dialect.addSqlHintOrComment( sql, parameters, sessionFactory.getSessionFactoryOptions().isCommentsEnabled() ); return processDistinctKeyword( sql, parameters ); }
/** * Modify the SQL, adding lock hints and comments, if necessary */ protected String preprocessSQL(String sql, QueryParameters parameters, Dialect dialect) throws HibernateException { sql = applyLocks( sql, parameters.getLockOptions(), dialect ); return getFactory().getSettings().isCommentsEnabled() ? prependComment( sql, parameters ) : sql; }
/** * Modify the SQL, adding lock hints and comments, if necessary */ protected String preprocessSQL(String sql, QueryParameters parameters, Dialect dialect) throws HibernateException { sql = applyLocks( sql, parameters.getLockModes(), dialect ); return getFactory().getSettings().isCommentsEnabled() ? prependComment( sql, parameters ) : sql; }
/** * Modify the SQL, adding lock hints and comments, if necessary */ protected String preprocessSQL(String sql, QueryParameters parameters, Dialect dialect) throws HibernateException { sql = applyLocks( sql, parameters.getLockOptions(), dialect ); return getFactory().getSettings().isCommentsEnabled() ? prependComment( sql, parameters ) : sql; }
/** * Modify the SQL, adding lock hints and comments, if necessary */ protected String preprocessSQL(String sql, QueryParameters parameters, Dialect dialect) throws HibernateException { sql = applyLocks( sql, parameters.getLockModes(), dialect ); return getFactory().getSettings().isCommentsEnabled() ? prependComment( sql, parameters ) : sql; }