类 NoArgSQLFunction
- java.lang.Object
-
- org.hibernate.dialect.function.NoArgSQLFunction
-
- 所有已实现的接口:
SQLFunction
public class NoArgSQLFunction extends Object implements SQLFunction
A function which takes no arguments- 作者:
- Michi
-
-
构造器概要
构造器 构造器 说明 NoArgSQLFunction(String name, Type returnType)Constructs a NoArgSQLFunctionNoArgSQLFunction(String name, Type returnType, boolean hasParenthesesIfNoArguments)Constructs a NoArgSQLFunction
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 protected StringgetName()TypegetReturnType(Type argumentType, Mapping mapping)The return type of the function.booleanhasArguments()Does this function have any arguments?booleanhasParenthesesIfNoArguments()If there are no arguments, are parentheses required?Stringrender(Type argumentType, List args, SessionFactoryImplementor factory)Render the function call as SQL fragment.
-
-
-
构造器详细资料
-
NoArgSQLFunction
public NoArgSQLFunction(String name, Type returnType)
Constructs a NoArgSQLFunction- 参数:
name- The function namereturnType- The function return type
-
NoArgSQLFunction
public NoArgSQLFunction(String name, Type returnType, boolean hasParenthesesIfNoArguments)
Constructs a NoArgSQLFunction- 参数:
name- The function namereturnType- The function return typehasParenthesesIfNoArguments- Does the function call need parenthesis if there are no arguments?
-
-
方法详细资料
-
hasArguments
public boolean hasArguments()
从接口复制的说明:SQLFunctionDoes this function have any arguments?- 指定者:
hasArguments在接口中SQLFunction- 返回:
- True if the function expects to have parameters; false otherwise.
-
hasParenthesesIfNoArguments
public boolean hasParenthesesIfNoArguments()
从接口复制的说明:SQLFunctionIf there are no arguments, are parentheses required?- 指定者:
hasParenthesesIfNoArguments在接口中SQLFunction- 返回:
- True if a no-arg call of this function requires parentheses.
-
getReturnType
public Type getReturnType(Type argumentType, Mapping mapping) throws QueryException
从接口复制的说明:SQLFunctionThe return type of the function. May be either a concrete type which is preset, or variable depending upon the type of the first function argument. Note, the 'firstArgumentType' parameter should match the one passed intoSQLFunction.render(org.hibernate.type.Type, java.util.List, org.hibernate.engine.spi.SessionFactoryImplementor)- 指定者:
getReturnType在接口中SQLFunction- 参数:
argumentType- The type of the first argumentmapping- The mapping source.- 返回:
- The type to be expected as a return.
- 抛出:
QueryException- Indicates an issue resolving the return type.
-
render
public String render(Type argumentType, List args, SessionFactoryImplementor factory) throws QueryException
从接口复制的说明:SQLFunctionRender the function call as SQL fragment. Note, the 'firstArgumentType' parameter should match the one passed intoSQLFunction.getReturnType(org.hibernate.type.Type, org.hibernate.engine.spi.Mapping)- 指定者:
render在接口中SQLFunction- 参数:
argumentType- The type of the first argumentargs- The function argumentsfactory- The SessionFactory- 返回:
- The rendered function call
- 抛出:
QueryException- Indicates a problem rendering the function call.
-
getName
protected String getName()
-
-