code: public Identity refreshIdentity()
      {
          Identity oldOid = getIdentity();
          this.oid = getBroker().serviceIdentity().buildIdentity(myObj);
          return oldOid;
      }
docs: Replace the current with a new generated identity object and
  returns the old one.