|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.google.visualization.datasource.query.QueryFormat
public class QueryFormat
Describes the formatting options of a Query, as passed on the query in the "format" clause. Format can be specified for each column, but does not have to be. If not specified, each column type has a default format. Each format is a string pattern, as used in the ICU UFormat class.
UFormat| Constructor Summary | |
|---|---|
QueryFormat()
Default empty constructor, with no patterns (patterns can be added later). |
|
| Method Summary | |
|---|---|
void |
addPattern(AbstractColumn column,
java.lang.String pattern)
Adds a column pattern. |
boolean |
equals(java.lang.Object obj)
|
java.util.List<AggregationColumn> |
getAggregationColumns()
Returns all the columns that are AggregationColumns. |
java.util.Set<AbstractColumn> |
getColumns()
Returns an immutable set of the column IDs for which a pattern was specified. |
java.lang.String |
getPattern(AbstractColumn column)
Returns the pattern of the specified column, or null if no pattern was specified. |
java.util.List<ScalarFunctionColumn> |
getScalarFunctionColumns()
Returns all the columns that are ScalarFunctionColumns including scalar functions columns that are inside other scalar function columns (e.g., sum(year(a), year(b))). |
int |
hashCode()
|
java.lang.String |
toQueryString()
Returns a string that when fed into the query parser, produces a QueryFormat equal to this one. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public QueryFormat()
| Method Detail |
|---|
public void addPattern(AbstractColumn column,
java.lang.String pattern)
throws InvalidQueryException
column - The column to which the pattern is assigned.pattern - The assigned pattern.
InvalidQueryException - Thrown if the column is already specified.public java.lang.String getPattern(AbstractColumn column)
column - The column for which the pattern is required.
public java.util.Set<AbstractColumn> getColumns()
public java.util.List<ScalarFunctionColumn> getScalarFunctionColumns()
public java.util.List<AggregationColumn> getAggregationColumns()
public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.lang.String toQueryString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||