@Test void testFindOneByIdFetchDirty() { when(transactionInformation.isEntireRepositoryDirty(emd)).thenReturn(false); when(transactionInformation.isEntityDirty(EntityKey.create(emd, "0"))).thenReturn(true); Fetch fetch = new Fetch().field("id"); when(delegateRepository.findOneById("0", fetch)).thenReturn(entities.get(0)); assertEquals(entities.get(0), l2CacheRepositoryDecorator.findOneById("0", fetch)); }
@Override public Entity findOneById(Object id) { if (doRetrieveFromCache(id)) { return l2Cache.get(delegate(), id); } return delegate().findOneById(id); }
L2CacheRepositoryDecorator extends AbstractRepositoryDecorator<Entity> { @Override public Entity findOneById(Object id) { if (doRetrieveFromCache(id)) { return l2Cache.get(delegate(), id); } return delegate().findOneById(id); } }
L2CacheRepositoryDecorator extends AbstractRepositoryDecorator<Entity> { @Override public Entity findOneById(Object id) { if (doRetrieveFromCache(id)) { return l2Cache.get(delegate(), id); } return delegate().findOneById(id); } L2CacheRepositoryDecorator(
      Repository<Entity> delegateRepository,
      L2Cache l2Cache,
      TransactionInformation transactionInformation); }
L2CacheRepositoryDecorator extends AbstractRepositoryDecorator<Entity> { @Override public Entity findOneById(Object id) { if (doRetrieveFromCache(id)) { return l2Cache.get(delegate(), id); } return delegate().findOneById(id); } L2CacheRepositoryDecorator(
      Repository<Entity> delegateRepository,
      L2Cache l2Cache,
      TransactionInformation transactionInformation); @Override Entity findOneById(Object id); @SuppressWarnings("UnstableApiUsage") @Override Stream<Entity> findAll(Stream<Object> ids); @SuppressWarnings("UnstableApiUsage") @Override Stream<Entity> findAll(Stream<Object> ids, Fetch fetch); @Override Entity findOneById(Object id, Fetch fetch); }
L2CacheRepositoryDecorator extends AbstractRepositoryDecorator<Entity> { @Override public Entity findOneById(Object id) { if (doRetrieveFromCache(id)) { return l2Cache.get(delegate(), id); } return delegate().findOneById(id); } L2CacheRepositoryDecorator(
      Repository<Entity> delegateRepository,
      L2Cache l2Cache,
      TransactionInformation transactionInformation); @Override Entity findOneById(Object id); @SuppressWarnings("UnstableApiUsage") @Override Stream<Entity> findAll(Stream<Object> ids); @SuppressWarnings("UnstableApiUsage") @Override Stream<Entity> findAll(Stream<Object> ids, Fetch fetch); @Override Entity findOneById(Object id, Fetch fetch);  }