public QueryParameters set(int index, QueryParameters element) {
        QueryParameters params = null;

        if (getMaxCacheSize() != -1) {
            throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED + ". Cache update is allowed when Cache is not limited (used by Cached output handlers)");
        }

        if (valueCached(index) == true) {
            params = readCachedValue(index);
            updateCache(index, element);
        } else {
            throw new MjdbcRuntimeException(ERROR_NOT_ALLOWED + ". Only cached(read) values can be replaced");
        }

        return params;
    }
public QueryParameters set ( int index , QueryParameters element ) { QueryParameters params = null ; if ( getMaxCacheSize ( ) != - 1 ) { throw new MjdbcRuntimeException ( ERROR_NOT_ALLOWED + ". Cache update is allowed when Cache is not limited (used by Cached output handlers)" ) ; } if ( valueCached ( index ) == true ) { params = readCachedValue ( index ) ; updateCache ( index , element ) ; } else { throw new MjdbcRuntimeException ( ERROR_NOT_ALLOWED + ". Only cached(read) values can be replaced" ) ; } return params ; }
Sets value in cache. Please be aware that currently cache only is updated.
No changes to Database are made

@param index   element number to replace
@param element new element value
@return previous element at that position
@throws org.midao.jdbc.core.exception.MjdbcRuntimeException if value is not in cache