code: @Override
      public void refresh(Object entity, Map<String, Object> properties)
      {
          checkClosed();
  
          // Store current properties in a variable for post-find reset
          Map<String, Object> currentProperties = getProperties();
  
          // Populate properties in client
          getPersistenceDelegator().populateClientProperties(properties);
  
          // Refresh state of entity
          refresh(entity);
  
          // Reset Client properties
          getPersistenceDelegator().populateClientProperties(currentProperties);
      }
docs: Refresh the state of the instance from the database, using the specified
  properties, and overwriting changes made to the entity, if any. If a
  vendor-specific property or hint is not recognized, it is silently
  ignored.
  
  @param entity
  @param properties
  standard and vendor-specific properties and hints
  @throws IllegalArgumentException
  if the instance is not an entity or the entity is not managed
  @throws TransactionRequiredException
  if invoked on a container-managed entity manager of type
  PersistenceContextType.TRANSACTION and there is no
  transaction
  @throws EntityNotFoundException
  if the entity no longer exists in the database
  @see javax.persistence.EntityManager#refresh(java.lang.Object,
  java.util.Map)