Class AbstractListValueCondition<T>

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected boolean renderWhenEmpty  
      protected java.util.Collection<T> values  
      protected java.util.function.UnaryOperator<java.util.stream.Stream<T>> valueStreamTransformer  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected AbstractListValueCondition​(java.util.Collection<T> values)  
      protected AbstractListValueCondition​(java.util.Collection<T> values, java.util.function.UnaryOperator<java.util.stream.Stream<T>> valueStreamTransformer)  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      <R> R accept​(ConditionVisitor<T,​R> visitor)  
      protected void forceRenderingWhenEmpty()
      Use with caution - this could cause the library to render invalid SQL like "where column in ()".
      <R> java.util.stream.Stream<R> mapValues​(java.util.function.Function<T,​R> mapper)  
      abstract java.lang.String renderCondition​(java.lang.String columnName, java.util.stream.Stream<java.lang.String> placeholders)  
      boolean shouldRender()
      Subclasses can override this to inform the renderer if the condition should not be included in the rendered SQL.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • values

        protected final java.util.Collection<T> values
      • valueStreamTransformer

        protected final java.util.function.UnaryOperator<java.util.stream.Stream<T>> valueStreamTransformer
      • renderWhenEmpty

        protected boolean renderWhenEmpty
    • Constructor Detail

      • AbstractListValueCondition

        protected AbstractListValueCondition​(java.util.Collection<T> values)
      • AbstractListValueCondition

        protected AbstractListValueCondition​(java.util.Collection<T> values,
                                             java.util.function.UnaryOperator<java.util.stream.Stream<T>> valueStreamTransformer)
    • Method Detail

      • mapValues

        public final <R> java.util.stream.Stream<R> mapValues​(java.util.function.Function<T,​R> mapper)
      • shouldRender

        public boolean shouldRender()
        Description copied from interface: VisitableCondition
        Subclasses can override this to inform the renderer if the condition should not be included in the rendered SQL. For example, IsEqualWhenPresent will not render if the value is null.
        Specified by:
        shouldRender in interface VisitableCondition<T>
        Returns:
        true if the condition should render.
      • forceRenderingWhenEmpty

        protected void forceRenderingWhenEmpty()
        Use with caution - this could cause the library to render invalid SQL like "where column in ()".
      • renderCondition

        public abstract java.lang.String renderCondition​(java.lang.String columnName,
                                                         java.util.stream.Stream<java.lang.String> placeholders)