Class SqmJsonTableFunction<T>
java.lang.Object
org.hibernate.query.sqm.tree.AbstractSqmNode
org.hibernate.query.sqm.tree.expression.SqmSetReturningFunction<T>
org.hibernate.query.sqm.function.SelfRenderingSqmSetReturningFunction<T>
org.hibernate.query.sqm.tree.expression.SqmJsonTableFunction<T>
- All Implemented Interfaces:
Serializable
,JpaCriteriaNode
,JpaJsonTableColumnsNode
,JpaJsonTableFunction
,JpaSetReturningFunction<T>
,SqmNode
,SqmVisitableNode
public class SqmJsonTableFunction<T>
extends SelfRenderingSqmSetReturningFunction<T>
implements JpaJsonTableFunction
- Since:
- 7.0
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface org.hibernate.query.criteria.JpaJsonTableFunction
JpaJsonTableFunction.ErrorBehavior
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionSqmJsonTableFunction
(SqmSetReturningFunctionDescriptor descriptor, SetReturningFunctionRenderer renderer, @Nullable ArgumentsValidator argumentsValidator, SetReturningFunctionTypeResolver setReturningTypeResolver, NodeBuilder nodeBuilder, SqmExpression<?> document, @Nullable SqmExpression<String> jsonPath) -
Method Summary
Modifier and TypeMethodDescriptioncopy
(SqmCopyContext context) protected @Nullable JsonPathPassingClause
Sets theJpaJsonTableFunction.ErrorBehavior.ERROR
for this json table expression.existsColumn
(String columnName) LikeJpaJsonTableColumnsNode.existsColumn(String, String)
, but uses the column name as JSON path expression.existsColumn
(String columnName, @Nullable String jsonPath) Defines a boolean column on the result type with the given name for which the value can be obtained by invokingjson_exists
with the given JSON path.Get theJpaJsonTableFunction.ErrorBehavior
of this json table expression.Map<String,
SqmExpression<?>> Defines nested columns that are accessible by the given JSON path.Sets theJpaJsonTableFunction.ErrorBehavior.NULL
for this json table expression.ordinalityColumn
(String columnName) Defines a long typed column on the result type with the given name which is set to the ordinality i.e.passing
(String parameterName, Expression<?> expression) Passes the givenExpression
as value for the parameter with the given name in the JSON path.queryColumn
(String columnName) LikeJpaJsonTableColumnsNode.queryColumn(String, String)
, but uses the column name as JSON path expression.queryColumn
(String columnName, @Nullable String jsonPath) Defines a string column on the result type with the given name for which the value can be obtained by invokingjson_query
with the given JSON path.protected List<SqlAstNode>
resolveSqlAstArguments
(List<? extends SqmTypedNode<?>> sqmArguments, SqmToSqlAstConverter walker) Sets theJpaJsonTableFunction.ErrorBehavior.UNSPECIFIED
for this json table expression.<X> JpaJsonValueNode<X>
valueColumn
(String columnName, Class<X> type) LikeJpaJsonTableColumnsNode.valueColumn(String, Class, String)
but uses the column name as JSON path expression.<X> JpaJsonValueNode<X>
valueColumn
(String columnName, Class<X> type, String jsonPath) Defines a column on the result type with the given name and type for which the value can be obtained by the given JSON path expression.<X> JpaJsonValueNode<X>
valueColumn
(String columnName, JpaCastTarget<X> type) LikeJpaJsonTableColumnsNode.valueColumn(String, Class, String)
but uses the column name as JSON path expression.<X> JpaJsonValueNode<X>
valueColumn
(String columnName, JpaCastTarget<X> type, String jsonPath) Defines a column on the result type with the given name and type for which the value can be obtained by the given JSON path expression.Methods inherited from class org.hibernate.query.sqm.function.SelfRenderingSqmSetReturningFunction
convertToSqlAst, getArgumentsValidator, getFunctionRenderer, getSetReturningTypeResolver, getType, isTypeResolved
Methods inherited from class org.hibernate.query.sqm.tree.expression.SqmSetReturningFunction
accept, appendHqlString, getArguments, getFunctionDescriptor, getFunctionName
Methods inherited from class org.hibernate.query.sqm.tree.AbstractSqmNode
nodeBuilder
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.hibernate.query.sqm.tree.SqmNode
asLoggableText, nodeBuilder
Methods inherited from interface org.hibernate.query.sqm.tree.SqmVisitableNode
toHqlString
-
Constructor Details
-
SqmJsonTableFunction
public SqmJsonTableFunction(SqmSetReturningFunctionDescriptor descriptor, SetReturningFunctionRenderer renderer, @Nullable ArgumentsValidator argumentsValidator, SetReturningFunctionTypeResolver setReturningTypeResolver, NodeBuilder nodeBuilder, SqmExpression<?> document, @Nullable SqmExpression<String> jsonPath)
-
-
Method Details
-
getPassingExpressions
-
passing
Description copied from interface:JpaJsonTableFunction
Passes the givenExpression
as value for the parameter with the given name in the JSON path.- Specified by:
passing
in interfaceJpaJsonTableFunction
- Returns:
this
for method chaining
-
copy
- Specified by:
copy
in interfaceSqmNode
- Overrides:
copy
in classSelfRenderingSqmSetReturningFunction<T>
-
resolveSqlAstArguments
protected List<SqlAstNode> resolveSqlAstArguments(List<? extends SqmTypedNode<?>> sqmArguments, SqmToSqlAstConverter walker) - Overrides:
resolveSqlAstArguments
in classSelfRenderingSqmSetReturningFunction<T>
-
createJsonPathPassingClause
-
getErrorBehavior
Description copied from interface:JpaJsonTableFunction
Get theJpaJsonTableFunction.ErrorBehavior
of this json table expression.- Specified by:
getErrorBehavior
in interfaceJpaJsonTableFunction
- Returns:
- the error behavior
-
unspecifiedOnError
Description copied from interface:JpaJsonTableFunction
Sets theJpaJsonTableFunction.ErrorBehavior.UNSPECIFIED
for this json table expression.- Specified by:
unspecifiedOnError
in interfaceJpaJsonTableFunction
- Returns:
this
for method chaining
-
nullOnError
Description copied from interface:JpaJsonTableFunction
Sets theJpaJsonTableFunction.ErrorBehavior.NULL
for this json table expression.- Specified by:
nullOnError
in interfaceJpaJsonTableFunction
- Returns:
this
for method chaining
-
errorOnError
Description copied from interface:JpaJsonTableFunction
Sets theJpaJsonTableFunction.ErrorBehavior.ERROR
for this json table expression.- Specified by:
errorOnError
in interfaceJpaJsonTableFunction
- Returns:
this
for method chaining
-
existsColumn
Description copied from interface:JpaJsonTableColumnsNode
LikeJpaJsonTableColumnsNode.existsColumn(String, String)
, but uses the column name as JSON path expression.- Specified by:
existsColumn
in interfaceJpaJsonTableColumnsNode
- Returns:
- The
JpaJsonExistsNode
for the column
-
existsColumn
Description copied from interface:JpaJsonTableColumnsNode
Defines a boolean column on the result type with the given name for which the value can be obtained by invokingjson_exists
with the given JSON path.- Specified by:
existsColumn
in interfaceJpaJsonTableColumnsNode
- Returns:
- The
JpaJsonExistsNode
for the column
-
queryColumn
Description copied from interface:JpaJsonTableColumnsNode
LikeJpaJsonTableColumnsNode.queryColumn(String, String)
, but uses the column name as JSON path expression.- Specified by:
queryColumn
in interfaceJpaJsonTableColumnsNode
- Returns:
- The
JpaJsonQueryNode
for the column
-
queryColumn
Description copied from interface:JpaJsonTableColumnsNode
Defines a string column on the result type with the given name for which the value can be obtained by invokingjson_query
with the given JSON path.- Specified by:
queryColumn
in interfaceJpaJsonTableColumnsNode
- Returns:
- The
JpaJsonQueryNode
for the column
-
valueColumn
Description copied from interface:JpaJsonTableColumnsNode
LikeJpaJsonTableColumnsNode.valueColumn(String, Class, String)
but uses the column name as JSON path expression.- Specified by:
valueColumn
in interfaceJpaJsonTableColumnsNode
- Returns:
- The
JpaJsonValueNode
for the column
-
valueColumn
Description copied from interface:JpaJsonTableColumnsNode
Defines a column on the result type with the given name and type for which the value can be obtained by the given JSON path expression.- Specified by:
valueColumn
in interfaceJpaJsonTableColumnsNode
- Returns:
- The
JpaJsonValueNode
for the column
-
valueColumn
public <X> JpaJsonValueNode<X> valueColumn(String columnName, JpaCastTarget<X> type, String jsonPath) Description copied from interface:JpaJsonTableColumnsNode
Defines a column on the result type with the given name and type for which the value can be obtained by the given JSON path expression.- Specified by:
valueColumn
in interfaceJpaJsonTableColumnsNode
- Returns:
- The
JpaJsonValueNode
for the column
-
valueColumn
Description copied from interface:JpaJsonTableColumnsNode
LikeJpaJsonTableColumnsNode.valueColumn(String, Class, String)
but uses the column name as JSON path expression.- Specified by:
valueColumn
in interfaceJpaJsonTableColumnsNode
- Returns:
- The
JpaJsonValueNode
for the column
-
nested
Description copied from interface:JpaJsonTableColumnsNode
Defines nested columns that are accessible by the given JSON path.- Specified by:
nested
in interfaceJpaJsonTableColumnsNode
- Returns:
- a new columns node for the nested JSON path
-
ordinalityColumn
Description copied from interface:JpaJsonTableColumnsNode
Defines a long typed column on the result type with the given name which is set to the ordinality i.e. the 1-based position of the processed element. Ordinality starts again at 1 within nested paths.- Specified by:
ordinalityColumn
in interfaceJpaJsonTableColumnsNode
- Specified by:
ordinalityColumn
in interfaceJpaJsonTableFunction
- Returns:
this
for method chaining
-