Top Description Fields Constructors Methods
org.hibernate.query.criteria.internal.predicate

public Class LikePredicate

extends AbstractSimplePredicate
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable
Imports
java.io.Serializable, javax.persistence.criteria.Expression, org.hibernate.query.criteria.internal.CriteriaBuilderImpl, .ParameterRegistry, .Renderable, org.hibernate.query.criteria.internal.compile.RenderingContext, org.hibernate.query.criteria.internal.expression.LiteralExpression

Models a SQL LIKE expression.
Author
Steve Ebersole

Field Summary

Modifier and TypeField and Description
private final Expression<Character>
private final Expression<String>
private final Expression<String>

Constructor Summary

AccessConstructor and Description
public
LikePredicate(CriteriaBuilderImpl criteriaBuilder, Expression<String> matchExpression, Expression<String> pattern)

public
LikePredicate(CriteriaBuilderImpl criteriaBuilder, Expression<String> matchExpression, String pattern)

public
LikePredicate(CriteriaBuilderImpl criteriaBuilder, Expression<String> matchExpression, Expression<String> pattern, Expression<Character> escapeCharacter)

public
LikePredicate(CriteriaBuilderImpl criteriaBuilder, Expression<String> matchExpression, Expression<String> pattern, char escapeCharacter)

public
LikePredicate(CriteriaBuilderImpl criteriaBuilder, Expression<String> matchExpression, String pattern, char escapeCharacter)

public
LikePredicate(CriteriaBuilderImpl criteriaBuilder, Expression<String> matchExpression, String pattern, Expression<Character> escapeCharacter)

Method Summary

Modifier and TypeMethod and Description
public Expression<Character>
public Expression<String>
public Expression<String>
public void
registerParameters(ParameterRegistry
The parameter registry with which to register.
registry
)

Implements org.hibernate.query.criteria.internal.ParameterContainer.registerParameters.

Register any parameters contained within this query component with the given registry.
public String
render(boolean
Should the predicate be negated.
isNegated
,
RenderingContext
The context for rendering
renderingContext
)

Implements org.hibernate.query.criteria.internal.predicate.PredicateImplementor.render.

Form of Renderable#render used when the predicate is wrapped in a negated wrapper.
Inherited from org.hibernate.query.criteria.internal.predicate.AbstractSimplePredicate:
getExpressionsgetOperatorisJunctionrender

Field Detail

escapeCharacterback to summary
private final Expression<Character> escapeCharacter
matchExpressionback to summary
private final Expression<String> matchExpression
patternback to summary
private final Expression<String> pattern

Constructor Detail

LikePredicateback to summary
public LikePredicate(CriteriaBuilderImpl criteriaBuilder, Expression<String> matchExpression, Expression<String> pattern)
LikePredicateback to summary
public LikePredicate(CriteriaBuilderImpl criteriaBuilder, Expression<String> matchExpression, String pattern)
LikePredicateback to summary
public LikePredicate(CriteriaBuilderImpl criteriaBuilder, Expression<String> matchExpression, Expression<String> pattern, Expression<Character> escapeCharacter)
LikePredicateback to summary
public LikePredicate(CriteriaBuilderImpl criteriaBuilder, Expression<String> matchExpression, Expression<String> pattern, char escapeCharacter)
LikePredicateback to summary
public LikePredicate(CriteriaBuilderImpl criteriaBuilder, Expression<String> matchExpression, String pattern, char escapeCharacter)
LikePredicateback to summary
public LikePredicate(CriteriaBuilderImpl criteriaBuilder, Expression<String> matchExpression, String pattern, Expression<Character> escapeCharacter)

Method Detail

getEscapeCharacterback to summary
public Expression<Character> getEscapeCharacter()
getMatchExpressionback to summary
public Expression<String> getMatchExpression()
getPatternback to summary
public Expression<String> getPattern()
registerParametersback to summary
public void registerParameters(ParameterRegistry registry)

Implements org.hibernate.query.criteria.internal.ParameterContainer.registerParameters.

Doc from org.hibernate.query.criteria.internal.ParameterContainer.registerParameters.

Register any parameters contained within this query component with the given registry.

Parameters
registry:ParameterRegistry

The parameter registry with which to register.

renderback to summary
public String render(boolean isNegated, RenderingContext renderingContext)

Implements org.hibernate.query.criteria.internal.predicate.PredicateImplementor.render.

Doc from org.hibernate.query.criteria.internal.predicate.PredicateImplementor.render.

Form of Renderable#render used when the predicate is wrapped in a negated wrapper. Allows passing down the negation flag.

Note that this form is no-op in compound (junction) predicates. The reason being that compound predicates are more complex and the negation is applied during its creation.

Parameters
isNegated:boolean

Should the predicate be negated.

renderingContext:RenderingContext

The context for rendering

Returns:String

The rendered predicate fragment.

Annotations
@Override