Class AbstractTwoValueCondition<T>

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.util.function.Supplier<T> valueSupplier1  
      protected java.util.function.Supplier<T> valueSupplier2  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected AbstractTwoValueCondition​(java.util.function.Supplier<T> valueSupplier1, java.util.function.Supplier<T> valueSupplier2)  
      protected AbstractTwoValueCondition​(java.util.function.Supplier<T> valueSupplier1, java.util.function.Supplier<T> valueSupplier2, java.util.function.BiPredicate<T,​T> predicate)  
    • Method Summary

      Modifier and Type Method Description
      <R> R accept​(ConditionVisitor<T,​R> visitor)  
      abstract java.lang.String renderCondition​(java.lang.String columnName, java.lang.String placeholder1, java.lang.String placeholder2)  
      boolean shouldRender()
      Subclasses can override this to inform the renderer if the condition should not be included in the rendered SQL.
      T value1()  
      T value2()  
      • Methods inherited from class java.lang.Object

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

      • valueSupplier1

        protected java.util.function.Supplier<T> valueSupplier1
      • valueSupplier2

        protected java.util.function.Supplier<T> valueSupplier2
    • Constructor Detail

      • AbstractTwoValueCondition

        protected AbstractTwoValueCondition​(java.util.function.Supplier<T> valueSupplier1,
                                            java.util.function.Supplier<T> valueSupplier2)
      • AbstractTwoValueCondition

        protected AbstractTwoValueCondition​(java.util.function.Supplier<T> valueSupplier1,
                                            java.util.function.Supplier<T> valueSupplier2,
                                            java.util.function.BiPredicate<T,​T> predicate)
    • Method Detail

      • value1

        public T value1()
      • value2

        public T value2()
      • 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.
      • renderCondition

        public abstract java.lang.String renderCondition​(java.lang.String columnName,
                                                         java.lang.String placeholder1,
                                                         java.lang.String placeholder2)