java.lang.Object | |
↳ | org.hibernate.criterion.Example |
Support for query by 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.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Example.PropertySelector | A strategy for choosing property values for inclusion in the query criteria |
Protected Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Create a new instance, which includes all non-null properties
by default
| |||||||||||
Use the "like" operator for all string-valued properties
| |||||||||||
Use the "like" operator for all string-valued properties
| |||||||||||
Don't exclude null or zero-valued properties
| |||||||||||
Exclude a particular named property
| |||||||||||
Exclude zero-valued properties
| |||||||||||
Return typed values for all parameters in the rendered SQL fragment
| |||||||||||
Ignore case for all string-valued properties
| |||||||||||
Set escape character for "like" clause
| |||||||||||
Set the property selector
| |||||||||||
Render the SQL fragment
| |||||||||||
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
org.hibernate.criterion.Criterion
|
Create a new instance, which includes all non-null properties by default
Use the "like" operator for all string-valued properties
Return typed values for all parameters in the rendered SQL fragment
criteria | The local criteria |
---|---|
criteriaQuery | The overal criteria query |
HibernateException |
---|
Set escape character for "like" clause
Render the SQL fragment
criteria | The local criteria |
---|---|
criteriaQuery | The overal criteria query |
HibernateException |
---|
HibernateException |
---|
HibernateException |
---|
HibernateException |
---|