@Test(expected = PersistenceException.class) public void testExecuteAlreadyPresent() { final long userid = 4507L; Query query = getEntityManager().createQuery("FROM PersonCryptoKey WHERE personId=" + userid); assertEquals(1, query.getResultList().size()); byte[] key = "Some Data".getBytes(); sut.refresh(userid, key); }
@Override public void refresh(final Long inRequest, final byte[] inResponse) { PersonCryptoKey entity = new PersonCryptoKey(inRequest, inResponse); getEntityManager().persist(entity); }
PersonCryptoKeyDbRefreshStrategy extends BaseDomainMapper implements RefreshStrategy<Long, byte[]> { @Override public void refresh(final Long inRequest, final byte[] inResponse) { PersonCryptoKey entity = new PersonCryptoKey(inRequest, inResponse); getEntityManager().persist(entity); } }
PersonCryptoKeyDbRefreshStrategy extends BaseDomainMapper implements RefreshStrategy<Long, byte[]> { @Override public void refresh(final Long inRequest, final byte[] inResponse) { PersonCryptoKey entity = new PersonCryptoKey(inRequest, inResponse); getEntityManager().persist(entity); }  }
PersonCryptoKeyDbRefreshStrategy extends BaseDomainMapper implements RefreshStrategy<Long, byte[]> { @Override public void refresh(final Long inRequest, final byte[] inResponse) { PersonCryptoKey entity = new PersonCryptoKey(inRequest, inResponse); getEntityManager().persist(entity); }  @Override void refresh(final Long inRequest, final byte[] inResponse); }
PersonCryptoKeyDbRefreshStrategy extends BaseDomainMapper implements RefreshStrategy<Long, byte[]> { @Override public void refresh(final Long inRequest, final byte[] inResponse) { PersonCryptoKey entity = new PersonCryptoKey(inRequest, inResponse); getEntityManager().persist(entity); }  @Override void refresh(final Long inRequest, final byte[] inResponse);  }