StandardAnsiSqlAggregationFunctions.AvgFunction (Hibernate JavaDocs)
Date: 2012-04-05

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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
`static StandardAnsiSqlAggregationFunctions.AvgFunction` | `INSTANCE`

Constructor Summary
`StandardAnsiSqlAggregationFunctions.AvgFunction()`

Method Summary
`protected int` | `determineJdbcTypeCode(Type firstArgumentType, SessionFactoryImplementor factory)`
`protected String` | `render(int firstArgumentJdbcType, String argument, SessionFactoryImplementor factory)`
`String` | `render(Type firstArgumentType, List arguments, SessionFactoryImplementor factory)` Render the function call as SQL fragment.
`protected String` | `renderArgument(String argument, int firstArgumentJdbcType)`

Methods inherited from class org.hibernate.dialect.function.StandardSQLFunction
`getName, getReturnType, getType, hasArguments, hasParenthesesIfNoArguments, toString`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### INSTANCE

    public static final StandardAnsiSqlAggregationFunctions.AvgFunction INSTANCE

Constructor Detail

### StandardAnsiSqlAggregationFunctions.AvgFunction

    public StandardAnsiSqlAggregationFunctions.AvgFunction()

Method Detail

### render

    public String render(Type firstArgumentType,
                         List arguments,
                         SessionFactoryImplementor factory)
                  throws QueryException

  Description copied from class: `StandardSQLFunction`
  Render the function call as SQL fragment.

  Note, the 'firstArgumentType' parameter should match the one passed into `SQLFunction.getReturnType(org.hibernate.type.Type, org.hibernate.engine.spi.Mapping)`

  Specified by:
    `render` in interface `SQLFunction`
  Overrides:
    `render` in class `StandardSQLFunction`
  Parameters:
    `firstArgumentType` - The type of the first argument
    `arguments` - The function arguments
    `factory` - 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

    protected String renderArgument(String argument,
                                    int firstArgumentJdbcType)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2012 Red Hat, Inc. All Rights Reserved.