Search in sources :

Example 1 with GetAllQuery

use of org.robobinding.gallery.model.typedcursor.GetAllQuery in project RoboBinding-gallery by RoboBinding.

the class TypedCursorActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    GetAllQuery<Product> allProductsQuery = new GetAllQuery<Product>(ProductTable.TABLE_NAME, new ProductRowMapper());
    db = getDatabaseHelper().getReadableDatabase();
    presentationModel = new TypedCursorPresentationModel(db, allProductsQuery);
    initializeContentView(R.layout.activity_typed_cursor, presentationModel);
}
Also used : GetAllQuery(org.robobinding.gallery.model.typedcursor.GetAllQuery) Product(org.robobinding.gallery.model.Product) TypedCursorPresentationModel(org.robobinding.gallery.presentationmodel.TypedCursorPresentationModel) ProductRowMapper(org.robobinding.gallery.model.typedcursor.ProductRowMapper)

Aggregations

Product (org.robobinding.gallery.model.Product)1 GetAllQuery (org.robobinding.gallery.model.typedcursor.GetAllQuery)1 ProductRowMapper (org.robobinding.gallery.model.typedcursor.ProductRowMapper)1 TypedCursorPresentationModel (org.robobinding.gallery.presentationmodel.TypedCursorPresentationModel)1