Class QueryableStore.StringQueryField<T>

java.lang.Object
sonia.scm.store.QueryableStore.BaseQueryField<T,String>
sonia.scm.store.QueryableStore.StringQueryField<T>
Type Parameters:
T - The type of the objects this condition is used for.
All Implemented Interfaces:
QueryableStore.AggregatableQueryField<T,String>, QueryableStore.QueryField<T,String>
Direct Known Subclasses:
QueryableStore.IdQueryField
Enclosing interface:
QueryableStore<T>

public static class QueryableStore.StringQueryField<T> extends QueryableStore.BaseQueryField<T,String> implements QueryableStore.AggregatableQueryField<T,String>
This class is used to create conditions for queries. Instances of this class will be created by the annotation processor for each String field of a class annotated with QueryableType.
This is not meant to be instantiated by users of the API!
  • Constructor Details

    • StringQueryField

      public StringQueryField(String name)
  • Method Details

    • eq

      public LeafCondition<T,String> eq(String 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.
    • contains

      public Condition<T> contains(String value)
      Creates a condition that checks if the field contains the given value as a substring.
      Parameters:
      value - The value to check for.
      Returns:
      The condition to use in a query.
    • in

      public Condition<T> in(String... 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<String> 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.
    • getFieldType

      public Class<String> getFieldType()
      Specified by:
      getFieldType in interface QueryableStore.AggregatableQueryField<T,String>