类 CastFunction
- java.lang.Object
-
- org.hibernate.dialect.function.CastFunction
-
- 所有已实现的接口:
SQLFunction
public class CastFunction extends Object implements SQLFunction
ANSI-SQL stylecast(foo as type)where the type is a Hibernate type- 作者:
- Gavin King
-
-
字段概要
字段 修饰符和类型 字段 说明 static CastFunctionINSTANCESingleton access
-
构造器概要
构造器 构造器 说明 CastFunction()
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 TypegetReturnType(Type columnType, 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 columnType, List args, SessionFactoryImplementor factory)Render the function call as SQL fragment.
-
-
-
字段详细资料
-
INSTANCE
public static final CastFunction INSTANCE
Singleton access
-
-
方法详细资料
-
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 columnType, 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- 参数:
columnType- 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 columnType, 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- 参数:
columnType- The type of the first argumentargs- The function argumentsfactory- The SessionFactory- 返回:
- The rendered function call
- 抛出:
QueryException- Indicates a problem rendering the function call.
-
-