public class CastFunction extends java.lang.Object implements SQLFunction
cast(foo as type)
where the type is a Hibernate typeModifier and Type | Field and Description |
---|---|
static CastFunction |
INSTANCE
Singleton access
|
Constructor and Description |
---|
CastFunction() |
Modifier and Type | Method and Description |
---|---|
Type |
getReturnType(Type columnType,
Mapping mapping)
The return type of the function.
|
boolean |
hasArguments()
Does this function have any arguments?
|
boolean |
hasParenthesesIfNoArguments()
If there are no arguments, are parentheses required?
|
java.lang.String |
render(Type columnType,
java.util.List args,
SessionFactoryImplementor factory)
Render the function call as SQL fragment.
|
public static final CastFunction INSTANCE
public boolean hasArguments()
SQLFunction
hasArguments
in interface SQLFunction
public boolean hasParenthesesIfNoArguments()
SQLFunction
hasParenthesesIfNoArguments
in interface SQLFunction
public Type getReturnType(Type columnType, Mapping mapping) throws QueryException
SQLFunction
SQLFunction.render(org.hibernate.type.Type, java.util.List, org.hibernate.engine.spi.SessionFactoryImplementor)
getReturnType
in interface SQLFunction
columnType
- The type of the first argumentmapping
- The mapping source.QueryException
- Indicates an issue resolving the return type.public java.lang.String render(Type columnType, java.util.List args, SessionFactoryImplementor factory) throws QueryException
SQLFunction
SQLFunction.getReturnType(org.hibernate.type.Type, org.hibernate.engine.spi.Mapping)
render
in interface SQLFunction
columnType
- The type of the first argumentargs
- The function argumentsfactory
- The SessionFactoryQueryException
- Indicates a problem rendering the
function call.Copyright © 2001-2018 Red Hat, Inc. All Rights Reserved.