sqlfunction.java

来自「好东西,hibernate-3.2.0,他是一开元的树杖hibernate-3.」· Java 代码 · 共 40 行

JAVA
40
字号
//$Id: SQLFunction.java 6608 2005-04-29 15:32:30Z oneovthafew $
package org.hibernate.dialect.function;

import java.util.List;

import org.hibernate.QueryException;
import org.hibernate.engine.Mapping;
import org.hibernate.engine.SessionFactoryImplementor;
import org.hibernate.type.Type;

/**
 * Provides support routines for the HQL functions as used
 * in the various SQL Dialects
 *
 * Provides an interface for supporting various HQL functions that are
 * translated to SQL. The Dialect and its sub-classes use this interface to
 * provide details required for processing of the function.
 *
 * @author David Channon
 */
public interface SQLFunction {
	/**
	 * The function return type
	 * @param columnType the type of the first argument
	 */
	public Type getReturnType(Type columnType, Mapping mapping) throws QueryException;
	/**
	 * Does this function have any arguments?
	 */
	public boolean hasArguments();
	/**
	 * If there are no arguments, are parens required?
	 */
	public boolean hasParenthesesIfNoArguments();
	/**
	 * Render the function call as SQL
	 */
	public String render(List args, SessionFactoryImplementor factory) throws QueryException;
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?