Object newObject = ((TransactionImpl) odmg.currentTransaction()).getObjectByIdentity( new Identity(object, pb)); if (newObject != null) { object = newObject; }
    protected Object queryObject(Class classToQuery, Criteria criteria) throws ExcepcaoPersistencia    {        PersistenceBroker pb = getCurrentPersistenceBroker();        Query query = getQuery(classToQuery, criteria);        Object object = pb.getObjectByQuery(query);        if (object != null)        {            lockRead(object);        }        return object;    }