|
|
|
|
@ -283,13 +283,13 @@ sealed class Criteria(override var uniqueIdentifier: Int) : IntIdentifiable, Row |
|
|
|
|
inline fun <reified S : QueryCondition.QueryDataCondition<NameManageable>, reified T : NameManageable> compare(): List<Query> { |
|
|
|
|
val objects = mutableListOf<S>() |
|
|
|
|
val realm = Realm.getDefaultInstance() |
|
|
|
|
realm.where<T>().findAll().forEach { |
|
|
|
|
realm.where<T>().sort("name").findAll().forEach { |
|
|
|
|
val condition = (QueryCondition.getInstance<T>() as S).apply { |
|
|
|
|
setObject(it) |
|
|
|
|
} |
|
|
|
|
objects.add(condition) |
|
|
|
|
} |
|
|
|
|
objects.sort() |
|
|
|
|
// objects.sort() |
|
|
|
|
realm.close() |
|
|
|
|
return objects.map { Query(it) } |
|
|
|
|
} |
|
|
|
|
|