Package st.orm

Record Class Match.Anywhere<T extends Data>

java.lang.Object
java.lang.Record
st.orm.Match.Anywhere<T>
Type Parameters:
T - the root table type of the column.
Record Components:
path - the text column.
minLength - the shortest word, in characters, by which the column takes the words in its form.
fallback - the match of the whole input while no word reaches the length, or null for none; its own fallback takes no part.
All Implemented Interfaces:
Match<T>
Enclosing interface:
Match<T extends Data>

public static record Match.Anywhere<T extends Data>(Metamodel<T extends Data,String> path, int minLength, @Nullable Match<T extends Data> fallback) extends Record implements Match<T>
A word matches anywhere in the value: LOWER(column) LIKE LOWER('%word%').
  • Constructor Details

    • Anywhere

      public Anywhere(Metamodel<T,String> path, int minLength, @Nullable Match<T> fallback)
      Creates an instance of a Anywhere record class.
      Parameters:
      path - the value for the path record component
      minLength - the value for the minLength record component
      fallback - the value for the fallback record component
    • Anywhere

      public Anywhere(Metamodel<T,String> path, int minLength)
      A match with the default fallback, the start of the value, ignoring case.
      Parameters:
      path - the text column.
      minLength - the shortest word, in characters, by which the column takes the words in its form.
    • Anywhere

      public Anywhere(Metamodel<T,String> path)
      A match of the default length, 3<T extends Data> characters, with the default fallback.
      Parameters:
      path - the text column.
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • path

      public Metamodel<T,String> path()
      Returns the value of the path record component.
      Specified by:
      path in interface Match<T extends Data>
      Returns:
      the value of the path record component
    • minLength

      public int minLength()
      Returns the value of the minLength record component.
      Specified by:
      minLength in interface Match<T extends Data>
      Returns:
      the value of the minLength record component
    • fallback

      public @Nullable Match<T> fallback()
      Returns the value of the fallback record component.
      Specified by:
      fallback in interface Match<T extends Data>
      Returns:
      the value of the fallback record component