org.hibernate.dialect.function

Class ClassicAvgFunction

Implemented Interfaces:
SQLFunction

public class ClassicAvgFunction
extends StandardSQLFunction

Classic AVG sqlfunction that return types as it was done in Hibernate 3.1
Author:
Max Rydahl Andersen

Constructor Summary

ClassicAvgFunction()

Method Summary

Type
getReturnType(Type columnType, Mapping mapping)
The return type of the function.

Methods inherited from class org.hibernate.dialect.function.StandardSQLFunction

getName, getReturnType, getType, hasArguments, hasParenthesesIfNoArguments, render, toString

Constructor Details

ClassicAvgFunction

public ClassicAvgFunction()

Method Details

getReturnType

public Type getReturnType(Type columnType,
                          Mapping mapping)
            throws QueryException
The return type of the function. May be either a concrete type which is preset, or variable depending upon the type of the first function argument.
Specified by:
getReturnType in interface SQLFunction
Overrides:
getReturnType in interface StandardSQLFunction
Parameters:
columnType - the type of the first argument
mapping - The mapping source.
Returns:
The type to be expected as a return.
Throws:
QueryException - Indicates an issue resolving the return type.