Class MatchMode

java.lang.Object
org.hibernate.criterion.MatchMode
All Implemented Interfaces:
Serializable

public abstract class MatchMode extends Object implements Serializable
Represents an strategy for matching strings using "like".
See Also:
  • Field Details

    • EXACT

      public static final MatchMode EXACT
      Match the entire string to the pattern
    • START

      public static final MatchMode START
      Match the start of the string to the pattern
    • END

      public static final MatchMode END
      Match the end of the string to the pattern
    • ANYWHERE

      public static final MatchMode ANYWHERE
      Match the pattern anywhere in the string
  • Constructor Details

    • MatchMode

      protected MatchMode(String name)
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toMatchString

      public abstract String toMatchString(String pattern)
      convert the pattern, by appending/prepending "%"