net.sourceforge.openutils.mgnlcriteria.jcr.query.criterion
Class MatchMode

java.lang.Object
  extended by net.sourceforge.openutils.mgnlcriteria.jcr.query.criterion.MatchMode
All Implemented Interfaces:
Serializable

public abstract class MatchMode
extends Object
implements Serializable

Represents an strategy for matching strings using "like".

Author:
Federico Grilli
See Also:
Serialized Form

Field Summary
static MatchMode ANYWHERE
          Match the pattern anywhere in the string
static MatchMode END
          Match the end of the string to the pattern
static MatchMode START
          Match the start of the string to the pattern
 
Constructor Summary
protected MatchMode(String name)
           
 
Method Summary
abstract  String toMatchString(String pattern)
          convert the pattern, by appending/prepending "%"
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

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 Detail

MatchMode

protected MatchMode(String name)
Method Detail

toString

public String toString()
Overrides:
toString in class Object

toMatchString

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

Parameters:
pattern - input pattern
Returns:
formatted match string


Copyright © 2009-2010 Openmind. All Rights Reserved.