Skip to content

Commit

Permalink
Updated repo to conform to Interface
Browse files Browse the repository at this point in the history
  • Loading branch information
zbdd committed Jul 4, 2022
1 parent e90d324 commit f59d8f8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ package com.example.youmood.model
* @author Zac Durber
*/
interface IBaseRepository<T> {
fun create(obj: T)
fun create(entry: T)
fun readAll(): ArrayList<T>
fun read(id: Int): T?
fun update(obj: T)
fun update(entry: T)
fun delete(id: Int): Boolean
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package com.example.youmood.model.exposed

import androidx.lifecycle.MutableLiveData
import com.example.youmood.model.IBaseRepository
import com.example.youmood.model.IMoodRepository
import com.example.youmood.model.Mood
import kotlinx.coroutines.Dispatchers
Expand Down Expand Up @@ -71,15 +69,15 @@ class MoodRepository @Inject constructor(): IMoodRepository {
return returnArray
}

override fun create(mood: Mood) {
override fun create(entry: Mood) {

}

override fun read(id: Int): Mood? {
return transaction { MoodEntity.findById(id)?.toMood() }
}

override fun update(mood: Mood) {
override fun update(entry: Mood) {
TODO("Not yet implemented")
}

Expand Down

0 comments on commit f59d8f8

Please sign in to comment.