All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.hibernate.query.sqm.produce.function.internal.SelfRenderingSqmFunction Maven / Gradle / Ivy

There is a newer version: 7.0.0.Alpha3
Show newest version
/*
 * 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.produce.function.internal;

import java.util.List;

import org.hibernate.metamodel.model.domain.AllowableFunctionReturnType;
import org.hibernate.query.sqm.NodeBuilder;
import org.hibernate.query.sqm.function.SqmFunction;
import org.hibernate.query.sqm.produce.function.spi.SelfRenderingFunctionSupport;
import org.hibernate.query.sqm.tree.SqmTypedNode;
import org.hibernate.query.sqm.tree.expression.AbstractSqmExpression;

/**
 * @author Steve Ebersole
 */
public class SelfRenderingSqmFunction
		extends AbstractSqmExpression
		implements SqmFunction {
	private final String name;
	private final SelfRenderingFunctionSupport renderingSupport;
	private final List> arguments;

	public SelfRenderingSqmFunction(
			SelfRenderingFunctionSupport renderingSupport,
			List> arguments,
			AllowableFunctionReturnType impliedResultType,
			NodeBuilder nodeBuilder,
			String name) {
		super( impliedResultType, nodeBuilder );
		this.renderingSupport = renderingSupport;
		this.arguments = arguments;
		this.name = name;
	}

	public List> getArguments() {
		return arguments;
	}

	@Override
	public AllowableFunctionReturnType getNodeType() {
		return (AllowableFunctionReturnType) super.getNodeType();
	}

	public SelfRenderingFunctionSupport getRenderingSupport() {
		return renderingSupport;
	}

	@Override
	public String getFunctionName() {
		return name;
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy