Class Like
- java.lang.Object
-
- org.omnifaces.persistence.criteria.Criteria<String>
-
- org.omnifaces.persistence.criteria.Like
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.omnifaces.persistence.criteria.Criteria
Criteria.ParameterBuilder
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
applies(Object modelValue)
Returns whether this criteria value would apply to the given model value.Predicate
build(Expression<?> path, CriteriaBuilder criteriaBuilder, Criteria.ParameterBuilder parameterBuilder)
Returns a predicate for the criteria value.boolean
contains()
static Like
contains(String value)
boolean
endsWith()
static Like
endsWith(String value)
boolean
equals(Object object)
int
hashCode()
boolean
startsWith()
static Like
startsWith(String value)
String
toString()
-
-
-
Method Detail
-
startsWith
public boolean startsWith()
-
endsWith
public boolean endsWith()
-
contains
public boolean contains()
-
build
public Predicate build(Expression<?> path, CriteriaBuilder criteriaBuilder, Criteria.ParameterBuilder parameterBuilder)
Description copied from class:Criteria
Returns a predicate for the criteria value. Below is an example implementation:return criteriaBuilder.equal(path, parameterBuilder.create(getValue()));
- Specified by:
build
in classCriteria<String>
- Parameters:
path
- Entity property path. You can use this to inspect the target entity property.criteriaBuilder
- So you can build a predicate with aParameterExpression
.parameterBuilder
- You must use this to create aParameterExpression
for the criteria value.- Returns:
- A predicate for the criteria value.
-
applies
public boolean applies(Object modelValue)
Description copied from class:Criteria
Returns whether this criteria value would apply to the given model value. This must basically represent the "plain Java" equivalent of the SQL behavior as achieved byCriteria.build(Expression, CriteriaBuilder, ParameterBuilder)
.
-
-