Back to project page spades.
The source code is released under:
Apache License
If you think the Android project spades listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package cat.picas.spadessamples.model.inheritance; //ww w. ja v a2s. com import android.database.sqlite.SQLiteDatabase; import cat.picas.spades.AutoEntityMapper; import cat.picas.spades.Column; import cat.picas.spades.Dao; import cat.picas.spades.EntityMapper; import cat.picas.spades.Table; import cat.picas.spades.Tables; import static cat.picas.spades.Column.ColumnId; public class HotelDao extends Dao<Hotel> { public static final Table TABLE = Tables.newTable("restaurants", Hotel.class); public static final ColumnId ID = TABLE.newColumnId("id"); public static final Column PLACE_ID = TABLE.newColumnAuto("place_id", "place").notNull().foreignKey(PlaceDao.ID).end(); public static final Column TOTAL_ROOMS = TABLE.newColumnAuto("total_rooms", "mTotalRooms").end(); public static final Column AVAILABLE_ROOMS = TABLE.newColumnAuto("available_rooms", "mAvailableRooms").end(); public static final EntityMapper<Hotel> MAPPER = new AutoEntityMapper<Hotel>(TABLE); public HotelDao(SQLiteDatabase db, Table table, EntityMapper<Restaurant> mapper) { super(db, TABLE, MAPPER); } }