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);  lockRead(obj); } } } catch (ODMGRuntimeException ex) { throw new ExcepcaoPersistencia(ExcepcaoPersistencia.READ_LOCK, ex); }
    protected 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);                    lockRead(obj);                }            }        } catch (ODMGRuntimeException ex) {            throw new ExcepcaoPersistencia(ExcepcaoPersistencia.READ_LOCK, ex);        }    }