Advertisement
Guest User

Untitled

a guest
Jun 24th, 2019
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. @Dao
  2. interface ConcertDao {
  3. // The Int type parameter tells Room to use a PositionalDataSource
  4. // object, with position-based loading under the hood.
  5. @Query("SELECT * FROM Concerts ORDER BY date DESC")
  6. fun concertsByDate(): DataSource.Factory<Int, Concert>
  7. }
  8.  
  9. data class Concert(val date: Long, val bands: List<Band>)
  10.  
  11. @Table(name = "Concerts")
  12. class YakTimelineEventAA(): YakModelAA(){
  13.  
  14. @Column(name = "Bands")
  15. var bands: String? = null
  16.  
  17. @Column(name = "Date", index = true)
  18. var date: Long? = null
  19.  
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement