Class ParsingFragment<T extends DataType>

  • Type Parameters:
    T - The type of the fragment.
    All Implemented Interfaces:
    Expression<T>, ExpressionFragment<T>

    @API(EXPERIMENTAL)
    public class ParsingFragment<T extends DataType>
    extends java.lang.Object
    implements ExpressionFragment<T>
    This represents an opaque query fragment, this is usually used in two situations.
    • Building structured query from a given SQL statement: the builder uses ParsingFragment to save chunks of the query string without going deeper into processing them and modelling them into a corresponding Expression<?> tree, this is required to capture expressions that can not be represented at compile time such as complex boolean expression trees in where clause, or to "glance over" certain parts of the query that are irrelevant for the builder for performance reasons.
    • Query decoration: The user wants to decorate the query with expressions not (yet) supported by the ExpressionFactory.
    • Constructor Detail

      • ParsingFragment

        public ParsingFragment​(@Nonnull
                               T dataType,
                               @Nonnull
                               java.lang.String fragment)
    • Method Detail

      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object