code: public static ServiceManagementRecord findServiceManagementRecord(EntityManager em, Service service) {
          requireArgument(em != null, "Entity manager can not be null.");
          requireArgument(service != null, "Service cannot be null.");
  
          TypedQuery<ServiceManagementRecord> query = em.createNamedQuery("ServiceManagementRecord.findByService", ServiceManagementRecord.class);
  
          try {
              query.setParameter("service", service);
              return query.getSingleResult();
          } catch (NoResultException ex) {
              return null;
          }
      }
docs: Returns a record for the specified service.
  
  @param   em       The entity manager to use. Cannot be null.
  @param   service  The service for which to obtain the record. Cannot be null.
  
  @return  The management record for the specified service or null if no record exists.