code: public void selectEntity(final Long entityId) {
          E entity = null;
          if (entityId != null) {
              entity = findEntityByTableValue(entityId).orElse(null);
          }
  
          setLastSelectedEntityId(entityId);
          publishSelectedEntityEvent(entity);
      }
docs: Finds the entity object of the given entity ID and performs the
  publishing of the BaseEntityEventType.SELECTED_ENTITY event
  
  @param entityId
  ID of the current entity