list.set(i, obj);
list.add(i, obj); list.remove(i + 1);
    public void lockRead(List list) throws ExcepcaoPersistencia    {        try        {            tx = odmg.currentTransaction();            if (tx == null)                throw new ExcepcaoPersistencia("No current transaction!");            if (list != null)            {                for (int i = 0; i < list.size(); i++)                {                    Object obj = list.get(i);                    Object newObject =                        ((TransactionImpl) tx).getObjectByIdentity(                            new Identity(obj, getCurrentPersistenceBroker()));                    if (newObject != null)                    {                        obj = newObject;                        list.set(i, obj);                    }                    tx.lock(obj, Transaction.READ);                }            }        }        catch (ODMGRuntimeException ex)        {            throw new ExcepcaoPersistencia(ExcepcaoPersistencia.READ_LOCK, ex);        }    }