Interface VisitableCondition<T>

All Known Subinterfaces:
CaseInsensitiveVisitableCondition
All Known Implementing Classes:
AbstractColumnComparisonCondition, AbstractListValueCondition, AbstractNoValueCondition, AbstractSingleValueCondition, AbstractSubselectCondition, AbstractTwoValueCondition, IsBetween, IsEqualTo, IsEqualToColumn, IsEqualToWithSubselect, IsGreaterThan, IsGreaterThanColumn, IsGreaterThanOrEqualTo, IsGreaterThanOrEqualToColumn, IsGreaterThanOrEqualToWithSubselect, IsGreaterThanWithSubselect, IsIn, IsInCaseInsensitive, IsInWithSubselect, IsLessThan, IsLessThanColumn, IsLessThanOrEqualTo, IsLessThanOrEqualToColumn, IsLessThanOrEqualToWithSubselect, IsLessThanWithSubselect, IsLike, IsLikeCaseInsensitive, IsNotBetween, IsNotEqualTo, IsNotEqualToColumn, IsNotEqualToWithSubselect, IsNotIn, IsNotInCaseInsensitive, IsNotInWithSubselect, IsNotLike, IsNotLikeCaseInsensitive, IsNotNull, IsNull
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface VisitableCondition<T>
  • Method Details

    • accept

      <R> R accept(ConditionVisitor<T,R> visitor)
    • shouldRender

      default boolean shouldRender(RenderingContext renderingContext)
      Subclasses can override this to inform the renderer if the condition should not be included in the rendered SQL. Typically, conditions will not render if they are empty.
      Returns:
      true if the condition should render.
    • isEmpty

      default boolean isEmpty()
      Subclasses can override this to indicate whether the condition is considered empty. This is primarily used in map and filter operations - the map and filter functions will not be applied if the condition is empty.
      Returns:
      true if the condition is empty.
    • renderingSkipped

      default void renderingSkipped()
      This method will be called during rendering when shouldRender(RenderingContext) returns false.
    • overrideRenderedLeftColumn

      default String overrideRenderedLeftColumn(String renderedLeftColumn)
      This method is called during rendering. Its purpose is to allow conditions to change the value of the rendered left column. This is primarily used in the case-insensitive conditions where we surround the rendered column with "upper(" and ")".
      Parameters:
      renderedLeftColumn - the rendered left column
      Returns:
      the altered column - by default no change is applied