code: public static OAuthAuthorizationCode findByCodeAndState(EntityManager em, String code, String state) {
          TypedQuery<OAuthAuthorizationCode> query = em.createNamedQuery("OAuthAuthorizationCode.findByCodeAndState", OAuthAuthorizationCode.class);
          try {
              query.setParameter("code", code);
              query.setParameter("state", state);
              return query.getSingleResult();
          } catch (NoResultException ex) {
              return null;
          }
      }
docs: ~ Static Methods **************************************************************************************************************************************