public abstract class TrimFunctionTemplate extends Object implements SQLFunction
| Modifier and Type | Class and Description |
|---|---|
protected static class |
TrimFunctionTemplate.Options |
protected static class |
TrimFunctionTemplate.Specification |
| Constructor and Description |
|---|
TrimFunctionTemplate() |
| Modifier and Type | Method and Description |
|---|---|
Type |
getReturnType(Type firstArgument,
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?
|
protected abstract String |
render(TrimFunctionTemplate.Options options,
String trimSource,
SessionFactoryImplementor factory) |
String |
render(Type firstArgument,
List args,
SessionFactoryImplementor factory)
Render the function call as SQL fragment.
|
public boolean hasArguments()
SQLFunctionhasArguments in interface SQLFunctionpublic boolean hasParenthesesIfNoArguments()
SQLFunctionhasParenthesesIfNoArguments in interface SQLFunctionpublic Type getReturnType(Type firstArgument, Mapping mapping) throws QueryException
SQLFunctionSQLFunction.render(org.hibernate.type.Type, java.util.List, org.hibernate.engine.spi.SessionFactoryImplementor)getReturnType in interface SQLFunctionfirstArgument - The type of the first argumentmapping - The mapping source.QueryException - Indicates an issue resolving the return type.public String render(Type firstArgument, List args, SessionFactoryImplementor factory) throws QueryException
SQLFunctionSQLFunction.getReturnType(org.hibernate.type.Type, org.hibernate.engine.spi.Mapping)render in interface SQLFunctionfirstArgument - The type of the first argumentargs - The function argumentsfactory - The SessionFactoryQueryException - Indicates a problem rendering the
function call.protected abstract String render(TrimFunctionTemplate.Options options, String trimSource, SessionFactoryImplementor factory)
Copyright © 2017 JBoss by Red Hat. All rights reserved.