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 ; }
Converts dashboard entity to dashboardDto .