Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove deprecated createObservable and internal #812

Merged
merged 1 commit into from
Aug 20, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,6 @@ public interface PreparedOperation<Result, Data> {
@WorkerThread
Result executeAsBlocking();

/**
* Creates {@link rx.Observable} that emits result of Operation.
* <p>
* Observable may be "Hot" or "Cold", please read documentation of the concrete implementation.
*
* @return observable result of operation with only one {@link rx.Observer#onNext(Object)} call.
* @deprecated (will be removed in 2.0) please use {@link #asRxObservable()}.
*/
@NonNull
@CheckResult
@Deprecated
Observable<Result> createObservable();

/**
* Creates {@link rx.Observable} that emits result of Operation.
* <p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,18 +101,6 @@ public Observable<Changes> observeChangesOfUri(@NonNull Uri uri) {
@Nullable
public abstract Scheduler defaultScheduler();

/**
* An API for low level interaction with {@link ContentResolver}, it's part of public API, so feel free to use it,
* but please read documentation carefully!
*
* @return implementation of low level APIs for {@link StorIOContentResolver}.
* @deprecated please use {@link #lowLevel()}, this one will be removed in v2.0,
* basically, we just renamed it to LowLevel.
*/
@Deprecated
@NonNull
public abstract Internal internal();

/**
* An API for low level interaction with {@link ContentResolver}, it's part of public API, so feel free to use it,
* but please read documentation carefully!
Expand Down Expand Up @@ -189,13 +177,4 @@ public static abstract class LowLevel {
@NonNull
public abstract ContentResolver contentResolver();
}

/**
* @deprecated please use {@link LowLevel} instead, this type will be removed in v2.0,
* basically we're just giving this API a better name.
*/
@Deprecated
public static abstract class Internal extends LowLevel {

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
public class DefaultStorIOContentResolver extends StorIOContentResolver {

@NonNull
private final Internal lowLevel;
private final LowLevel lowLevel;

@NonNull
private final ContentResolver contentResolver;
Expand Down Expand Up @@ -87,15 +87,6 @@ public Scheduler defaultScheduler() {
return defaultScheduler;
}

/**
* {@inheritDoc}
*/
@NonNull
@Override
public Internal internal() {
return lowLevel;
}

/**
* {@inheritDoc}
*/
Expand Down Expand Up @@ -252,7 +243,7 @@ public DefaultStorIOContentResolver build() {
}
}

protected class LowLevelImpl extends Internal {
protected class LowLevelImpl extends LowLevel {

@NonNull
private final TypeMappingFinder typeMappingFinder;
Expand Down Expand Up @@ -352,15 +343,4 @@ public ContentResolver contentResolver() {
return contentResolver;
}
}

/**
* Please use {@link LowLevelImpl} instead, this type will be remove in v2.0.
*/
@Deprecated
protected class InternalImpl extends LowLevelImpl {

protected InternalImpl(@NonNull TypeMappingFinder typeMappingFinder) {
super(typeMappingFinder);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -56,28 +56,6 @@ public DeleteResult executeAsBlocking() {
}
}

/**
* Creates {@link Observable} which will perform Delete Operation and send result to observer.
* <p>
* Returned {@link Observable} will be "Cold Observable", which means that it performs
* delete only after subscribing to it. Also, it emits the result once.
* <p>
* <dl>
* <dt><b>Scheduler:</b></dt>
* <dd>Operates on {@link StorIOContentResolver#defaultScheduler()} if not {@code null}.</dd>
* </dl>
*
* @return non-null {@link Observable} which will perform Delete Operation.
* And send result to observer.
* @deprecated (will be removed in 2.0) please use {@link #asRxObservable()}.
*/
@NonNull
@CheckResult
@Override
public Observable<DeleteResult> createObservable() {
return asRxObservable();
}

/**
* Creates {@link Observable} which will perform Delete Operation and send result to observer.
* <p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,28 +108,6 @@ public DeleteResults<T> executeAsBlocking() {
}
}

/**
* Creates {@link Observable} which will perform Delete Operation and send result to observer.
* <p>
* Returned {@link Observable} will be "Cold Observable", which means that it performs
* delete only after subscribing to it. Also, it emits the result once.
* <p>
* <dl>
* <dt><b>Scheduler:</b></dt>
* <dd>Operates on {@link StorIOContentResolver#defaultScheduler()} if not {@code null}.</dd>
* </dl>
*
* @return non-null {@link Observable} which will perform Delete Operation.
* and send result to observer.
* @deprecated (will be removed in 2.0) please use {@link #asRxObservable()}.
*/
@NonNull
@CheckResult
@Override
public Observable<DeleteResults<T>> createObservable() {
return asRxObservable();
}

/**
* Creates {@link Observable} which will perform Delete Operation and send result to observer.
* <p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,28 +75,6 @@ public DeleteResult executeAsBlocking() {
}
}

/**
* Creates {@link Observable} which will perform Delete Operation and send result to observer.
* <p>
* Returned {@link Observable} will be "Cold Observable", which means that it performs
* delete only after subscribing to it. Also, it emits the result once.
* <p>
* <dl>
* <dt><b>Scheduler:</b></dt>
* <dd>Operates on {@link StorIOContentResolver#defaultScheduler()} if not {@code null}.</dd>
* </dl>
*
* @return non-null {@link Observable} which will perform Delete Operation.
* and send result to observer.
* @deprecated (will be removed in 2.0) please use {@link #asRxObservable()}.
*/
@NonNull
@CheckResult
@Override
public Observable<DeleteResult> createObservable() {
return asRxObservable();
}

/**
* Creates {@link Observable} which will perform Delete Operation and send result to observer.
* <p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,31 +56,6 @@ public Cursor executeAsBlocking() {
}
}

/**
* Creates "Hot" {@link Observable} which will be subscribed to changes of {@link #query} Uri
* and will emit result each time change occurs.
* <p>
* First result will be emitted immediately after subscription,
* other emissions will occur only if changes of {@link #query} Uri will occur.
* <dl>
* <dt><b>Scheduler:</b></dt>
* <dd>Operates on {@link StorIOContentResolver#defaultScheduler()} if not {@code null}.</dd>
* </dl>
* <p>
* Please don't forget to unsubscribe from this {@link Observable} because
* it's "Hot" and endless.
*
* @return non-null {@link Observable} which will emit non-null
* list with mapped results and will be subscribed to changes of {@link #query} Uri.
* @deprecated (will be removed in 2.0) please use {@link #asRxObservable()}.
*/
@NonNull
@CheckResult
@Override
public Observable<Cursor> createObservable() {
return asRxObservable();
}

/**
* Creates "Hot" {@link Observable} which will be subscribed to changes of {@link #query} Uri
* and will emit result each time change occurs.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,33 +104,6 @@ public List<T> executeAsBlocking() {
}
}

/**
* Creates "Hot" {@link Observable} which will be subscribed to changes of {@link #query} Uri
* and will emit result each time change occurs.
* <p>
* First result will be emitted immediately after subscription,
* other emissions will occur only if changes of {@link #query} Uri will occur.
* <p>
* <dl>
* <dt><b>Scheduler:</b></dt>
* <dd>Operates on {@link StorIOContentResolver#defaultScheduler()} if not {@code null}.</dd>
* </dl>
* <p>
* Please don't forget to unsubscribe from this {@link Observable}
* because it's "Hot" and endless.
*
* @return non-null {@link Observable} which will emit non-null, immutable
* {@link List} with mapped results and will be subscribed to changes of {@link #query} Uri,
* list can be empty.
* @deprecated (will be removed in 2.0) please use {@link #asRxObservable()}.
*/
@NonNull
@CheckResult
@Override
public Observable<List<T>> createObservable() {
return asRxObservable();
}

/**
* Creates "Hot" {@link Observable} which will be subscribed to changes of {@link #query} Uri
* and will emit result each time change occurs.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,32 +56,6 @@ public Integer executeAsBlocking() {
}
}

/**
* Creates "Hot" {@link Observable} which will be subscribed to changes of tables from query
* and will emit result each time change occurs.
* <p>
* First result will be emitted immediately after subscription,
* other emissions will occur only if changes of tables from query will occur during lifetime of
* the {@link Observable}.
* <dl>
* <dt><b>Scheduler:</b></dt>
* <dd>Operates on {@link StorIOContentResolver#defaultScheduler()} if not {@code null}.</dd>
* </dl>
* <p>
* Please don't forget to unsubscribe from this {@link Observable} because
* it's "Hot" and endless.
*
* @return non-null {@link Observable} which will emit non-null
* number of results of the executed query and will be subscribed to changes of tables from query.
* @deprecated (will be removed in 2.0) please use {@link #asRxObservable()}.
*/
@NonNull
@CheckResult
@Override
public Observable<Integer> createObservable() {
return asRxObservable();
}

/**
* Creates "Hot" {@link Observable} which will be subscribed to changes of tables from query
* and will emit result each time change occurs.
Expand Down Expand Up @@ -220,4 +194,4 @@ public PreparedGetNumberOfResults prepare() {
}
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -95,33 +95,6 @@ public T executeAsBlocking() {
}
}

/**
* Creates "Hot" {@link Observable} which will be subscribed to changes of {@link #query} Uri
* and will emit result each time change occurs.
* <p>
* First result will be emitted immediately after subscription,
* other emissions will occur only if changes of {@link #query} Uri will occur.
* <p>
* <dl>
* <dt><b>Scheduler:</b></dt>
* <dd>Operates on {@link StorIOContentResolver#defaultScheduler()} if not {@code null}.</dd>
* </dl>
* <p>
* Please don't forget to unsubscribe from this {@link Observable}
* because it's "Hot" and endless.
*
* @return non-null {@link Observable} which will emit single object
* (can be {@code null}, if no items are found)
* with mapped results and will be subscribed to changes of tables from query
* @deprecated (will be removed in 2.0) please use {@link #asRxObservable()}.
*/
@NonNull
@CheckResult
@Override
public Observable<T> createObservable() {
return asRxObservable();
}

/**
* Creates "Hot" {@link Observable} which will be subscribed to changes of {@link #query} Uri
* and will emit result each time change occurs.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,28 +108,6 @@ public PutResults<T> executeAsBlocking() {
}
}

/**
* Creates {@link Observable} which will perform Put Operation and send result to observer.
* <p>
* Returned {@link Observable} will be "Cold Observable", which means that it performs
* put only after subscribing to it. Also, it emits the result once.
* <p>
* <dl>
* <dt><b>Scheduler:</b></dt>
* <dd>Operates on {@link StorIOContentResolver#defaultScheduler()} if not {@code null}.</dd>
* </dl>
*
* @return non-null {@link Observable} which will perform Put Operation.
* and send result to observer.
* @deprecated (will be removed in 2.0) please use {@link #asRxObservable()}.
*/
@NonNull
@CheckResult
@Override
public Observable<PutResults<T>> createObservable() {
return asRxObservable();
}

/**
* Creates {@link Observable} which will perform Put Operation and send result to observer.
* <p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,28 +54,6 @@ public PutResult executeAsBlocking() {
}
}

/**
* Creates {@link Observable} which will perform Put Operation and send result to observer.
* <p>
* Returned {@link Observable} will be "Cold Observable", which means that it performs
* put only after subscribing to it. Also, it emits the result once.
* <p>
* <dl>
* <dt><b>Scheduler:</b></dt>
* <dd>Operates on {@link StorIOContentResolver#defaultScheduler()} if not {@code null}.</dd>
* </dl>
*
* @return non-null {@link Observable} which will perform Put Operation.
* and send result to observer.
* @deprecated (will be removed in 2.0) please use {@link #asRxObservable()}.
*/
@NonNull
@CheckResult
@Override
public Observable<PutResult> createObservable() {
return asRxObservable();
}

/**
* Creates {@link Observable} which will perform Put Operation and send result to observer.
* <p>
Expand Down
Loading