Skip to content

Instantly share code, notes, and snippets.

@markchristopherng
Created April 11, 2018 04:15
Show Gist options
  • Save markchristopherng/a87ff597097f0209a6e0a2e61e58fc1b to your computer and use it in GitHub Desktop.
Save markchristopherng/a87ff597097f0209a6e0a2e61e58fc1b to your computer and use it in GitHub Desktop.
BranchLocationManager
package au.com.auspost.android.feature.postcode.service
import au.com.auspost.android.AuspostDatabase
import javax.inject.Inject
import javax.inject.Singleton
@Singleton
class BranchLocationManager {
@Inject
lateinit var db: AuspostDatabase
fun getAll() = db.branchLocationDao().getAll()
fun getByKeyword(keyword : String) = db.branchLocationDao().getByKeyword(keyword + "%")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment