java.lang.Object
java.lang.Record
st.orm.Match.WordStart<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, ornullfor none; its own fallback takes no part.
- All Implemented Interfaces:
Match<T>
public static record Match.WordStart<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 at the start of any word in the value: the value's start, or the text after a space or one of
the punctuation characters that join or separate the words of a name, a hyphen, an apostrophe, an
opening parenthesis, a slash, a colon, a period or a comma, so
marie matches "Anne-Marie" and
brien "O'Brien". It renders as LOWER(column) LIKE LOWER('word%') and one
LOWER(column) LIKE LOWER('% word%') per separator, or as the one regular expression a database
matches, and finds the same rows on every database.-
Nested Class Summary
Nested classes/interfaces inherited from interface st.orm.Match
Match.Anywhere<T extends Data>, Match.Exact<T extends Data>, Match.Prefix<T extends Data>, Match.WordStart<T extends Data> -
Field Summary
Fields inherited from interface st.orm.Match
DEFAULT_MIN_LENGTH, DEFAULT_VALUE_MIN_LENGTH -
Constructor Summary
ConstructorsConstructorDescriptionA match with the default fallback, the start of the value, ignoring case.Creates an instance of aWordStartrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.fallback()Returns the value of thefallbackrecord component.final inthashCode()Returns a hash code value for this object.intReturns the value of theminLengthrecord component.path()Returns the value of thepathrecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface st.orm.Match
withFallback, withFallback, withoutFallback
-
Constructor Details
-
WordStart
Creates an instance of aWordStartrecord class. -
WordStart
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.
-
WordStart
- Parameters:
path- the text column.
-
-
Method Details
-
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. -
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. -
equals
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 withObjects::equals(Object,Object); primitive components are compared with '=='. -
path
Returns the value of thepathrecord component. -
minLength
public int minLength()Returns the value of theminLengthrecord component. -
fallback
Returns the value of thefallbackrecord component.
-