i am updating paging to version 3.0 and since i am using clean architecture ( the important thing here is the seperation between the core where i have my repos and my usesCases and the app module where all android framework classes ..) however i am using two model classes (one for querying data from room for example :
data class ExampleEntity(
@Expose
@ColumnInfo(name = INTERVENTION_ID_COLUMN_NAME)
@SerializedName(INTERVENTION_ID_COLUMN_NAME)
val interventionId: String?,
@Expose
@ColumnInfo(name = SITE_NAME_COLUMN_NAME)
@SerializedName(SITE_NAME_COLUMN_NAME)
val siteName: String?
}
the other is to be used in the core module and useCase without implying the room database as dependency at all ...ex:
data class Example(
@Expose
@SerializedName(INTERVENTION_ID_COLUMN_NAME)
val interventionId: String?,
@Expose
@SerializedName(SITE_NAME_COLUMN_NAME)
val siteName: String?
}
later in databseImplementation i map the Entity class to the core Class and it was possible in paging 2 as pagedlist can be mapped , now i can't seem to access the PagingData object of Entity and only can add to it (headers ,seperators...etc) how can i overcome this design puzzle ?