org.apache.ojb.broker.query
Class LikeCriteria
java.lang.Object
org.apache.ojb.broker.query.SelectionCriteria
org.apache.ojb.broker.query.ValueCriteria
org.apache.ojb.broker.query.LikeCriteria
- All Implemented Interfaces:
- Serializable
public class LikeCriteria
- extends ValueCriteria
Model a Like Criteria
Escape Processing by Paul R. Nase
The pattern string is a simple pattern string using % or * as a wildcard.
So Ander* would match Anderson and Anderton. The _ or ? character is used to match a single occurence
of a character. The '\' is used to escape the wildcard characters so that we can search for
strings containing * and ?.
To change the escape character use setEscapeCharacter.
- Version:
- $Id: LikeCriteria.java,v 1.1 2007-08-24 22:17:36 ewestfal Exp $
- Author:
- Jakob Braeuchi , Paul Nase
- See Also:
setEscapeCharacter(char),
Serialized Form
| Fields inherited from class org.apache.ojb.broker.query.SelectionCriteria |
BETWEEN, EQUAL, GREATER, IN, IS_NULL, LESS, LIKE, NOT_BETWEEN, NOT_EQUAL, NOT_GREATER, NOT_IN, NOT_IS_NULL, NOT_LESS, NOT_LIKE |
| Methods inherited from class org.apache.ojb.broker.query.SelectionCriteria |
getAlias, getAttribute, getClassesForPath, getCriteria, getNumberOfExtentsToBind, getPathClasses, getQuery, getUserAlias, getValue, isBindable, isBound, isTranslateAttribute, setAlias, setAlias, setAlias, setBound, setNumberOfExtentsToBind, setValue, toString |
DEFAULT_ESCPAPE_CHARACTER
public static final char DEFAULT_ESCPAPE_CHARACTER
- The Dfault-Character used for Escaping Wildcards
- See Also:
- Constant Field Values
LikeCriteria
public LikeCriteria(Object anAttribute,
Object aValue,
String aClause,
String anAlias)
- Parameters:
anAttribute - aValue - aClause - anAlias -
LikeCriteria
public LikeCriteria(Object anAttribute,
Object aValue,
String aClause,
UserAlias anAlias)
- Parameters:
anAttribute - aValue - aClause - anAlias -
bind
public void bind(Object newValue)
- Description copied from class:
SelectionCriteria
- sets the value of the criteria to newValue. Used by the ODMG OQLQuery.bind() operation
- Overrides:
bind in class SelectionCriteria
- See Also:
SelectionCriteria.bind(java.lang.Object)
getEscapeCharacter
public static char getEscapeCharacter()
- Returns:
- Returns the escapeCharacter.
setEscapeCharacter
public static void setEscapeCharacter(char escChar)
- Global change of the escapeCharacter
- Parameters:
escChar - The escapeCharacter to set.
Copyright © 2004-2012 The Kuali Foundation. All Rights Reserved.