Package org.hibernate.dialect.function
Class StandardAnsiSqlAggregationFunctions.AvgFunction
java.lang.Object
org.hibernate.dialect.function.StandardSQLFunction
org.hibernate.dialect.function.StandardAnsiSqlAggregationFunctions.AvgFunction
- All Implemented Interfaces:
SQLFunction
- Direct Known Subclasses:
AvgWithArgumentCastFunction
- Enclosing class:
StandardAnsiSqlAggregationFunctions
Definition of a standard ANSI SQL compliant AVG function
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected final intdetermineJdbcTypeCode(Type firstArgumentType, SessionFactoryImplementor factory) protected Stringrender(int firstArgumentJdbcType, String argument, SessionFactoryImplementor factory) render(Type firstArgumentType, List arguments, SessionFactoryImplementor factory) Render the function call as SQL fragment.protected StringrenderArgument(String argument, int firstArgumentJdbcType) Methods inherited from class org.hibernate.dialect.function.StandardSQLFunction
getName, getReturnType, getType, hasArguments, hasParenthesesIfNoArguments, toString
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
AvgFunction
public AvgFunction()
-
-
Method Details
-
render
public String render(Type firstArgumentType, List arguments, SessionFactoryImplementor factory) throws QueryException Description copied from class:StandardSQLFunctionRender the function call as SQL fragment. Note, the 'firstArgumentType' parameter should match the one passed intoSQLFunction.getReturnType(org.hibernate.type.Type, org.hibernate.engine.Mapping)- Specified by:
renderin interfaceSQLFunction- Overrides:
renderin classStandardSQLFunction- Parameters:
firstArgumentType- The type of the first argumentarguments- The function argumentsfactory- The SessionFactory- Returns:
- The rendered function call
- Throws:
QueryException- Indicates a problem rendering the function call.
-
determineJdbcTypeCode
protected final int determineJdbcTypeCode(Type firstArgumentType, SessionFactoryImplementor factory) throws QueryException - Throws:
QueryException
-
render
protected String render(int firstArgumentJdbcType, String argument, SessionFactoryImplementor factory) -
renderArgument
-