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:
- java.io.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.6 2004/02/23 12:12:46 thma 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, serialVersionUID |
Constructor Summary |
LikeCriteria(java.lang.Object anAttribute,
java.lang.Object aValue,
java.lang.String aClause,
java.lang.String anAlias)
|
Methods inherited from class org.apache.ojb.broker.query.ValueCriteria |
buildBeweenCriteria, buildEqualToCriteria, buildGreaterCriteria, buildInCriteria, buildLessCriteria, buildLikeCriteria, buildNotBeweenCriteria, buildNotEqualToCriteria, buildNotGreaterCriteria, buildNotInCriteria, buildNotLessCriteria, buildNotLikeCriteria, buildNotNullCriteria, buildNullCriteria, getClause |
Methods inherited from class org.apache.ojb.broker.query.SelectionCriteria |
bind, getAlias, getAttribute, getCriteria, getNumberOfExtentsToBind, getQuery, getValue, isBindable, isBound, isTranslateAttribute, setAlias, setBound, setCriteria, setNumberOfExtentsToBind, setTranslateAttribute, setValue, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
LikeCriteria
public LikeCriteria(java.lang.Object anAttribute,
java.lang.Object aValue,
java.lang.String aClause,
java.lang.String anAlias)
- Parameters:
anAttribute
- aValue
- aClause
- anAlias
-
getEscapeCharacter
public static char getEscapeCharacter()
- Returns:
- Returns the escapeCharacter.
setEscapeCharacter
public static void setEscapeCharacter(char escapeCharacter)
- Global change of the escapeCharacter
- Parameters:
escapeCharacter
- The escapeCharacter to set.
Authors: Thomas Mahler and others. (C) 2000 - 2003 Apache Software Foundation
All rights reserved. Published under the Apache License.
http://db.apache.org/ojb
Version: 1.0.rc5, 2003-12-14