|
|
|
@ -1,18 +1,24 @@ |
|
|
|
package net.pokeranalytics.android.model.realm |
|
|
|
package net.pokeranalytics.android.model.realm |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import io.realm.Realm |
|
|
|
import io.realm.RealmObject |
|
|
|
import io.realm.RealmObject |
|
|
|
|
|
|
|
import io.realm.RealmResults |
|
|
|
|
|
|
|
import io.realm.Sort |
|
|
|
import io.realm.annotations.PrimaryKey |
|
|
|
import io.realm.annotations.PrimaryKey |
|
|
|
|
|
|
|
import io.realm.kotlin.where |
|
|
|
import net.pokeranalytics.android.R |
|
|
|
import net.pokeranalytics.android.R |
|
|
|
|
|
|
|
import net.pokeranalytics.android.model.interfaces.CountableUsage |
|
|
|
import net.pokeranalytics.android.model.interfaces.Manageable |
|
|
|
import net.pokeranalytics.android.model.interfaces.Manageable |
|
|
|
import net.pokeranalytics.android.ui.adapter.StaticRowRepresentableDataSource |
|
|
|
import net.pokeranalytics.android.ui.adapter.StaticRowRepresentableDataSource |
|
|
|
import net.pokeranalytics.android.ui.view.RowRepresentable |
|
|
|
import net.pokeranalytics.android.ui.view.RowRepresentable |
|
|
|
import net.pokeranalytics.android.ui.view.RowRepresentableEditDescriptor |
|
|
|
import net.pokeranalytics.android.ui.view.RowRepresentableEditDescriptor |
|
|
|
import net.pokeranalytics.android.ui.view.rowrepresentable.GameRow |
|
|
|
import net.pokeranalytics.android.ui.view.rowrepresentable.GameRow |
|
|
|
import net.pokeranalytics.android.ui.view.rowrepresentable.SimpleRow |
|
|
|
import net.pokeranalytics.android.ui.view.rowrepresentable.SimpleRow |
|
|
|
|
|
|
|
import timber.log.Timber |
|
|
|
import java.util.* |
|
|
|
import java.util.* |
|
|
|
import kotlin.collections.ArrayList |
|
|
|
import kotlin.collections.ArrayList |
|
|
|
|
|
|
|
|
|
|
|
open class Game : RealmObject(), Manageable, StaticRowRepresentableDataSource, RowRepresentable { |
|
|
|
open class Game : RealmObject(), Manageable, StaticRowRepresentableDataSource, RowRepresentable, CountableUsage { |
|
|
|
|
|
|
|
|
|
|
|
@PrimaryKey |
|
|
|
@PrimaryKey |
|
|
|
var id = UUID.randomUUID().toString() |
|
|
|
var id = UUID.randomUUID().toString() |
|
|
|
@ -23,6 +29,9 @@ open class Game : RealmObject(), Manageable, StaticRowRepresentableDataSource, R |
|
|
|
// A shorter name for the game |
|
|
|
// A shorter name for the game |
|
|
|
var shortName: String? = null |
|
|
|
var shortName: String? = null |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// CountableUsage |
|
|
|
|
|
|
|
override var useCount: Int = 0 |
|
|
|
|
|
|
|
|
|
|
|
override fun getDisplayName(): String { |
|
|
|
override fun getDisplayName(): String { |
|
|
|
return this.name |
|
|
|
return this.name |
|
|
|
} |
|
|
|
} |
|
|
|
|