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

Configuring Type Mapping

The final step that's left before we can start using the GetResolver is to add it to the Type Mappings configuration. This is the call that looks like this:

INSTANCE = DefaultStorIOSQLite.builder()        .sqliteOpenHelper(new StorIODbHelper(context))        .addTypeMapping(StockUpdate.class, SQLiteTypeMapping.        <StockUpdate>builder()                .putResolver(new StockUpdatePutResolver())                .getResolver(new StockUpdateGetResolver())                .deleteResolver(createDeleteResolver())                .build())        .build();

Here, we need to find the following line that was a used to create a stub interface:

.getResolver(createGetResolver())

Now, we need to replace it with this:

.getResolver(new StockUpdateGetResolver())

We are now ready to read the data from the database! ...

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