A nested AND/OR block within a Hibernate criteria query, created by calling conjunction() or disjunction() on a BaseCriteriaBuilder. Restrictions added via the inherited methods (eq, like, in, and so on) are combined with each other using the junction's operator and added as a single restriction to the query that created this block.

Group: Builders

Extends: BaseCriteriaBuilder


Inherited from BaseCriteriaBuilder

Methods

likeStartsWith(String propertyName, Object value) · likeAnywhere(String propertyName, Object value) · ilikeAnywhere(String propertyName, Object value) · ilikeStartsWith(String propertyName, Object value) · ilike(String propertyName, Object value) · eq(String propertyName, Object value) · ne(String propertyName, Object value) · ge(String propertyName, Object value) · gt(String propertyName, Object value) · le(String propertyName, Object value) · lt(String propertyName, Object value) · isNull(String propertyName) · isNotNull(String propertyName) · in(String propertyName, Collection value) · in(String propertyName, Object[] value) · nin(String propertyName, Object[] value) · nin(String propertyName, Collection value) · conjunction() · disjunction()

likeStartsWith(String propertyName, Object value)

Returns: BaseCriteriaBuilder

Adds a case-sensitive "starts with" restriction, matching values of the property that begin with the given value.

ParameterDescription
propertyNamethe name of the property to match on
valuethe value to match at the start of the property; converted to a string before matching

likeAnywhere(String propertyName, Object value)

Returns: BaseCriteriaBuilder

Adds a case-sensitive "contains" restriction, matching values of the property that contain the given value anywhere in the string.

ParameterDescription
propertyNamethe name of the property to match on
valuethe value to search for within the property; converted to a string before matching

ilikeAnywhere(String propertyName, Object value)

Returns: BaseCriteriaBuilder

Adds a case-insensitive "contains" restriction, matching values of the property that contain the given value anywhere in the string, regardless of case.

ParameterDescription
propertyNamethe name of the property to match on
valuethe value to search for within the property; converted to a string before matching

ilikeStartsWith(String propertyName, Object value)

Returns: BaseCriteriaBuilder

Adds a case-insensitive "starts with" restriction, matching values of the property that begin with the given value, regardless of case.

ParameterDescription
propertyNamethe name of the property to match on
valuethe value to match at the start of the property; converted to a string before matching

ilike(String propertyName, Object value)

Returns: BaseCriteriaBuilder

Adds a case-insensitive equality-style "like" restriction, similar to the Postgres ilike operator. Unlike ilikeAnywhere, no wildcard is implied around the value, so it behaves as a case-insensitive equality match unless the caller includes their own wildcard characters in the value.

ParameterDescription
propertyNamethe name of the property to match on
valuethe value to match against the property; converted to a string before matching

eq(String propertyName, Object value)

Returns: BaseCriteriaBuilder

Adds an equality restriction on the named property. Integer values are widened to Long first, because identifier properties are stored as Long and JS numeric values otherwise arrive as Integer.

ParameterDescription
propertyNamethe name of the property to match on
valuethe value the property must equal

ne(String propertyName, Object value)

Returns: BaseCriteriaBuilder

Adds a not-equal restriction on the named property. Integer values are widened to Long first, because identifier properties are stored as Long and JS numeric values otherwise arrive as Integer.

ParameterDescription
propertyNamethe name of the property to match on
valuethe value the property must not equal

ge(String propertyName, Object value)

Returns: BaseCriteriaBuilder

Adds a "greater than or equal to" restriction on the named property. Integer values are widened to Long first, because identifier properties are stored as Long and JS numeric values otherwise arrive as Integer.

ParameterDescription
propertyNamethe name of the property to match on
valuethe lower bound the property must meet or exceed

gt(String propertyName, Object value)

Returns: BaseCriteriaBuilder

Adds a "greater than" restriction on the named property. Integer values are widened to Long first, because identifier properties are stored as Long and JS numeric values otherwise arrive as Integer.

ParameterDescription
propertyNamethe name of the property to match on
valuethe lower bound the property must exceed

le(String propertyName, Object value)

Returns: BaseCriteriaBuilder

Adds a "less than or equal to" restriction on the named property. Integer values are widened to Long first, because identifier properties are stored as Long and JS numeric values otherwise arrive as Integer.

ParameterDescription
propertyNamethe name of the property to match on
valuethe upper bound the property must meet or fall below

lt(String propertyName, Object value)

Returns: BaseCriteriaBuilder

Adds a "less than" restriction on the named property. Integer values are widened to Long first, because identifier properties are stored as Long and JS numeric values otherwise arrive as Integer.

ParameterDescription
propertyNamethe name of the property to match on
valuethe upper bound the property must fall below

isNull(String propertyName)

Returns: BaseCriteriaBuilder

Adds a restriction that the named property must be null.

ParameterDescription
propertyNamethe name of the property to check

isNotNull(String propertyName)

Returns: BaseCriteriaBuilder

Adds a restriction that the named property must not be null.

ParameterDescription
propertyNamethe name of the property to check

in(String propertyName, Collection value)

Returns: BaseCriteriaBuilder

Adds a restriction that the named property must equal one of the values in the given collection. Integer values are widened to Long first, because identifier properties are stored as Long and JS numeric values otherwise arrive as Integer.

ParameterDescription
propertyNamethe name of the property to match on
valuethe collection of allowed values; must not be null

in(String propertyName, Object[] value)

Returns: BaseCriteriaBuilder

Adds a restriction that the named property must equal one of the values in the given array. Integer values are widened to Long first, because identifier properties are stored as Long and JS numeric values otherwise arrive as Integer.

ParameterDescription
propertyNamethe name of the property to match on
valuethe array of allowed values; must not be null

nin(String propertyName, Object[] value)

Returns: BaseCriteriaBuilder

Adds a restriction that the named property must not equal any of the values in the given array.

ParameterDescription
propertyNamethe name of the property to match on
valuethe array of disallowed values

nin(String propertyName, Collection value)

Returns: BaseCriteriaBuilder

Adds a restriction that the named property must not equal any of the values in the given collection.

ParameterDescription
propertyNamethe name of the property to match on
valuethe collection of disallowed values

conjunction()

Returns: JunctionCriteriaBuilder

Starts a nested AND block: restrictions added to the returned builder are combined with each other using AND, and the whole block is added as a single restriction to this builder.

disjunction()

Returns: JunctionCriteriaBuilder

Starts a nested OR block: restrictions added to the returned builder are combined with each other using OR, and the whole block is added as a single restriction to this builder.

To get full access to the Kademi Hub existing customers can login here, or new customers can register here.