code: public static SubsystemSuspensionLevels findBySubsystem(EntityManager em, SubSystem subSystem) {
          SystemAssert.requireArgument(em != null, "Entity manager can not be null.");
          SystemAssert.requireArgument(subSystem != null, "Subsystem cannot be null.");
  
          TypedQuery<SubsystemSuspensionLevels> query = em.createNamedQuery("SubsystemSuspensionLevels.findBySubsystem",
              SubsystemSuspensionLevels.class);
  
          try {
              query.setParameter("subSystem", subSystem);
              return query.getSingleResult();
          } catch (NoResultException ex) {
              Map<Integer, Long> levels = new HashMap<>();
  
              levels.put(1, 60 * 60 * 1000L);
              levels.put(2, 10 * 60 * 60 * 1000L);
              levels.put(3, 24 * 60 * 60 * 1000L);
              levels.put(4, 3 * 24 * 60 * 60 * 1000L);
              levels.put(5, 10 * 24 * 60 * 60 * 1000L);
  
              SubsystemSuspensionLevels suspensionLevels = new SubsystemSuspensionLevels(null, subSystem, levels);
  
              return em.merge(suspensionLevels);
          }
      }
docs: Retrieves the SubsystemSuspensionLevels object for the given subsystem.
  
  @param   em         The EntityManager to use.
  @param   subSystem  The subsystem for which to retrieve suspension level.
  
  @return  The SubsystemSuspensionLevels object for the given subsystem. Throws a runtime exception if no such record exists. This is because
  suspension levels for non-existent subsystems must never be queried.