|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.google.visualization.datasource.query.AbstractColumn
com.google.visualization.datasource.query.ScalarFunctionColumn
public class ScalarFunctionColumn
A scalar function column (e.g. year(Date1)). The values in a scalar function column are the result of executing the function on the columns that are given as parameters, so for example year(Date1) column values will have the year of the corresponding value in Date1 column.
| Field Summary | |
|---|---|
static java.lang.String |
COLUMN_COLUMN_SEPARATOR
When creating the ID of the column, this is used as a separator between the columns on which the function is performed. |
static java.lang.String |
COLUMN_FUNCTION_TYPE_SEPARATOR
A separator between function type and the columns on which it operates. |
| Constructor Summary | |
|---|---|
ScalarFunctionColumn(java.util.List<AbstractColumn> columns,
ScalarFunction scalarFunction)
Creates a new instance of this class with the given columns list and function type. |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object o)
|
java.util.List<AggregationColumn> |
getAllAggregationColumns()
Returns a list of all aggregation columns including the columns that are inside scalar function columns (e.g., the column year(date(max(d1))) will return max(d1)). |
java.util.List<ScalarFunctionColumn> |
getAllScalarFunctionColumns()
Returns a list of all scalar function columns. |
java.util.List<java.lang.String> |
getAllSimpleColumnIds()
Returns a list of the inner simple column IDs of the scalar function column (i.e., the columns on which the function is performed). |
java.util.List<SimpleColumn> |
getAllSimpleColumns()
Returns a list of all simple columns. |
TableCell |
getCell(ColumnLookup lookup,
TableRow row)
Returns the cell of the column in the given row. |
java.util.List<AbstractColumn> |
getColumns()
Returns a list of the columns on which the function is performed. |
ScalarFunction |
getFunction()
Returns the function of the scalar function column. |
java.lang.String |
getId()
Returns the ID of the scalar function column. |
ValueType |
getValueType(DataTable dataTable)
Returns the value type of the column after evaluating the scalar function. |
int |
hashCode()
|
java.lang.String |
toQueryString()
Returns a string that when parsed by the query parser, should return an identical column. |
java.lang.String |
toString()
This is for debug and error messages, not for ID generation. |
void |
validateColumn(DataTable dataTable)
Checks that the column is valid. |
| Methods inherited from class com.google.visualization.datasource.query.AbstractColumn |
|---|
getValue |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String COLUMN_FUNCTION_TYPE_SEPARATOR
public static final java.lang.String COLUMN_COLUMN_SEPARATOR
| Constructor Detail |
|---|
public ScalarFunctionColumn(java.util.List<AbstractColumn> columns,
ScalarFunction scalarFunction)
columns - The list of columns on which the function is performed.scalarFunction - The function type.| Method Detail |
|---|
public java.lang.String getId()
getId in class AbstractColumnpublic java.util.List<java.lang.String> getAllSimpleColumnIds()
getAllSimpleColumnIds in class AbstractColumnpublic ScalarFunction getFunction()
public java.util.List<AbstractColumn> getColumns()
public TableCell getCell(ColumnLookup lookup,
TableRow row)
getCell in class AbstractColumnrow - The given row.lookup - The column lookup.
public java.util.List<SimpleColumn> getAllSimpleColumns()
getAllSimpleColumns in class AbstractColumnpublic java.util.List<AggregationColumn> getAllAggregationColumns()
getAllAggregationColumns in class AbstractColumnpublic java.util.List<ScalarFunctionColumn> getAllScalarFunctionColumns()
getAllScalarFunctionColumns in class AbstractColumn
public void validateColumn(DataTable dataTable)
throws InvalidQueryException
validateColumn in class AbstractColumndataTable - The table description.
InvalidQueryException - Thrown when the column is invalid.public ValueType getValueType(DataTable dataTable)
getValueType in class AbstractColumndataTable - The table description.
public boolean equals(java.lang.Object o)
equals in class AbstractColumnpublic int hashCode()
hashCode in class AbstractColumnpublic java.lang.String toQueryString()
toQueryString in class AbstractColumnpublic java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||