@Test public void saveNoLocal() { final TrackedEntityInstance tei = new TrackedEntityInstance(); Mockito.doReturn( tei ).when( persistCallback ).persistSave( Mockito.same( tei ) ); Assert.assertSame( tei, template.save( tei ) ); Mockito.verify( persistCallback ).persistSave( Mockito.same( tei ) ); }
@Nonnull public T save( @Nonnull T resource ) { return save( resource, null ); }
LocalDhisResourceRepositoryTemplate { @Nonnull public T save( @Nonnull T resource ) { return save( resource, null ); } }
LocalDhisResourceRepositoryTemplate { @Nonnull public T save( @Nonnull T resource ) { return save( resource, null ); } LocalDhisResourceRepositoryTemplate( @Nonnull Class<T> resourceClass, @Nonnull RequestCacheService requestCacheService,
        @Nonnull LocalDhisRepositoryPersistCallback<T> persistCallback ); }
LocalDhisResourceRepositoryTemplate { @Nonnull public T save( @Nonnull T resource ) { return save( resource, null ); } LocalDhisResourceRepositoryTemplate( @Nonnull Class<T> resourceClass, @Nonnull RequestCacheService requestCacheService,
        @Nonnull LocalDhisRepositoryPersistCallback<T> persistCallback ); @Nonnull T save( @Nonnull T resource ); @Nonnull T save( @Nonnull T resource, @Nullable Consumer<T> localResourceConsumer ); boolean deleteById( @Nonnull String id, @Nonnull Function<String, T> prototypeFunction ); @Nonnull Optional<T> findOneById( @Nonnull String id, @Nonnull Function<String, T> callback ); boolean isLocal( @Nonnull String id ); @Nonnull Collection<T> find( @Nonnull Predicate<T> filter, @Nonnull Supplier<Collection<T>> collectionSupplier, boolean localOnly, @Nonnull String methodName, @Nonnull Object... args ); @Nonnull Collection<T> find( @Nullable String trackedEntityInstanceId, @Nonnull Predicate<T> filter, @Nonnull Supplier<Collection<T>> collectionSupplier, boolean localOnly, @Nonnull String methodName, @Nonnull Object... args ); }
LocalDhisResourceRepositoryTemplate { @Nonnull public T save( @Nonnull T resource ) { return save( resource, null ); } LocalDhisResourceRepositoryTemplate( @Nonnull Class<T> resourceClass, @Nonnull RequestCacheService requestCacheService,
        @Nonnull LocalDhisRepositoryPersistCallback<T> persistCallback ); @Nonnull T save( @Nonnull T resource ); @Nonnull T save( @Nonnull T resource, @Nullable Consumer<T> localResourceConsumer ); boolean deleteById( @Nonnull String id, @Nonnull Function<String, T> prototypeFunction ); @Nonnull Optional<T> findOneById( @Nonnull String id, @Nonnull Function<String, T> callback ); boolean isLocal( @Nonnull String id ); @Nonnull Collection<T> find( @Nonnull Predicate<T> filter, @Nonnull Supplier<Collection<T>> collectionSupplier, boolean localOnly, @Nonnull String methodName, @Nonnull Object... args ); @Nonnull Collection<T> find( @Nullable String trackedEntityInstanceId, @Nonnull Predicate<T> filter, @Nonnull Supplier<Collection<T>> collectionSupplier, boolean localOnly, @Nonnull String methodName, @Nonnull Object... args ); static final String CONTAINER_REQUEST_CACHE_ATTRIBUTE_NAME; static final String RESOURCE_KEY_REQUEST_CACHE_ATTRIBUTE_NAME; }