@Override public String applyLocksToSql(String sql, LockOptions aliasedLockOptions, Map keyColumnNames) { return new ForUpdateFragment( this, aliasedLockOptions, keyColumnNames ).toFragmentString() + " " + sql; }
@Override public String applyLocksToSql(String sql, LockOptions aliasedLockOptions, Map<String, String[]> keyColumnNames) { return sql + new ForUpdateFragment( this, aliasedLockOptions, keyColumnNames ).toFragmentString(); }
/** * Modifies the given SQL by applying the appropriate updates for the specified * lock modes and key columns. * <p/> * The behavior here is that of an ANSI SQL <tt>SELECT FOR UPDATE</tt>. This * method is really intended to allow dialects which do not support * <tt>SELECT FOR UPDATE</tt> to achieve this in their own fashion. * * @param sql the SQL string to modify * @param aliasedLockOptions lock options indexed by aliased table names. * @param keyColumnNames a map of key columns indexed by aliased table names. * @return the modified SQL string. */ public String applyLocksToSql(String sql, LockOptions aliasedLockOptions, Map<String, String[]> keyColumnNames) { return sql + new ForUpdateFragment( this, aliasedLockOptions, keyColumnNames ).toFragmentString(); }
@Override public String applyLocksToSql(String sql, LockOptions aliasedLockOptions, Map keyColumnNames) { return new ForUpdateFragment( this, aliasedLockOptions, keyColumnNames ).toFragmentString() + " " + sql; }
@Override public String applyLocksToSql(String sql, LockOptions aliasedLockOptions, Map<String, String[]> keyColumnNames) { return sql + new ForUpdateFragment( this, aliasedLockOptions, keyColumnNames ).toFragmentString(); }
public String applyLocksToSql(String sql, LockOptions aliasedLockOptions, Map keyColumnNames) { return sql + new ForUpdateFragment( this, aliasedLockOptions, keyColumnNames ).toFragmentString(); }
public String applyLocksToSql(String sql, LockOptions aliasedLockOptions, Map keyColumnNames) { return sql + new ForUpdateFragment( this, aliasedLockOptions, keyColumnNames ).toFragmentString(); }
/** * Modifies the given SQL by applying the appropriate updates for the specified * lock modes and key columns. * <p/> * The behavior here is that of an ANSI SQL <tt>SELECT FOR UPDATE</tt>. This * method is really intended to allow dialects which do not support * <tt>SELECT FOR UPDATE</tt> to achieve this in their own fashion. * * @param sql the SQL string to modify * @param aliasedLockOptions lock options indexed by aliased table names. * @param keyColumnNames a map of key columns indexed by aliased table names. * @return the modified SQL string. */ public String applyLocksToSql(String sql, LockOptions aliasedLockOptions, Map keyColumnNames) { return sql + new ForUpdateFragment( this, aliasedLockOptions, keyColumnNames ).toFragmentString(); }
/** * Modifies the given SQL by applying the appropriate updates for the specified * lock modes and key columns. * <p/> * The behavior here is that of an ANSI SQL <tt>SELECT FOR UPDATE</tt>. This * method is really intended to allow dialects which do not support * <tt>SELECT FOR UPDATE</tt> to achieve this in their own fashion. * * @param sql the SQL string to modify * @param aliasedLockOptions lock options indexed by aliased table names. * @param keyColumnNames a map of key columns indexed by aliased table names. * @return the modified SQL string. */ public String applyLocksToSql(String sql, LockOptions aliasedLockOptions, Map keyColumnNames) { return sql + new ForUpdateFragment( this, aliasedLockOptions, keyColumnNames ).toFragmentString(); }
/** * Modifies the given SQL by applying the appropriate updates for the specified * lock modes and key columns. * <p/> * The behavior here is that of an ANSI SQL <tt>SELECT FOR UPDATE</tt>. This * method is really intended to allow dialects which do not support * <tt>SELECT FOR UPDATE</tt> to achieve this in their own fashion. * * @param sql the SQL string to modify * @param aliasedLockOptions lock options indexed by aliased table names. * @param keyColumnNames a map of key columns indexed by aliased table names. * @return the modified SQL string. */ public String applyLocksToSql(String sql, LockOptions aliasedLockOptions, Map<String, String[]> keyColumnNames) { return sql + new ForUpdateFragment( this, aliasedLockOptions, keyColumnNames ).toFragmentString(); }
return sql + new ForUpdateFragment( dialect, aliasedLockModes, keyColumnNames ).toFragmentString();
protected String applyLocks(String sql, Map lockModes, Dialect dialect) throws QueryException { // can't cache this stuff either (per-invocation) final String result; if ( lockModes == null || lockModes.size() == 0 ) { result = sql; } else { Map aliasedLockModes = new HashMap(); Iterator iter = lockModes.entrySet().iterator(); while ( iter.hasNext() ) { Map.Entry me = ( Map.Entry ) iter.next(); aliasedLockModes.put( getAliasName( ( String ) me.getKey() ), me.getValue() ); } Map keyColumnNames = null; if ( dialect.forUpdateOfColumns() ) { keyColumnNames = new HashMap(); for ( int i = 0; i < names.length; i++ ) { keyColumnNames.put( names[i], persisters[i].getIdentifierColumnNames() ); } } result = sql + new ForUpdateFragment( dialect, aliasedLockModes, keyColumnNames ).toFragmentString(); } logQuery( queryString, result ); return result; }
protected String applyLocks(String sql, Map lockModes, Dialect dialect) throws QueryException { // can't cache this stuff either (per-invocation) final String result; if ( lockModes == null || lockModes.size() == 0 ) { result = sql; } else { Map aliasedLockModes = new HashMap(); Iterator iter = lockModes.entrySet().iterator(); while ( iter.hasNext() ) { Map.Entry me = ( Map.Entry ) iter.next(); aliasedLockModes.put( getAliasName( ( String ) me.getKey() ), me.getValue() ); } Map keyColumnNames = null; if ( dialect.forUpdateOfColumns() ) { keyColumnNames = new HashMap(); for ( int i = 0; i < names.length; i++ ) { keyColumnNames.put( names[i], persisters[i].getIdentifierColumnNames() ); } } result = sql + new ForUpdateFragment( dialect, aliasedLockModes, keyColumnNames ).toFragmentString(); } logQuery( queryString, result ); return result; }
return sql + new ForUpdateFragment( dialect, aliasedLockModes, keyColumnNames ).toFragmentString();
protected String applyLocks(String sqlSelectString, Map lockModes, Dialect dialect) throws QueryException { if ( lockModes==null || lockModes.size()==0 ) { return sqlSelectString; } else { Map keyColumnNames = null; Loadable[] persisters = getEntityPersisters(); String[] entityAliases = getAliases(); if ( dialect.forUpdateOfColumns() ) { keyColumnNames = new HashMap(); for ( int i=0; i<entityAliases.length; i++ ) { keyColumnNames.put( entityAliases[i], persisters[i].getIdentifierColumnNames() ); } } return sqlSelectString + new ForUpdateFragment(dialect, lockModes, keyColumnNames).toFragmentString(); } }
protected String applyLocks(String sqlSelectString, Map lockModes, Dialect dialect) throws QueryException { if ( lockModes==null || lockModes.size()==0 ) { return sqlSelectString; } else { Map keyColumnNames = null; Loadable[] persisters = getEntityPersisters(); String[] entityAliases = getAliases(); if ( dialect.forUpdateOfColumns() ) { keyColumnNames = new HashMap(); for ( int i=0; i<entityAliases.length; i++ ) { keyColumnNames.put( entityAliases[i], persisters[i].getIdentifierColumnNames() ); } } return sqlSelectString + new ForUpdateFragment(dialect, lockModes, keyColumnNames).toFragmentString(); } }