code: @Override
      public boolean existsVariantIDForAdmin(String variantID) {
  
          Long numberOfVariants = createQuery("select count(t) from Variant t where t.variantID = :variantID", Long.class)
                  .setParameter("variantID", variantID).getSingleResult();
  
          return numberOfVariants == 1L;
      }
docs: Admin queries