kotlin-extensions / io.realm.kotlin / io.realm.RealmQuery / oneOf

oneOf

fun <T : RealmModel> RealmQuery<T>.oneOf(propertyName: String, value: Array<String?>, casing: Case = Case.SENSITIVE): RealmQuery<T>

In comparison. This allows you to test if objects match any value in an array of values.

Parameters

fieldName - the field to compare.

values - array of values to compare with and it cannot be null or empty.

casing - how casing is handled. Case.INSENSITIVE works only for the Latin-1 characters.

Exceptions

java.lang.IllegalArgumentException - if the field isn't a String field or values is null or empty.

Return
the query object.

fun <T : RealmModel> RealmQuery<T>.oneOf(propertyName: String, value: Array<Byte?>): RealmQuery<T>

In comparison. This allows you to test if objects match any value in an array of values.

Parameters

fieldName - the field to compare.

values - array of values to compare with and it cannot be null or empty.

Exceptions

java.lang.IllegalArgumentException - if the field isn't a Byte field or values is null or empty.

Return
the query object.

fun <T : RealmModel> RealmQuery<T>.oneOf(propertyName: String, value: Array<Short?>): RealmQuery<T>

In comparison. This allows you to test if objects match any value in an array of values.

Parameters

fieldName - the field to compare.

values - array of values to compare with and it cannot be null or empty.

Exceptions

java.lang.IllegalArgumentException - if the field isn't a Short field or values is null or empty.

Return
the query object.

fun <T : RealmModel> RealmQuery<T>.oneOf(propertyName: String, value: Array<Int?>): RealmQuery<T>

In comparison. This allows you to test if objects match any value in an array of values.

Parameters

fieldName - the field to compare.

values - array of values to compare with and it cannot be null or empty.

Exceptions

java.lang.IllegalArgumentException - if the field isn't a Integer field or values is null or empty.

Return
the query object.

fun <T : RealmModel> RealmQuery<T>.oneOf(propertyName: String, value: Array<Long?>): RealmQuery<T>

In comparison. This allows you to test if objects match any value in an array of values.

Parameters

fieldName - the field to compare.

values - array of values to compare with and it cannot be null or empty.

Exceptions

java.lang.IllegalArgumentException - if the field isn't a Long field or values is null or empty.

Return
the query object.

fun <T : RealmModel> RealmQuery<T>.oneOf(propertyName: String, value: Array<Double?>): RealmQuery<T>

In comparison. This allows you to test if objects match any value in an array of values.

Parameters

fieldName - the field to compare.

values - array of values to compare with and it cannot be null or empty.

Exceptions

java.lang.IllegalArgumentException - if the field isn't a Double field or values is null or empty.

Return
the query object.

fun <T : RealmModel> RealmQuery<T>.oneOf(propertyName: String, value: Array<Float?>): RealmQuery<T>

In comparison. This allows you to test if objects match any value in an array of values.

Parameters

fieldName - the field to compare.

values - array of values to compare with and it cannot be null or empty.

Exceptions

java.lang.IllegalArgumentException - if the field isn't a Float field or values is null or empty.

Return
the query object.

fun <T : RealmModel> RealmQuery<T>.oneOf(propertyName: String, value: Array<Boolean?>): RealmQuery<T>

In comparison. This allows you to test if objects match any value in an array of values.

Parameters

fieldName - the field to compare.

values - array of values to compare with and it cannot be null or empty.

Exceptions

java.lang.IllegalArgumentException - if the field isn't a Boolean field or values is null or empty.

Return
the query object.

fun <T : RealmModel> RealmQuery<T>.oneOf(propertyName: String, value: Array<Date?>): RealmQuery<T>

In comparison. This allows you to test if objects match any value in an array of values.

Parameters

fieldName - the field to compare.

values - array of values to compare with and it cannot be null or empty.

Exceptions

java.lang.IllegalArgumentException - if the field isn't a Date field or values is null or empty.

Return
the query object.