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

Get resolver

We have implemented PutResolver before and we have created a stub interface for the GetResolver. Here, we will finish the work that we have started by fully implementing the missing interface.

Let's create a class named StockUpdateGetResolver in the same package as StockUpdatePutResolver, which will extend the DefaultGetResolver class:

public class StockUpdateGetResolver extends DefaultGetResolver<StockUpdate> {}

Next, add a missing implementation of mapFromCursor():

@NonNull@Overridepublic StockUpdate mapFromCursor(@NonNull Cursor cursor) {    final int id = cursor.getInt(cursor.getColumnIndexOrThrow        (StockUpdateTable.Columns.ID));    final long dateLong = cursor.getLong(cursor.getColumnIndexOrThrow        (StockUpdateTable.Columns.

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