Package org.hibernate.query.criteria
Interface JpaJsonValueNode<T>
- All Known Subinterfaces:
JpaJsonValueExpression<T>
- All Known Implementing Classes:
SqmJsonValueExpression
The base for
json_value
function nodes.- Since:
- 7.0
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enum
The behavior of the json value expression when a JSON path does not resolve for a JSON document.static enum
The behavior of the json value expression when a JSON processing error occurs. -
Method Summary
Modifier and TypeMethodDescriptiondefaultOnEmpty
(Expression<?> expression) Sets theJpaJsonValueNode.EmptyBehavior.DEFAULT
for this json value expression.defaultOnError
(Expression<?> expression) Sets theJpaJsonValueNode.ErrorBehavior.DEFAULT
for this json value expression.Sets theJpaJsonValueNode.EmptyBehavior.ERROR
for this json value expression.Sets theJpaJsonValueNode.ErrorBehavior.ERROR
for this json value expression.Get theJpaJsonValueNode.EmptyBehavior
of this json value expression.@Nullable JpaExpression<T>
Get theJpaExpression
that is returned when the JSON path does not resolve for a JSON document.Get theJpaJsonValueNode.ErrorBehavior
of this json value expression.@Nullable JpaExpression<T>
Get theJpaExpression
that is returned on a json processing error.Sets theJpaJsonValueNode.EmptyBehavior.NULL
for this json value expression.Sets theJpaJsonValueNode.ErrorBehavior.NULL
for this json value expression.Sets theJpaJsonValueNode.EmptyBehavior.UNSPECIFIED
for this json value expression.Sets theJpaJsonValueNode.ErrorBehavior.UNSPECIFIED
for this json value expression.
-
Method Details
-
getErrorBehavior
JpaJsonValueNode.ErrorBehavior getErrorBehavior()Get theJpaJsonValueNode.ErrorBehavior
of this json value expression.- Returns:
- the error behavior
-
getEmptyBehavior
JpaJsonValueNode.EmptyBehavior getEmptyBehavior()Get theJpaJsonValueNode.EmptyBehavior
of this json value expression.- Returns:
- the empty behavior
-
getErrorDefault
@Nullable JpaExpression<T> getErrorDefault()Get theJpaExpression
that is returned on a json processing error. Returnsnull
ifgetErrorBehavior()
is notJpaJsonValueNode.ErrorBehavior.DEFAULT
.- Returns:
- the value to return on a json processing error
-
getEmptyDefault
@Nullable JpaExpression<T> getEmptyDefault()Get theJpaExpression
that is returned when the JSON path does not resolve for a JSON document. Returnsnull
ifgetEmptyBehavior()
is notJpaJsonValueNode.EmptyBehavior.DEFAULT
.- Returns:
- the value to return on a json processing error
-
unspecifiedOnError
JpaJsonValueNode<T> unspecifiedOnError()Sets theJpaJsonValueNode.ErrorBehavior.UNSPECIFIED
for this json value expression.- Returns:
this
for method chaining
-
errorOnError
JpaJsonValueNode<T> errorOnError()Sets theJpaJsonValueNode.ErrorBehavior.ERROR
for this json value expression.- Returns:
this
for method chaining
-
nullOnError
JpaJsonValueNode<T> nullOnError()Sets theJpaJsonValueNode.ErrorBehavior.NULL
for this json value expression.- Returns:
this
for method chaining
-
defaultOnError
Sets theJpaJsonValueNode.ErrorBehavior.DEFAULT
for this json value expression.- Returns:
this
for method chaining
-
unspecifiedOnEmpty
JpaJsonValueNode<T> unspecifiedOnEmpty()Sets theJpaJsonValueNode.EmptyBehavior.UNSPECIFIED
for this json value expression.- Returns:
this
for method chaining
-
errorOnEmpty
JpaJsonValueNode<T> errorOnEmpty()Sets theJpaJsonValueNode.EmptyBehavior.ERROR
for this json value expression.- Returns:
this
for method chaining
-
nullOnEmpty
JpaJsonValueNode<T> nullOnEmpty()Sets theJpaJsonValueNode.EmptyBehavior.NULL
for this json value expression.- Returns:
this
for method chaining
-
defaultOnEmpty
Sets theJpaJsonValueNode.EmptyBehavior.DEFAULT
for this json value expression.- Returns:
this
for method chaining
-