@Test public void testExecuteFound() { byte[] result = sut.execute(4507L); byte[] expected = "This is my data".getBytes(); Assert.assertArrayEquals(expected, result); }
@Override public byte[] execute(final Long inRequest) { String q = "SELECT cryptoKey FROM PersonCryptoKey WHERE personId = :personId"; Query query = getEntityManager().createQuery(q).setParameter("personId", inRequest); List<byte[]> results = query.getResultList(); return results.size() == 1 ? results.get(0) : null; }
PersonCryptoKeyDbMapper extends BaseArgDomainMapper<Long, byte[]> { @Override public byte[] execute(final Long inRequest) { String q = "SELECT cryptoKey FROM PersonCryptoKey WHERE personId = :personId"; Query query = getEntityManager().createQuery(q).setParameter("personId", inRequest); List<byte[]> results = query.getResultList(); return results.size() == 1 ? results.get(0) : null; } }
PersonCryptoKeyDbMapper extends BaseArgDomainMapper<Long, byte[]> { @Override public byte[] execute(final Long inRequest) { String q = "SELECT cryptoKey FROM PersonCryptoKey WHERE personId = :personId"; Query query = getEntityManager().createQuery(q).setParameter("personId", inRequest); List<byte[]> results = query.getResultList(); return results.size() == 1 ? results.get(0) : null; }  }
PersonCryptoKeyDbMapper extends BaseArgDomainMapper<Long, byte[]> { @Override public byte[] execute(final Long inRequest) { String q = "SELECT cryptoKey FROM PersonCryptoKey WHERE personId = :personId"; Query query = getEntityManager().createQuery(q).setParameter("personId", inRequest); List<byte[]> results = query.getResultList(); return results.size() == 1 ? results.get(0) : null; }  @Override byte[] execute(final Long inRequest); }
PersonCryptoKeyDbMapper extends BaseArgDomainMapper<Long, byte[]> { @Override public byte[] execute(final Long inRequest) { String q = "SELECT cryptoKey FROM PersonCryptoKey WHERE personId = :personId"; Query query = getEntityManager().createQuery(q).setParameter("personId", inRequest); List<byte[]> results = query.getResultList(); return results.size() == 1 ? results.get(0) : null; }  @Override byte[] execute(final Long inRequest);  }