Search in sources :

Example 1 with DbFactory

use of com.DbFactory in project T-MVP by north2016.

the class AboutActivity method initView.

@Override
public void initView() {
    mViewBinding.lvUser.getPresenter().setDbRepository(DbFactory::getAllUser).setNetRepository(ApiFactory::getAllUser).fetch();
    mViewBinding.llHeader.addView(new ChartView(this, Lines, num0, num1));
}
Also used : ChartView(com.view.widget.ChartView) DbFactory(com.DbFactory)

Example 2 with DbFactory

use of com.DbFactory in project T-MVP by north2016.

the class UserPresenter method initAdapterPresenter.

@Override
public void initAdapterPresenter(AdapterPresenter mAdapterPresenter, _User user) {
    String creater = new Gson().toJson(new Pointer(_User.class.getSimpleName(), user.objectId));
    mAdapterPresenter.setNetRepository(ApiFactory::getCommentList).setDbRepository(DbFactory::getUserCommentList).setParam(C.OBJECT_ID, user.objectId).setParam(C.INCLUDE, C.ARTICLE).setParam(C.CREATER, creater).fetch();
}
Also used : DbFactory(com.DbFactory) Gson(com.google.gson.Gson) Pointer(com.base.entity.Pointer)

Aggregations

DbFactory (com.DbFactory)2 Pointer (com.base.entity.Pointer)1 Gson (com.google.gson.Gson)1 ChartView (com.view.widget.ChartView)1