this.dialect = dialect;
}
public ForUpdateFragment(Dialect dialect, LockOptions lockOptions, Map<String, String[]> keyColumnNames) throws QueryException {
this( dialect );
LockMode upgradeType = null;
Iterator iter = lockOptions.getAliasLockIterator();
this.lockOptions = lockOptions;
if ( !iter.hasNext()) { // no tables referenced
final LockMode lockMode = lockOptions.getLockMode();
if ( LockMode.READ.lessThan( lockMode ) ) {
upgradeType = lockMode;
this.lockMode = lockMode;
}
}
while ( iter.hasNext() ) {
final Map.Entry me = ( Map.Entry ) iter.next();
final LockMode lockMode = ( LockMode ) me.getValue();
if ( LockMode.READ.lessThan( lockMode ) ) {
final String tableAlias = ( String ) me.getKey();
if ( dialect.forUpdateOfColumns() ) {
String[] keyColumns = keyColumnNames.get( tableAlias ); //use the id column alias
if ( keyColumns == null ) {