Interface QueryBuilderField<F extends QueryBuilderField<F>>

All Superinterfaces:
BuilderFieldSource<F>, Comparable<F>, Component<F>, Copyable<F>, Field<F>, FormComponent<F>, Serializable
All Known Implementing Classes:
DefaultQueryBuilderField

public interface QueryBuilderField<F extends QueryBuilderField<F>> extends Field<F>, BuilderFieldSource<F>
  • Method Details

    • addField

      default F addField(String name, Field<?> field)
      Add a field as a child to the current field with the provided name and Field.
      Parameters:
      name - the name of the field
      field - the Field object added
      Returns:
      this
    • addField

      default F addField(Field<?> field)
      Add a field as a child to the current field Field. The field must have a name already attached.
      Parameters:
      field - the Field object added
      Returns:
      this
    • addField

      default F addField(String name)
      Add a field as a child to the current field with the provided name. The field is set to a string and will autogenerate a label based on the name.
      Parameters:
      name - the name of the field
      Returns:
      this
    • addFields

      default F addFields(Collection<Field<?>> fields)
      Add a collection of fields as children to the current field.
      Parameters:
      fields - A collection of fields
      Returns:
      this
    • removeField

      default F removeField(String name)
      Removes a field with the given name.
      Parameters:
      name - the name of the field
      Returns:
      this
    • field

      default F field(String name, UnaryOperator<Field<?>> fn)
      Selects or creates a field with the given name and provides it as an argument to the function for further customization.
      Parameters:
      name - the name of the field
      fn - the customize function
      Returns:
      this
    • findField

      default Optional<Field<?>> findField(String name)
      Finds a field with the specified name.
      Parameters:
      name - the name of the field to find
      Returns:
      The field if it is found, otherwise null
    • getField

      default Field<?> getField(String name)
      Gets a field with the specified name.
      Parameters:
      name - the name of the field to get
      Returns:
      The field if it is found, otherwise throws exception