code: @Override
      public int remove(PartitionRecord criteria) throws Exception {
          StringBuilder delete = new StringBuilder(111)
                          .append("DELETE FROM Partition p WHERE");
          if (criteria != null) {
              if (criteria.hasExecutor())
                  delete.append(" p.EXECUTOR=:x AND");
              if (criteria.hasHostName())
                  delete.append(" p.HOSTNAME=:h AND");
              if (criteria.hasId())
                  delete.append(" p.ID=:i AND");
              if (criteria.hasLibertyServer())
                  delete.append(" p.LSERVER=:l AND");
              if (criteria.hasUserDir())
                  delete.append(" p.USERDIR=:u AND");
          }
          int length = delete.length();
          delete.delete(length - (delete.charAt(length - 1) == 'E' ? 6 : 4), length);
  
          final boolean trace = TraceComponent.isAnyTracingEnabled();
          if (trace && tc.isEntryEnabled())
              Tr.entry(this, tc, "remove", criteria, delete);
  
          EntityManager em = getPersistenceServiceUnit().createEntityManager();
          try {
              Query query = em.createQuery(delete.toString());
  
              if (criteria != null) {
                  if (criteria.hasExecutor())
                      query.setParameter("x", criteria.getExecutor());
                  if (criteria.hasHostName())
                      query.setParameter("h", criteria.getHostName());
                  if (criteria.hasId())
                      query.setParameter("i", criteria.getId());
                  if (criteria.hasLibertyServer())
                      query.setParameter("l", criteria.getLibertyServer());
                  if (criteria.hasUserDir())
                      query.setParameter("u", criteria.getUserDir());
              }
  
              int count = query.executeUpdate();
  
              if (trace && tc.isEntryEnabled())
                  Tr.exit(this, tc, "remove", count);
              return count;
          } finally {
              em.close();
          }
      }
docs: {@inheritDoc}