mapper: LunchItemDbEntityMapper, val start: Long ): ItemKeyedDataSource<Long, LunchItemEntity>(){ override fun loadInitial(params: LoadInitialParams<Long>, callback: LoadInitialCallback<LunchItemEntity>) { var initialKey = params.requestedInitialKey val entities = lunchItemDao.lunchItemPageInitial(initialKey, params.requestedLoadSize) callback.onResult(entities.map { mapper.toDomain(it) }) } override fun loadAfter(params: LoadParams<Long>, callback: LoadCallback<LunchItemEntity>) { val entities = lunchItemDao.lunchItemPageAfter(params.key, params.requestedLoadSize) callback.onResult(entities.map { mapper.toDomain(it) }) } override fun loadBefore(params: LoadParams<Long>, callback: LoadCallback<LunchItemEntity>) { val entities = lunchItemDao.lunchItemPageBefore(params.key, params.requestedLoadSize) callback.onResult(entities.map { mapper.toDomain(it) }) } override fun getKey(item: LunchItemEntity): Long { return item.offerDate.time } } Zusätzlich: Custom DataSourceFactory! PagedList.Config als Parameter!