API reference
API reference
Select your platform
No SDKs available
No versions available

ByIntFilterOperation Class

Modifiers: final
A class representing a filter operation for integer attributes. It is used to build a filter expression by specifying filter operation and its operands.
This class provides methods for creating filter nodes that represent various comparison operations on integer attributes, such as equality, greater than, less than, etc. These filter nodes can then be combined using logical operators (AND, OR) to create complex filtering conditions.
Example:
// Find entities where intVar equals 42
Query.where { has(TestComponent.id) }
     .filter { by(TestComponent.intVarData).isEqualTo(42) }
// Find entities where intVar is between 10 and 20
Query.where { has(TestComponent.id) }
     .filter {
       by(TestComponent.intVarData).greaterThanOrEqualTo(10) and
       by(TestComponent.intVarData).lessThanOrEqualTo(20)
     }
// Find entities where intVar is not equal to 0
Query.where { has(TestComponent.id) }
     .filter { not(by(TestComponent.intVarData).isEqualTo(0)) }

Signature

class ByIntFilterOperation(val attrId: Int, val filterBuilder: FilterBuilder)

Constructors

ByIntFilterOperation ( attrId , filterBuilder ) : ByIntFilterOperation
Signature
constructor(attrId: Int, filterBuilder: FilterBuilder)
Parameters
attrId: Int
The attribute id of the integer attribute for the filter operation.
filterBuilder: FilterBuilder
The filter builder object used to create the filter node.

Properties

attrId : Int
[Get]
Signature
val attrId: Int
filterBuilder : FilterBuilder
[Get]
Signature
val filterBuilder: FilterBuilder

Functions

greaterThan ( value ) : ByIntFilterNode
Creates a filter node representing a greater than condition with the given value.
Signature
fun greaterThan(value: Int): ByIntFilterNode
Parameters
value: Int
greaterThanOrEqualTo ( value ) : ByIntFilterNode
Creates a filter node representing a greater than or equal to condition with the given value.
Signature
fun greaterThanOrEqualTo(value: Int): ByIntFilterNode
Parameters
value: Int
isEqualTo ( value ) : ByIntFilterNode
Creates a filter node representing an equality condition with the given value.
Signature
fun isEqualTo(value: Int): ByIntFilterNode
Parameters
value: Int
lessThan ( value ) : ByIntFilterNode
Creates a filter node representing a less than condition with the given value.
Signature
fun lessThan(value: Int): ByIntFilterNode
Parameters
value: Int
lessThanOrEqualTo ( value ) : ByIntFilterNode
Creates a filter node representing a less than or equal to condition with the given value.
Signature
fun lessThanOrEqualTo(value: Int): ByIntFilterNode
Parameters
value: Int
Did you find this page helpful?
Thumbs up icon
Thumbs down icon