| Prev Class | Next Class | Frames | No Frames |
| Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Objectorg.hibernate.criterion.Example
List results = session.createCriteria(Parent.class)
.add( Example.create(parent).ignoreCase() )
.createCriteria("child")
.add( Example.create( parent.getChild() ) )
.list();
"Examples" may be mixed and matched with "Expressions" in the same Criteria.
CriteriaNested Class Summary | |
static interface |
|
Constructor Summary | |
| |
Method Summary | |
protected void |
|
protected void |
|
protected void |
|
protected void |
|
static Example |
|
Example |
|
Example |
|
Example |
|
Example |
|
Example |
|
TypedValue[] |
|
Example |
|
Example |
|
Example |
|
String |
|
String |
|
protected void addComponentTypedValues(String path,
Object component,
AbstractComponentType type,
List list,
Criteria criteria,
CriteriaQuery criteriaQuery)
throws HibernateExceptionprotected void appendComponentCondition(String path,
Object component,
AbstractComponentType type,
Criteria criteria,
CriteriaQuery criteriaQuery,
StringBuffer buf)
throws HibernateExceptionprotected void appendPropertyCondition(String propertyName,
Object propertyValue,
Criteria criteria,
CriteriaQuery cq,
StringBuffer buf)
throws HibernateExceptionpublic static Example create(Object entity)
Create a new instance, which includes all non-null properties by default
- Parameters:
entity-
- Returns:
- a new instance of Example
public Example enableLike(MatchMode matchMode)
Use the "like" operator for all string-valued properties
public TypedValue[] getTypedValues(Criteria criteria, CriteriaQuery criteriaQuery) throws HibernateException
- Specified by:
- getTypedValues in interface Criterion
public Example setEscapeCharacter(Character escapeCharacter)
Set escape character for "like" clause
public Example setPropertySelector(Example.PropertySelector selector)
Set the property selector
public String toSqlString(Criteria criteria, CriteriaQuery criteriaQuery) throws HibernateException
- Specified by:
- toSqlString in interface Criterion
public String toString()