code: public static DashboardDto transformToDto(Dashboard dashboard) {
          if (dashboard == null) {
              throw new WebApplicationException("Null entity object cannot be converted to Dto object.", Status.INTERNAL_SERVER_ERROR);
          }
  
          DashboardDto result = createDtoObject(DashboardDto.class, dashboard);
  
          result.setOwnerName(dashboard.getOwner().getUserName());
          return result;
      }
docs: Converts dashboard entity to dashboardDto.
  
  @param   dashboard  The dashboard object. Cannot be null.
  
  @return  DashboardDto object.
  
  @throws  WebApplicationException  If an error occurs.