docs: @Override
      public int persist(PartitionRecord updates, PartitionRecord expected) throws Exception {
          StringBuilder update = new StringBuilder(160)
                          .append("UPDATE Partition SET ");
          if (updates.hasExecutor())
              update.append("EXECUTOR=:x2,");
          if (updates.hasHostName())
              update.append("HOSTNAME=:h2,");
          if (updates.hasId())
              update.append("ID=:i2,");
          if (updates.hasLibertyServer())
              update.append("LSERVER=:l2,");
          if (updates.hasUserDir())
              update.append("USERDIR=:u2,");
          update.setCharAt(update.length() - 1, ' ');
  
          update.append("WHERE");
          if (expected.hasExecutor())
              update.append(" EXECUTOR=:x1 AND");
          if (expected.hasHostName())
              update.append(" HOSTNAME=:h1 AND");
          if (expected.hasId())
              update.append(" ID=:i1 AND");
          if (expected.hasLibertyServer())
              update.append(" LSERVER=:l1 AND");
          if (expected.hasUserDir())
              update.append(" USERDIR=:u1 AND");
          int length = update.length();
          update.delete(length - (update.charAt(length - 1) == 'E' ? 6 : 4), length);
  
          final boolean trace = TraceComponent.isAnyTracingEnabled();
          if (trace && tc.isEntryEnabled())
              Tr.entry(this, tc, "persist", updates, expected, update);
  
          EntityManager em = getPersistenceServiceUnit().createEntityManager();
          try {
              Query query = em.createQuery(update.toString());
  
              if (updates.hasExecutor())
                  query.setParameter("x2", updates.getExecutor());
              if (updates.hasHostName())
                  query.setParameter("h2", updates.getHostName());
              if (updates.hasId())
                  query.setParameter("i2", updates.getId());
              if (updates.hasLibertyServer())
                  query.setParameter("l2", updates.getLibertyServer());
              if (updates.hasUserDir())
                  query.setParameter("u2", updates.getUserDir());
  
              if (expected.hasExecutor())
                  query.setParameter("x1", expected.getExecutor());
              if (expected.hasHostName())
                  query.setParameter("h1", expected.getHostName());
              if (expected.hasId())
                  query.setParameter("i1", expected.getId());
              if (expected.hasLibertyServer())
                  query.setParameter("l1", expected.getLibertyServer());
              if (expected.hasUserDir())
                  query.setParameter("u1", expected.getUserDir());
  
              int count = query.executeUpdate();
  
              if (trace && tc.isEntryEnabled())
                  Tr.exit(this, tc, "persist", count);
              return count;
          } finally {
              em.close();
          }
      }