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
public static class StandardAnsiSqlAggregationFunctions.AvgFunction extends StandardSQLFunction
Definition of a standard ANSI SQL compliant AVG function
-
-
Field Summary
Fields Modifier and Type Field Description static StandardAnsiSqlAggregationFunctions.AvgFunctionINSTANCESingleton access
-
Constructor Summary
Constructors Modifier Constructor Description protectedAvgFunction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected intdetermineJdbcTypeCode(Type firstArgumentType, SessionFactoryImplementor factory)protected Stringrender(int firstArgumentJdbcType, String argument, SessionFactoryImplementor factory)Stringrender(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, getRenderedName, getReturnType, getType, hasArguments, hasParenthesesIfNoArguments, toString
-
-
-
-
Field Detail
-
INSTANCE
public static final StandardAnsiSqlAggregationFunctions.AvgFunction INSTANCE
Singleton access
-
-
Method Detail
-
render
public String render(Type firstArgumentType, List arguments, SessionFactoryImplementor factory) throws QueryException
Description copied from interface: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)- 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)
-
-