@Test public void testExecuteWhenFound() { Assert.assertEquals(new Long(4L), sut.execute("mrburns")); }
@Override public Long execute(final String inUniqueKey) { List<Long> results = getEntityManager().createQuery( "SELECT id FROM StreamScope WHERE scopeType = :scopeType AND uniqueKey = :uniqueKey").setParameter( "scopeType", scopeType).setMaxResults(1).setParameter("uniqueKey", inUniqueKey.toLowerCase()) .getResultList(); if (results != null && results.size() == 1) { return results.get(0); } return null; }
GetStreamScopeIdForScopeTypeByUniqueKeyDbMapper extends BaseArgDomainMapper<String, Long> { @Override public Long execute(final String inUniqueKey) { List<Long> results = getEntityManager().createQuery( "SELECT id FROM StreamScope WHERE scopeType = :scopeType AND uniqueKey = :uniqueKey").setParameter( "scopeType", scopeType).setMaxResults(1).setParameter("uniqueKey", inUniqueKey.toLowerCase()) .getResultList(); if (results != null && results.size() == 1) { return results.get(0); } return null; } }
GetStreamScopeIdForScopeTypeByUniqueKeyDbMapper extends BaseArgDomainMapper<String, Long> { @Override public Long execute(final String inUniqueKey) { List<Long> results = getEntityManager().createQuery( "SELECT id FROM StreamScope WHERE scopeType = :scopeType AND uniqueKey = :uniqueKey").setParameter( "scopeType", scopeType).setMaxResults(1).setParameter("uniqueKey", inUniqueKey.toLowerCase()) .getResultList(); if (results != null && results.size() == 1) { return results.get(0); } return null; } GetStreamScopeIdForScopeTypeByUniqueKeyDbMapper(final ScopeType inScopeType); }
GetStreamScopeIdForScopeTypeByUniqueKeyDbMapper extends BaseArgDomainMapper<String, Long> { @Override public Long execute(final String inUniqueKey) { List<Long> results = getEntityManager().createQuery( "SELECT id FROM StreamScope WHERE scopeType = :scopeType AND uniqueKey = :uniqueKey").setParameter( "scopeType", scopeType).setMaxResults(1).setParameter("uniqueKey", inUniqueKey.toLowerCase()) .getResultList(); if (results != null && results.size() == 1) { return results.get(0); } return null; } GetStreamScopeIdForScopeTypeByUniqueKeyDbMapper(final ScopeType inScopeType); @Override Long execute(final String inUniqueKey); }
GetStreamScopeIdForScopeTypeByUniqueKeyDbMapper extends BaseArgDomainMapper<String, Long> { @Override public Long execute(final String inUniqueKey) { List<Long> results = getEntityManager().createQuery( "SELECT id FROM StreamScope WHERE scopeType = :scopeType AND uniqueKey = :uniqueKey").setParameter( "scopeType", scopeType).setMaxResults(1).setParameter("uniqueKey", inUniqueKey.toLowerCase()) .getResultList(); if (results != null && results.size() == 1) { return results.get(0); } return null; } GetStreamScopeIdForScopeTypeByUniqueKeyDbMapper(final ScopeType inScopeType); @Override Long execute(final String inUniqueKey);  }