Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
saadshams committed Oct 4, 2020
1 parent 4529659 commit b867d11
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,13 @@ class StartupCommand: SimpleCommand() {

try {
connection.readableDatabase.use {
facade.registerProxy(UserProxy(connection))
facade.registerProxy(RoleProxy(connection))
facade.run {
registerProxy(UserProxy(connection))
registerProxy(RoleProxy(connection))

facade.registerCommand(ApplicationFacade.REGISTER) { RegisterCommand() }
facade.registerMediator(ApplicationMediator(WeakReference(application)))
registerCommand(ApplicationFacade.REGISTER) { RegisterCommand() }
registerMediator(ApplicationMediator(WeakReference(application)))
}
}
} catch (exception: Exception) {
Log.d("StartupCommand", "execute: ${exception.localizedMessage}")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import android.content.Context
import android.database.sqlite.SQLiteDatabase
import android.database.sqlite.SQLiteOpenHelper
import android.util.Log
import org.puremvc.kotlin.demos.android.employeeadmin.model.valueObject.Department
import org.puremvc.kotlin.demos.android.employeeadmin.model.valueObject.User

class SQLite(context: Context, name: String, factory: SQLiteDatabase.CursorFactory?, version: Int) : SQLiteOpenHelper(context, name, factory, version) {

Expand All @@ -27,7 +29,7 @@ class SQLite(context: Context, name: String, factory: SQLiteDatabase.CursorFacto
}

override fun onUpgrade(db: SQLiteDatabase?, oldVersion: Int, newVersion: Int) {
Log.d("StartupCommand", "onUpgrade: $oldVersion $newVersion")
Log.d("SQLite", "onUpgrade: $oldVersion $newVersion")
}

}

0 comments on commit b867d11

Please sign in to comment.