|
|
|
|
@ -164,6 +164,10 @@ sealed class QueryCondition : RowRepresentable { |
|
|
|
|
return this.getDisplayName(context, this.listOfValues) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
override fun getDisplayName(context: Context): String { |
|
|
|
|
return getDisplayName(context, this.listOfValues) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private fun getDisplayName(context: Context, values: List<T>): String { |
|
|
|
|
val prefix = this.resId?.let { |
|
|
|
|
context.getString(it) + " " |
|
|
|
|
@ -176,10 +180,6 @@ sealed class QueryCondition : RowRepresentable { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
override fun getDisplayName(context: Context): String { |
|
|
|
|
return getDisplayName(context, this.listOfValues) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
override fun compareTo(other: ListOfValues<T>): Int { |
|
|
|
|
return listOfValues.sorted().first().compareTo(other.listOfValues.sorted().first()) |
|
|
|
|
} |
|
|
|
|
@ -248,6 +248,7 @@ sealed class QueryCondition : RowRepresentable { |
|
|
|
|
abstract class ListOfString : ListOfValues<String>() { |
|
|
|
|
override var operator: Operator = Operator.ANY |
|
|
|
|
override var listOfValues = mutableListOf<String>() |
|
|
|
|
|
|
|
|
|
override fun labelForValue(value: String, context: Context): String { |
|
|
|
|
return value |
|
|
|
|
} |
|
|
|
|
@ -309,6 +310,10 @@ sealed class QueryCondition : RowRepresentable { |
|
|
|
|
return completeLabel |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
override fun getDisplayNameWithValues(context: Context): String { |
|
|
|
|
return this.getDisplayName(context) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
open fun entityName(realm: Realm, context: Context): String { |
|
|
|
|
return entityName(context) |
|
|
|
|
} |
|
|
|
|
|