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.AvgFunction
INSTANCE
Singleton access
-
Constructor Summary
Constructors Modifier Constructor Description protected
AvgFunction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected int
determineJdbcTypeCode(Type firstArgumentType, SessionFactoryImplementor factory)
protected java.lang.String
render(int firstArgumentJdbcType, java.lang.String argument, SessionFactoryImplementor factory)
java.lang.String
render(Type firstArgumentType, java.util.List arguments, SessionFactoryImplementor factory)
Render the function call as SQL fragment.protected java.lang.String
renderArgument(java.lang.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 java.lang.String render(Type firstArgumentType, java.util.List arguments, SessionFactoryImplementor factory) throws QueryException
Description copied from interface:SQLFunction
Render 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:
render
in interfaceSQLFunction
- Overrides:
render
in 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 java.lang.String render(int firstArgumentJdbcType, java.lang.String argument, SessionFactoryImplementor factory)
-
renderArgument
protected java.lang.String renderArgument(java.lang.String argument, int firstArgumentJdbcType)
-
-