@Test public void testFindEntry() { OAuthDomainEntry entry = sut.execute("token1"); assertTrue("No Entry found for token of 'token1'", entry != null); assertEquals("Incorrect callback URL returned", "http: .getCallbackUrl()); assertEquals("Incorrect app id returned", "application1", entry.getAppId()); assertEquals("Incorrect container returned", "container1", entry.getContainer()); }
@Override @SuppressWarnings("unchecked") public OAuthDomainEntry execute(final String inRequest) { Query q = getEntityManager().createQuery("from OAuthDomainEntry e where e.token = :token").setParameter( "token", inRequest); List results = q.getResultList(); return (results.size() == 0) ? null : (OAuthDomainEntry) results.get(0); }
GetOAuthEntry extends ReadMapper<String, OAuthDomainEntry> { @Override @SuppressWarnings("unchecked") public OAuthDomainEntry execute(final String inRequest) { Query q = getEntityManager().createQuery("from OAuthDomainEntry e where e.token = :token").setParameter( "token", inRequest); List results = q.getResultList(); return (results.size() == 0) ? null : (OAuthDomainEntry) results.get(0); } }
GetOAuthEntry extends ReadMapper<String, OAuthDomainEntry> { @Override @SuppressWarnings("unchecked") public OAuthDomainEntry execute(final String inRequest) { Query q = getEntityManager().createQuery("from OAuthDomainEntry e where e.token = :token").setParameter( "token", inRequest); List results = q.getResultList(); return (results.size() == 0) ? null : (OAuthDomainEntry) results.get(0); }  }
GetOAuthEntry extends ReadMapper<String, OAuthDomainEntry> { @Override @SuppressWarnings("unchecked") public OAuthDomainEntry execute(final String inRequest) { Query q = getEntityManager().createQuery("from OAuthDomainEntry e where e.token = :token").setParameter( "token", inRequest); List results = q.getResultList(); return (results.size() == 0) ? null : (OAuthDomainEntry) results.get(0); }  @Override @SuppressWarnings("unchecked") OAuthDomainEntry execute(final String inRequest); }
GetOAuthEntry extends ReadMapper<String, OAuthDomainEntry> { @Override @SuppressWarnings("unchecked") public OAuthDomainEntry execute(final String inRequest) { Query q = getEntityManager().createQuery("from OAuthDomainEntry e where e.token = :token").setParameter( "token", inRequest); List results = q.getResultList(); return (results.size() == 0) ? null : (OAuthDomainEntry) results.get(0); }  @Override @SuppressWarnings("unchecked") OAuthDomainEntry execute(final String inRequest);  }