Top Description Inners Constructors Methods
org.hibernate.dialect.function

public Class StandardAnsiSqlAggregationFunctions

extends Object
Class Inheritance
Imports
java.sql.Types, java.util.Iterator, .List, .Map, org.hibernate.Hibernate, .MappingException, .QueryException, org.hibernate.engine.Mapping, .SessionFactoryImplementor, org.hibernate.type.Type

TODO : javadoc
Author
Steve Ebersole

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
StandardAnsiSqlAggregationFunctions.AvgFunction

Definition of a standard ANSI SQL compliant AVG function

public static class
StandardAnsiSqlAggregationFunctions.CountFunction

Definition of a standard ANSI SQL compliant COUNT function

public static class
public static class
public static class

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

StandardAnsiSqlAggregationFunctionsback to summary
public StandardAnsiSqlAggregationFunctions()

Method Detail

primeFunctionMapback to summary
public static void primeFunctionMap(Map<String, SQLFunction> functionMap)
org.hibernate.dialect.function back to summary

public Class StandardAnsiSqlAggregationFunctions.AvgFunction

extends StandardSQLFunction
Class Inheritance
Known Direct Subclasses
org.hibernate.dialect.function.AvgWithArgumentCastFunction

Definition of a standard ANSI SQL compliant AVG function

Field Summary

Modifier and TypeField and Description
public static final StandardAnsiSqlAggregationFunctions.AvgFunction

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected final int
public String
render(Type
The type of the first argument
firstArgumentType
,
List<E>
The function arguments
arguments
,
SessionFactoryImplementor
The SessionFactory
factory
)

Overrides org.hibernate.dialect.function.StandardSQLFunction.render.

Implements org.hibernate.dialect.function.SQLFunction.render.

Render the function call as SQL fragment.
protected String
render(int firstArgumentJdbcType, String argument, SessionFactoryImplementor factory)

protected String
renderArgument(String argument, int firstArgumentJdbcType)

Inherited from org.hibernate.dialect.function.StandardSQLFunction:
getNamegetReturnTypegetTypehasArgumentshasParenthesesIfNoArgumentstoString

Field Detail

INSTANCEback to summary
public static final StandardAnsiSqlAggregationFunctions.AvgFunction INSTANCE

Constructor Detail

AvgFunctionback to summary
public AvgFunction()

Method Detail

determineJdbcTypeCodeback to summary
protected final int determineJdbcTypeCode(Type firstArgumentType, SessionFactoryImplementor factory) throws QueryException
renderback to summary
public String render(Type firstArgumentType, List<E> arguments, SessionFactoryImplementor factory) throws QueryException

Overrides org.hibernate.dialect.function.StandardSQLFunction.render.

Implements org.hibernate.dialect.function.SQLFunction.render.

Doc from org.hibernate.dialect.function.StandardSQLFunction.render.

Render the function call as SQL fragment.

Note, the 'firstArgumentType' parameter should match the one passed into getReturnType

Parameters
firstArgumentType:Type

Doc from org.hibernate.dialect.function.SQLFunction.render.

The type of the first argument

arguments:List<E>

Doc from org.hibernate.dialect.function.SQLFunction.render.

The function arguments

factory:SessionFactoryImplementor

Doc from org.hibernate.dialect.function.SQLFunction.render.

The SessionFactory

Returns:String

Doc from org.hibernate.dialect.function.SQLFunction.render.

The rendered function call

Annotations
@Override
Exceptions
QueryException:

Doc from org.hibernate.dialect.function.SQLFunction.render.

Indicates a problem rendering the function call.

renderback to summary
protected String render(int firstArgumentJdbcType, String argument, SessionFactoryImplementor factory)
renderArgumentback to summary
protected String renderArgument(String argument, int firstArgumentJdbcType)
org.hibernate.dialect.function back to summary

public Class StandardAnsiSqlAggregationFunctions.CountFunction

extends StandardSQLFunction
Class Inheritance

Definition of a standard ANSI SQL compliant COUNT function

Field Summary

Modifier and TypeField and Description
public static final StandardAnsiSqlAggregationFunctions.CountFunction

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public String
render(Type
The type of the first argument
firstArgumentType
,
List<E>
The function arguments
arguments
,
SessionFactoryImplementor
The SessionFactory
factory
)

Overrides org.hibernate.dialect.function.StandardSQLFunction.render.

Implements org.hibernate.dialect.function.SQLFunction.render.

Render the function call as SQL fragment.
private String
renderCountDistinct(List<E> arguments)

Inherited from org.hibernate.dialect.function.StandardSQLFunction:
getNamegetReturnTypegetTypehasArgumentshasParenthesesIfNoArgumentstoString

Field Detail

INSTANCEback to summary
public static final StandardAnsiSqlAggregationFunctions.CountFunction INSTANCE

Constructor Detail

CountFunctionback to summary
public CountFunction()

Method Detail

renderback to summary
public String render(Type firstArgumentType, List<E> arguments, SessionFactoryImplementor factory)

Overrides org.hibernate.dialect.function.StandardSQLFunction.render.

Implements org.hibernate.dialect.function.SQLFunction.render.

Doc from org.hibernate.dialect.function.StandardSQLFunction.render.

Render the function call as SQL fragment.

Note, the 'firstArgumentType' parameter should match the one passed into getReturnType

Parameters
firstArgumentType:Type

Doc from org.hibernate.dialect.function.SQLFunction.render.

The type of the first argument

arguments:List<E>

Doc from org.hibernate.dialect.function.SQLFunction.render.

The function arguments

factory:SessionFactoryImplementor

Doc from org.hibernate.dialect.function.SQLFunction.render.

The SessionFactory

Returns:String

Doc from org.hibernate.dialect.function.SQLFunction.render.

The rendered function call

Annotations
@Override
renderCountDistinctback to summary
private String renderCountDistinct(List<E> arguments)
org.hibernate.dialect.function back to summary

public Class StandardAnsiSqlAggregationFunctions.MaxFunction

extends StandardSQLFunction
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final StandardAnsiSqlAggregationFunctions.MaxFunction

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from org.hibernate.dialect.function.StandardSQLFunction:
getNamegetReturnTypegetTypehasArgumentshasParenthesesIfNoArgumentsrendertoString

Field Detail

INSTANCEback to summary
public static final StandardAnsiSqlAggregationFunctions.MaxFunction INSTANCE

Constructor Detail

MaxFunctionback to summary
public MaxFunction()
org.hibernate.dialect.function back to summary

public Class StandardAnsiSqlAggregationFunctions.MinFunction

extends StandardSQLFunction
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final StandardAnsiSqlAggregationFunctions.MinFunction

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from org.hibernate.dialect.function.StandardSQLFunction:
getNamegetReturnTypegetTypehasArgumentshasParenthesesIfNoArgumentsrendertoString

Field Detail

INSTANCEback to summary
public static final StandardAnsiSqlAggregationFunctions.MinFunction INSTANCE

Constructor Detail

MinFunctionback to summary
public MinFunction()
org.hibernate.dialect.function back to summary

public Class StandardAnsiSqlAggregationFunctions.SumFunction

extends StandardSQLFunction
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final StandardAnsiSqlAggregationFunctions.SumFunction

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected final int
public Type
getReturnType(Type
The type of the first argument
firstArgumentType
,
Mapping
The mapping source.
mapping
)

Overrides org.hibernate.dialect.function.StandardSQLFunction.getReturnType.

Implements org.hibernate.dialect.function.SQLFunction.getReturnType.

The return type of the function.
Inherited from org.hibernate.dialect.function.StandardSQLFunction:
getNamegetTypehasArgumentshasParenthesesIfNoArgumentsrendertoString

Field Detail

INSTANCEback to summary
public static final StandardAnsiSqlAggregationFunctions.SumFunction INSTANCE

Constructor Detail

SumFunctionback to summary
public SumFunction()

Method Detail

determineJdbcTypeCodeback to summary
protected final int determineJdbcTypeCode(Type type, Mapping mapping) throws QueryException
getReturnTypeback to summary
public Type getReturnType(Type firstArgumentType, Mapping mapping)

Overrides org.hibernate.dialect.function.StandardSQLFunction.getReturnType.

Implements org.hibernate.dialect.function.SQLFunction.getReturnType.

Doc from org.hibernate.dialect.function.StandardSQLFunction.getReturnType.

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.

Note, the 'firstArgumentType' parameter should match the one passed into render

Parameters
firstArgumentType:Type

Doc from org.hibernate.dialect.function.SQLFunction.getReturnType.

The type of the first argument

mapping:Mapping

Doc from org.hibernate.dialect.function.SQLFunction.getReturnType.

The mapping source.

Returns:Type

Doc from org.hibernate.dialect.function.SQLFunction.getReturnType.

The type to be expected as a return.