Produced by Siminov Software Solution LLP

siminov.orm.database.impl
Interface IAverage

All Known Implementing Classes:
Select

public interface IAverage

Exposes API's to get average value of all non-NULL X within a group. String and BLOB values that do not look like numbers are interpreted as 0. The result of avg() is always a floating point value as long as at there is at least one non-NULL input even if all inputs are integers. The result of avg() is NULL if and only if there are no non-NULL inputs.


Field Summary
static java.lang.String INTERFACE_NAME
           
 
Method Summary
 IAverageClause and(java.lang.String column)
          Used to specify AND condition between where clause.
 IAverage column(java.lang.String column)
          Used to provide name of column for which average will be calculated.
 java.lang.Object execute()
          Used to get average, this method should be called in last to calculate average.
 IAverage groupBy(java.lang.String... columns)
          Used to specify GROUP BY statement in conjunction with the aggregate functions to group the result-set by one or more columns.
 IAverageClause having(java.lang.String column)
          Used to specify HAVING clause to SQL because the WHERE keyword could not be used with aggregate functions.
 IAverage havingClause(java.lang.String havingClause)
          Used to provide manually created Where clause, instead of using API's.
 IAverageClause or(java.lang.String column)
          Used to specify OR condition between where clause.
 IAverageClause where(java.lang.String column)
          Column name of which condition will be specified.
 IAverage whereClause(java.lang.String whereClause)
          Used to provide manually created Where clause, instead of using API's.
 

Field Detail

INTERFACE_NAME

static final java.lang.String INTERFACE_NAME
Method Detail

where

IAverageClause where(java.lang.String column)
Column name of which condition will be specified.

Parameters:
column - Name of column.
Returns:
IAerageClause Interface.

whereClause

IAverage whereClause(java.lang.String whereClause)
Used to provide manually created Where clause, instead of using API's.

Parameters:
whereClause - Manually created where clause.
Returns:
IAverage Interface.

and

IAverageClause and(java.lang.String column)
Used to specify AND condition between where clause.

Parameters:
column - Name of column on which condition need to be specified.
Returns:
IAerageClause Interface.

or

IAverageClause or(java.lang.String column)
Used to specify OR condition between where clause.

Parameters:
column - Name of column on which condition need to be specified.
Returns:
IAverageClause Interface.

groupBy

IAverage groupBy(java.lang.String... columns)
Used to specify GROUP BY statement in conjunction with the aggregate functions to group the result-set by one or more columns.

Parameters:
columns - Name of columns.
Returns:
IAverage Interface.

having

IAverageClause having(java.lang.String column)
Used to specify HAVING clause to SQL because the WHERE keyword could not be used with aggregate functions.

Parameters:
column - Name of column on which condition need to be applied.
Returns:
IAverageClause Interface.

havingClause

IAverage havingClause(java.lang.String havingClause)
Used to provide manually created Where clause, instead of using API's.

Parameters:
havingClause - Where clause.
Returns:
IAverage Interface.

column

IAverage column(java.lang.String column)
Used to provide name of column for which average will be calculated.

Parameters:
column - Name of column.
Returns:
IAverage Interface.

execute

java.lang.Object execute()
                         throws DatabaseException
Used to get average, this method should be called in last to calculate average.

Returns:
Return average.
Throws:
DatabaseException - Throws exception if any error occur while calculating average.

Apache License 2.0

Copyright 2013