code: public Subscription findSubscriptionByAuthorizationToken(String authorizationToken) {
          EntityManager entityManager = getEntityManager();
          try {
  			return entityManager
  					.createQuery(
  							"SELECT subscription FROM Subscription AS subscription WHERE authorizationToken = :authorizationToken",
  							Subscription.class)
  					.setParameter("authorizationToken", authorizationToken).setMaxResults(1)
  					.getSingleResult();
  		} catch (NoResultException e) {
  			return null;
  		} finally {
  			entityManager.close();
  		}
  	}
docs: findSubscriptionByAuthorizationToken
  
  @param authorizationToken
  @return subscription if it can be found for this authorization token