|
|
|
@ -2,10 +2,19 @@ package net.pokeranalytics.android.model.interfaces |
|
|
|
|
|
|
|
|
|
|
|
import net.pokeranalytics.android.ui.view.RowRepresentable |
|
|
|
import net.pokeranalytics.android.ui.view.RowRepresentable |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
interface Identifiable { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* A unique identifier getter |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
fun uniqueIdentifier(): String |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* An interface to easily handle the validity of any object we want to save |
|
|
|
* An interface to easily handle the validity of any object we want to save |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
interface Savable { |
|
|
|
interface Savable : Identifiable { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* A method to define if an object is safe for saving in database |
|
|
|
* A method to define if an object is safe for saving in database |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@ -14,12 +23,6 @@ interface Savable { |
|
|
|
return true |
|
|
|
return true |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* A unique identifier getter |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
fun uniqueIdentifier(): String |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* a method to handle the modification of the object. |
|
|
|
* a method to handle the modification of the object. |
|
|
|
* Through [RowRepresentable] the object is able to update the right variable with the new value. |
|
|
|
* Through [RowRepresentable] the object is able to update the right variable with the new value. |
|
|
|
|