Top Description Fields Constructors Methods
org.hibernate.criterion

public sealed Enum MatchMode

extends Enum<MatchMode>
Class Inheritance

Represents a strategy for matching strings using "like".
Author
Gavin King
See Also
Example#enableLike(MatchMode)

Field Summary

Modifier and TypeField and Description
public static final MatchMode
ANYWHERE

Match the pattern anywhere in the string

public static final MatchMode
END

Match the end of the string to the pattern

public static final MatchMode
EXACT

Match the entire string to the pattern

public static final MatchMode
START

Match the start of the string to the pattern

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public abstract String

Returns:

The converted pattern
toMatchString
(String
The pattern for convert according to the mode
pattern
)

Convert the pattern, by appending/prepending "%"

public static MatchMode
public static MatchMode[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

ANYWHEREback to summary
public static final MatchMode ANYWHERE

Match the pattern anywhere in the string

ENDback to summary
public static final MatchMode END

Match the end of the string to the pattern

EXACTback to summary
public static final MatchMode EXACT

Match the entire string to the pattern

STARTback to summary
public static final MatchMode START

Match the start of the string to the pattern

Constructor Detail

MatchModeback to summary
private MatchMode()

Method Detail

toMatchStringback to summary
public abstract String toMatchString(String pattern)

Convert the pattern, by appending/prepending "%"

Parameters
pattern:String

The pattern for convert according to the mode

Returns:String

The converted pattern

valueOfback to summary
public static MatchMode valueOf(String name)
valuesback to summary
public static MatchMode[] values()