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

ByTimeFilterOperation Class

Modifiers: final
A class representing a filter operation for Time attributes. It is used to build a filter expression by specifying comparison operations on Time attribute values.
This class provides methods for creating filter nodes that represent various comparison operations on Time 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 timeVar equals a specific timestamp
Query.where { has(TestComponent.id) }
     .filter { by(TestComponent.timeVarData).isEqualTo(1000L) }
// Find entities where timeVar is between two timestamps
Query.where { has(TestComponent.id) }
     .filter { by(TestComponent.timeVarData).greaterThanOrEqualTo(startTime) and
               by(TestComponent.timeVarData).lessThanOrEqualTo(endTime) }
// Find entities where timeVar is after a specific timestamp
Query.where { has(TestComponent.id)}
     .filter { by(TestComponent.timeVarData).greaterThan(timestamp) }

Signature

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

Constructors

ByTimeFilterOperation ( attrId , filterBuilder )
Signature
constructor(attrId: Int, filterBuilder: FilterBuilder)
Parameters
attrId: Int
  The attribute id of the Time 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 )
Creates a filter node representing a greater than condition with the given timestamp value.
Signature
fun greaterThan(value: Long): ByTimeAttributeFilterNode
Parameters
value: Long
  The timestamp value to compare against.
Returns
  A filter node representing the greater than condition.
greaterThanOrEqualTo ( value )
Creates a filter node representing a greater than or equal to condition with the given timestamp value.
Signature
fun greaterThanOrEqualTo(value: Long): ByTimeAttributeFilterNode
Parameters
value: Long
  The timestamp value to compare against.
Returns
  A filter node representing the greater than or equal to condition.
isEqualTo ( value )
Creates a filter node representing an equality condition with the given timestamp value.
Signature
fun isEqualTo(value: Long): ByTimeAttributeFilterNode
Parameters
value: Long
  The timestamp value to compare against.
Returns
  A filter node representing the equality condition.
lessThan ( value )
Creates a filter node representing a less than condition with the given timestamp value.
Signature
fun lessThan(value: Long): ByTimeAttributeFilterNode
Parameters
value: Long
  The timestamp value to compare against.
Returns
  A filter node representing the less than condition.
lessThanOrEqualTo ( value )
Creates a filter node representing a less than or equal to condition with the given timestamp value.
Signature
fun lessThanOrEqualTo(value: Long): ByTimeAttributeFilterNode
Parameters
value: Long
  The timestamp value to compare against.
Returns
  A filter node representing the less than or equal to condition.