@Test public void testPostUpdate() { context.checking(new Expectations() { { allowing(entity).getId(); will(returnValue(2L)); oneOf(cache).delete(CacheKeys.GROUP_BY_ID + 2L); } }); sut.onPostUpdate(entity); context.assertIsSatisfied(); }
@Override public void onPostUpdate(final DomainGroup inUpdatedDomainGroup) { if (log.isInfoEnabled()) { log.info("DomainGroup.onPostUpdate - removing group #" + inUpdatedDomainGroup.getId() + " from cache"); } getCache().delete(CacheKeys.GROUP_BY_ID + inUpdatedDomainGroup.getId()); }
DomainGroupEntityCacheUpdater extends CachedDomainMapper implements EntityCacheUpdater<DomainGroup> { @Override public void onPostUpdate(final DomainGroup inUpdatedDomainGroup) { if (log.isInfoEnabled()) { log.info("DomainGroup.onPostUpdate - removing group #" + inUpdatedDomainGroup.getId() + " from cache"); } getCache().delete(CacheKeys.GROUP_BY_ID + inUpdatedDomainGroup.getId()); } }
DomainGroupEntityCacheUpdater extends CachedDomainMapper implements EntityCacheUpdater<DomainGroup> { @Override public void onPostUpdate(final DomainGroup inUpdatedDomainGroup) { if (log.isInfoEnabled()) { log.info("DomainGroup.onPostUpdate - removing group #" + inUpdatedDomainGroup.getId() + " from cache"); } getCache().delete(CacheKeys.GROUP_BY_ID + inUpdatedDomainGroup.getId()); }  }
DomainGroupEntityCacheUpdater extends CachedDomainMapper implements EntityCacheUpdater<DomainGroup> { @Override public void onPostUpdate(final DomainGroup inUpdatedDomainGroup) { if (log.isInfoEnabled()) { log.info("DomainGroup.onPostUpdate - removing group #" + inUpdatedDomainGroup.getId() + " from cache"); } getCache().delete(CacheKeys.GROUP_BY_ID + inUpdatedDomainGroup.getId()); }  @Override void onPostUpdate(final DomainGroup inUpdatedDomainGroup); @Override void onPostPersist(final DomainGroup inDomainGroup); }
DomainGroupEntityCacheUpdater extends CachedDomainMapper implements EntityCacheUpdater<DomainGroup> { @Override public void onPostUpdate(final DomainGroup inUpdatedDomainGroup) { if (log.isInfoEnabled()) { log.info("DomainGroup.onPostUpdate - removing group #" + inUpdatedDomainGroup.getId() + " from cache"); } getCache().delete(CacheKeys.GROUP_BY_ID + inUpdatedDomainGroup.getId()); }  @Override void onPostUpdate(final DomainGroup inUpdatedDomainGroup); @Override void onPostPersist(final DomainGroup inDomainGroup);  }