Class QueryableStore.NumberQueryField<T,N extends Number>

java.lang.Object
sonia.scm.store.QueryableStore.BaseQueryField<T,N>
sonia.scm.store.QueryableStore.NumberQueryField<T,N>
Type Parameters:
T - The type of the objects this condition is used for.
N - The type of the number field.
All Implemented Interfaces:
QueryableStore.QueryField<T,N>
Direct Known Subclasses:
QueryableStore.CollectionSizeQueryField, QueryableStore.DoubleQueryField, QueryableStore.FloatQueryField, QueryableStore.IntegerQueryField, QueryableStore.LongQueryField, QueryableStore.MapSizeQueryField
Enclosing interface:
QueryableStore<T>

public abstract static class QueryableStore.NumberQueryField<T,N extends Number> extends QueryableStore.BaseQueryField<T,N>
This class is used to create conditions for queries. Instances of this class will be created by the annotation processor for each number field (either Integer, Long, int, or long) of a class annotated with QueryableType.
This is not meant to be instantiated by users of the API!
  • Method Details

    • eq

      public Condition<T> eq(N value)
      Creates a condition that checks if the field is equal to the given value.
      Parameters:
      value - The value to compare the field with.
      Returns:
      The condition to use in a query.
    • greater

      public Condition<T> greater(N value)
      Creates a condition that checks if the field is greater than the given value.
      Parameters:
      value - The value to compare the field with.
      Returns:
      The condition to use in a query.
    • less

      public Condition<T> less(N value)
      Creates a condition that checks if the field is less than the given value.
      Parameters:
      value - The value to compare the field with.
      Returns:
      The condition to use in a query.
    • greaterOrEquals

      public Condition<T> greaterOrEquals(N value)
      Creates a condition that checks if the field is greater than or equal to the given value.
      Parameters:
      value - The value to compare the field with.
      Returns:
      The condition to use in a query.
    • lessOrEquals

      public Condition<T> lessOrEquals(N value)
      Creates a condition that checks if the field is less than or equal to the given value.
      Parameters:
      value - The value to compare the field with.
      Returns:
      The condition to use in a query.
    • between

      public Condition<T> between(N from, N to)
      Creates a condition that checks if the fields is inclusively between the from and to values.
      Parameters:
      from - The lower limit to compare the value with.
      to - The upper limit to compare the value with.
      Returns:
      The condition to use in a query.
    • in

      public Condition<T> in(N... values)
      Creates a condition that checks if the field is equal to any of the given values.
      Parameters:
      values - The values to compare the field with.
      Returns:
      The condition to use in a query.
    • in

      public Condition<T> in(Collection<N> values)
      Creates a condition that checks if the field is equal to any of the given values.
      Parameters:
      values - The values to compare the field with.
      Returns:
      The condition to use in a query.