Package st.orm

Record Class Match.Exact<T extends Data>

java.lang.Object
java.lang.Record
st.orm.Match.Exact<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.
ignoreCase - true to lower the column as well as the word.
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.Exact<T extends Data>(Metamodel<T extends Data,String> path, int minLength, boolean ignoreCase, @Nullable Match<T extends Data> fallback) extends Record implements Match<T>
A word matches the whole value. With the column bare and the word lowered, column = 'word', an ordinary index over the column serves it, and the column compares case-insensitively on its own, through its collation or as a stored lowered column. Ignoring case, LOWER(column) = LOWER('word'), the column is lowered too, which an index over LOWER(column) serves, the index of a match anywhere or at a word start included.
  • Constructor Details

    • Exact

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

      public Exact(Metamodel<T,String> path, int minLength, boolean ignoreCase)
      A match without a fallback, its own form being narrow.
      Parameters:
      path - the text column.
      minLength - the shortest word, in characters, by which the column takes the words in its form.
      ignoreCase - true to lower the column as well as the word.
    • Exact

      public Exact(Metamodel<T,String> path, int minLength)
      A match on the bare column without a fallback.
      Parameters:
      path - the text column.
      minLength - the shortest word, in characters, by which the column takes the words in its form.
    • Exact

      public Exact(Metamodel<T,String> path)
      A match on the bare column of the default length, 2<T extends Data> characters, without a 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
    • ignoreCase

      public boolean ignoreCase()
      Returns the value of the ignoreCase record component.
      Returns:
      the value of the ignoreCase 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