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

Preparing constants

We will dedicate specific constants to keep the names and queries that are related to the entity (StockUpdate) that we will be persisting.

For this, let's create a separate package, packt.reactivestocks.storio, that will hold StorIO-related classes, and let's put a class, named StockUpdateTable, which will contain queries and constants for StockUpdate, there:

class StockUpdateTable {    static final String TABLE = "stock_updates";    static class Columns {        static final String ID = "_id";        static final String STOCK_SYMBOL = "stock_symbol";        static final String PRICE = "price";        static final String DATE = "date";    }    private StockUpdateTable() {    }    static String createTableQuery() {        return "CREATE TABLE " + TABLE + "("                + 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