Search in sources :

Example 1 with Pointer

use of com.base.entity.Pointer in project T-MVP by north2016.

the class ArticlePresenter method initAdapterPresenter.

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

Example 2 with Pointer

use of com.base.entity.Pointer 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

Pointer (com.base.entity.Pointer)2 Gson (com.google.gson.Gson)2 DbFactory (com.DbFactory)1 ApiFactory (com.apt.ApiFactory)1