@Test public void testFindByAccountId() { assertEquals(idInDb, jpaPersistentLoginMapper.findByAccountId("mrburns").getId()); }
@SuppressWarnings("unchecked") public PersistentLogin findByAccountId(final String accountId) { Query q = getEntityManager().createQuery("from PersistentLogin where accountId = :accountId").setParameter( "accountId", accountId.toLowerCase()); List results = q.getResultList(); return (results.size() == 0) ? null : (PersistentLogin) results.get(0); }
PersistentLoginMapper extends DomainEntityMapper<PersistentLogin> { @SuppressWarnings("unchecked") public PersistentLogin findByAccountId(final String accountId) { Query q = getEntityManager().createQuery("from PersistentLogin where accountId = :accountId").setParameter( "accountId", accountId.toLowerCase()); List results = q.getResultList(); return (results.size() == 0) ? null : (PersistentLogin) results.get(0); } }
PersistentLoginMapper extends DomainEntityMapper<PersistentLogin> { @SuppressWarnings("unchecked") public PersistentLogin findByAccountId(final String accountId) { Query q = getEntityManager().createQuery("from PersistentLogin where accountId = :accountId").setParameter( "accountId", accountId.toLowerCase()); List results = q.getResultList(); return (results.size() == 0) ? null : (PersistentLogin) results.get(0); } PersistentLoginMapper(final QueryOptimizer inQueryOptimizer); }
PersistentLoginMapper extends DomainEntityMapper<PersistentLogin> { @SuppressWarnings("unchecked") public PersistentLogin findByAccountId(final String accountId) { Query q = getEntityManager().createQuery("from PersistentLogin where accountId = :accountId").setParameter( "accountId", accountId.toLowerCase()); List results = q.getResultList(); return (results.size() == 0) ? null : (PersistentLogin) results.get(0); } PersistentLoginMapper(final QueryOptimizer inQueryOptimizer); @SuppressWarnings("unchecked") PersistentLogin findByAccountId(final String accountId); void deletePersistentLogin(final String accountId); void createOrUpdate(final PersistentLogin login); }
PersistentLoginMapper extends DomainEntityMapper<PersistentLogin> { @SuppressWarnings("unchecked") public PersistentLogin findByAccountId(final String accountId) { Query q = getEntityManager().createQuery("from PersistentLogin where accountId = :accountId").setParameter( "accountId", accountId.toLowerCase()); List results = q.getResultList(); return (results.size() == 0) ? null : (PersistentLogin) results.get(0); } PersistentLoginMapper(final QueryOptimizer inQueryOptimizer); @SuppressWarnings("unchecked") PersistentLogin findByAccountId(final String accountId); void deletePersistentLogin(final String accountId); void createOrUpdate(final PersistentLogin login);  }