O'Reilly logo

Reactive Android Programming by Tadas Subonis

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Missing delete resolver

Before we finish this chapter, it will be useful to create the last missing resolver for StorIO--DeleteResolver. We will add it so that we can use StorIO to the full if there is a need. At the moment, if we try to create a DELETE query with StorIO, it will fail, since there is no mapper for DELETE queries.

To implement DeleteResolver, we will create the StockUpdateDeleteResolver class (similar to before) that extends DefaultDeleteResolver<StockUpdate>:

public class StockUpdateDeleteResolver     extends DefaultDeleteResolver<StockUpdate> {}

Also, we will implement mapToDeleteQuery() with this:

@NonNull@Overrideprotected DeleteQuery mapToDeleteQuery(@NonNull StockUpdate object) {    return DeleteQuery.builder() .table(StockUpdateTable. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required