remove deprecated FunctionRenderingSupport
This commit is contained in:
parent
f2f802645c
commit
58a6afe78d
|
@ -222,8 +222,6 @@ public abstract class AbstractSqmFunctionDescriptor implements SqmFunctionDescri
|
|||
* function descriptors that wish to customize creation of the node.
|
||||
*
|
||||
* @param arguments the arguments of the function invocation
|
||||
* @param respectNulls
|
||||
* @param fromFirst
|
||||
* @param impliedResultType the function return type as inferred from its usage
|
||||
*/
|
||||
protected <T> SelfRenderingSqmWindowFunction<T> generateSqmWindowFunctionExpression(
|
||||
|
|
|
@ -66,24 +66,24 @@ public abstract class AbstractSqmSelfRenderingFunctionDescriptor
|
|||
List<? extends SqmTypedNode<?>> arguments,
|
||||
ReturnableType<T> impliedResultType,
|
||||
QueryEngine queryEngine) {
|
||||
switch ( functionKind ) {
|
||||
case ORDERED_SET_AGGREGATE:
|
||||
return generateOrderedSetAggregateSqmExpression(
|
||||
return switch (functionKind) {
|
||||
case ORDERED_SET_AGGREGATE ->
|
||||
generateOrderedSetAggregateSqmExpression(
|
||||
arguments,
|
||||
null,
|
||||
null,
|
||||
impliedResultType,
|
||||
queryEngine
|
||||
);
|
||||
case AGGREGATE:
|
||||
return generateAggregateSqmExpression(
|
||||
case AGGREGATE ->
|
||||
generateAggregateSqmExpression(
|
||||
arguments,
|
||||
null,
|
||||
impliedResultType,
|
||||
queryEngine
|
||||
);
|
||||
case WINDOW:
|
||||
return generateWindowSqmExpression(
|
||||
case WINDOW ->
|
||||
generateWindowSqmExpression(
|
||||
arguments,
|
||||
null,
|
||||
null,
|
||||
|
@ -91,8 +91,8 @@ public abstract class AbstractSqmSelfRenderingFunctionDescriptor
|
|||
impliedResultType,
|
||||
queryEngine
|
||||
);
|
||||
default:
|
||||
return new SelfRenderingSqmFunction<>(
|
||||
default ->
|
||||
new SelfRenderingSqmFunction<>(
|
||||
this,
|
||||
this,
|
||||
arguments,
|
||||
|
@ -102,7 +102,7 @@ public abstract class AbstractSqmSelfRenderingFunctionDescriptor
|
|||
queryEngine.getCriteriaBuilder(),
|
||||
getName()
|
||||
);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -27,7 +27,7 @@ import org.hibernate.sql.ast.tree.select.SortSpecification;
|
|||
* @since 6.4
|
||||
*/
|
||||
@FunctionalInterface
|
||||
public interface FunctionRenderer extends FunctionRenderingSupport {
|
||||
public interface FunctionRenderer {
|
||||
/**
|
||||
* @deprecated Use {@link #render(SqlAppender, List, ReturnableType, SqlAstTranslator)} instead
|
||||
*/
|
||||
|
|
|
@ -1,90 +0,0 @@
|
|||
/*
|
||||
* Hibernate, Relational Persistence for Idiomatic Java
|
||||
*
|
||||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later
|
||||
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html
|
||||
*/
|
||||
package org.hibernate.query.sqm.function;
|
||||
|
||||
import org.hibernate.query.ReturnableType;
|
||||
import org.hibernate.sql.ast.SqlAstTranslator;
|
||||
import org.hibernate.sql.ast.spi.SqlAppender;
|
||||
import org.hibernate.sql.ast.tree.SqlAstNode;
|
||||
import org.hibernate.sql.ast.tree.predicate.Predicate;
|
||||
import org.hibernate.sql.ast.tree.select.SortSpecification;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Support for {@link SqmFunctionDescriptor}s that ultimately want
|
||||
* to perform SQL rendering themselves. This is a protocol passed
|
||||
* from the {@link AbstractSqmSelfRenderingFunctionDescriptor}
|
||||
* along to its {@link SelfRenderingSqmFunction} and ultimately to
|
||||
* the {@link SelfRenderingFunctionSqlAstExpression} which calls it
|
||||
* to finally render SQL.
|
||||
*
|
||||
* @author Steve Ebersole
|
||||
* @deprecated Use {@link FunctionRenderer} instead
|
||||
*/
|
||||
@Deprecated(forRemoval = true)
|
||||
@FunctionalInterface
|
||||
public interface FunctionRenderingSupport {
|
||||
void render(
|
||||
SqlAppender sqlAppender,
|
||||
List<? extends SqlAstNode> sqlAstArguments,
|
||||
SqlAstTranslator<?> walker);
|
||||
|
||||
/**
|
||||
* @since 6.4
|
||||
*/
|
||||
default void render(
|
||||
SqlAppender sqlAppender,
|
||||
List<? extends SqlAstNode> sqlAstArguments,
|
||||
ReturnableType<?> returnType,
|
||||
SqlAstTranslator<?> walker) {
|
||||
// Ignore the return type by default. Subclasses will override this
|
||||
render( sqlAppender, sqlAstArguments, walker );
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 6.4
|
||||
*/
|
||||
default void render(
|
||||
SqlAppender sqlAppender,
|
||||
List<? extends SqlAstNode> sqlAstArguments,
|
||||
Predicate filter,
|
||||
ReturnableType<?> returnType,
|
||||
SqlAstTranslator<?> walker) {
|
||||
// Ignore the filter by default. Subclasses will override this
|
||||
render( sqlAppender, sqlAstArguments, returnType, walker );
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 6.4
|
||||
*/
|
||||
default void render(
|
||||
SqlAppender sqlAppender,
|
||||
List<? extends SqlAstNode> sqlAstArguments,
|
||||
Predicate filter,
|
||||
List<SortSpecification> withinGroup,
|
||||
ReturnableType<?> returnType,
|
||||
SqlAstTranslator<?> walker) {
|
||||
// Ignore the filter by default. Subclasses will override this
|
||||
render( sqlAppender, sqlAstArguments, returnType, walker );
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 6.4
|
||||
*/
|
||||
default void render(
|
||||
SqlAppender sqlAppender,
|
||||
List<? extends SqlAstNode> sqlAstArguments,
|
||||
Predicate filter,
|
||||
Boolean respectNulls,
|
||||
Boolean fromFirst,
|
||||
ReturnableType<?> returnType,
|
||||
SqlAstTranslator<?> walker) {
|
||||
// Ignore the filter by default. Subclasses will override this
|
||||
render( sqlAppender, sqlAstArguments, returnType, walker );
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue