Produced by Siminov Software Solution LLP

siminov.orm.database.impl
Interface ITotal

All Known Implementing Classes:
Select

public interface ITotal

Exposes API's to return total of all non-NULL values in the group. The non-standard total() function is provided as a convenient way to work around this design problem in the SQL language. The result of total() is always a floating point value.


Field Summary
static java.lang.String INTERFACE_NAME
           
 
Method Summary
 ITotalClause and(java.lang.String column)
          Used to specify AND condition between where clause.
 ITotal column(java.lang.String column)
          Used to provide name of column for which total will be calculated.
 java.lang.Object execute()
          Used to get total, this method should be called in last to calculate total.
 ITotal 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.
 ITotalClause having(java.lang.String column)
          Used to specify HAVING clause to SQL because the WHERE keyword could not be used with aggregate functions.
 ITotal havingClause(java.lang.String havingClause)
          Used to provide manually created Where clause, instead of using API's.
 ITotalClause or(java.lang.String column)
          Used to specify OR condition between where clause.
 ITotalClause where(java.lang.String column)
          Column name of which condition will be specified.
 ITotal 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

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

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

whereClause

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

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

and

ITotalClause 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:
ITotalClause Interface.

or

ITotalClause 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:
ITotalClause Interface.

groupBy

ITotal 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:
ITotal Interface.

having

ITotalClause 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:
ITotalClause Interface.

havingClause

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

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

column

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

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

execute

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

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

Apache License 2.0

Copyright 2013