com.google.visualization.datasource
Enum Capabilities

java.lang.Object
  extended by java.lang.Enum<Capabilities>
      extended by com.google.visualization.datasource.Capabilities
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Capabilities>

public enum Capabilities
extends java.lang.Enum<Capabilities>

An enumeration of the capabilities provided by a data source. A data source declares the capabilities it supports and this information determines how a query is split. For example if a data source declares Capibilities.SELECT then the following query select A,B sort A limit 20 will be split as follows: query for data source - 'select A,B' completion query - 'sort A limit 20'

Author:
Yonatan B.Y.

Enum Constant Summary
ALL
          Supports all the above capabilities: SQL.
NONE
          Supports no capabilities.
SELECT
          Supports: select over simple columns.
SORT_AND_PAGINATION
          Supports: sort, limit, and offset over simple columns.
SQL
          Supports: filter, sort, group, limit, and offset.
 
Method Summary
static Capabilities valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static Capabilities[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

SQL

public static final Capabilities SQL
Supports: filter, sort, group, limit, and offset. Does not support: pivot, options, labels, format or scalar functions.


SORT_AND_PAGINATION

public static final Capabilities SORT_AND_PAGINATION
Supports: sort, limit, and offset over simple columns. Simple columns are those that are not aggregation columns (such as max(a), count(b), avg(c)) or scalar function columns (like a+b, c*2, year(d)). If calculated columns are created, through scalar functions or aggregation for example, the completion query handles the SORT_AND_PAGINATION over the newly created columns.


SELECT

public static final Capabilities SELECT
Supports: select over simple columns. If calculated columns are created, through scalar functions or aggregation for example, the completion query handles the SELECT over the newly created columns.


ALL

public static final Capabilities ALL
Supports all the above capabilities: SQL. SORT_AND_PAGINATION, and SELECT.


NONE

public static final Capabilities NONE
Supports no capabilities.

Method Detail

values

public static Capabilities[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (Capabilities c : Capabilities.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static Capabilities valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null


Copyright © 2009 Google. All Rights Reserved.