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

Creating write resolvers

As we will be writing data in this chapter, here we will only cover how to write the PutResolver class for your entities. It is possible to generate them automatically, but it is also necessary to know how to write one yourself. This is often required in cases when the PutResolver involves modifying multiple database tables.

Create a class, named StockUpdatePutResolver, and make it extend DefaultPutResolver<StockUpdate>, as follows:

public class StockUpdatePutResolver extends DefaultPutResolver<StockUpdate> {

DefaultPutResolver is an abstract class that extends the PutResolver interface and provides a convenient interface for mapping the data from domain objects to SQL data. This is done by implementing three methods: ...

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