FileDocCategorySizeDatePackage
MatchMode.javaAPI DocHibernate 3.2.51722Sat Feb 12 00:19:50 GMT 2005org.hibernate.criterion

MatchMode

public abstract class MatchMode extends Object implements Serializable
Represents an strategy for matching strings using "like".
see
Example#enableLike(MatchMode)
author
Gavin King

Fields Summary
private final String
name
private static final Map
INSTANCES
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
public static final MatchMode
END
Match the end of the string to the pattern
public static final MatchMode
ANYWHERE
Match the pattern anywhere in the string
Constructors Summary
protected MatchMode(String name)


	   
		this.name=name;
	
Methods Summary
private java.lang.ObjectreadResolve()


	 
		INSTANCES.put( EXACT.name, EXACT );
		INSTANCES.put( END.name, END );
		INSTANCES.put( START.name, START );
		INSTANCES.put( ANYWHERE.name, ANYWHERE );
	
		return INSTANCES.get(name);
	
public abstract java.lang.StringtoMatchString(java.lang.String pattern)
convert the pattern, by appending/prepending "%"

public java.lang.StringtoString()

		return name;