Enum Class MatchMode

java.lang.Object
java.lang.Enum<MatchMode>
org.hibernate.envers.query.criteria.MatchMode
All Implemented Interfaces:
Serializable, Comparable<MatchMode>, Constable

public enum MatchMode extends Enum<MatchMode>
A strategy for matching strings using "like".
  • Enum Constant Details

    • EXACT

      public static final MatchMode EXACT
      Match the pattern exactly.
    • 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.
  • Method Details

    • values

      public static MatchMode[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static MatchMode valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • toMatchString

      public abstract String toMatchString(String pattern)
      Convert the pattern by prepending/append "%".
      Parameters:
      pattern - The pattern to convert according to the mode.
      Returns:
      The converted pattern.