com.google.visualization.datasource.base
Enum MessagesEnum

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

public enum MessagesEnum
extends Enum<MessagesEnum>

An enum for messages used in the DataSource library. Each element references a message in ErrorMessages. For example all the error messages produced in query parsing are listed here.

Author:
Hillel M.

Enum Constant Summary
ADD_COL_TO_GROUP_BY_OR_AGG
          Column should be added to GROUP BY, removed from SELECT, or aggregated in SELECT.
AGG_IN_ORDER_NOT_IN_SELECT
          Aggregation found in ORDER BY but was not found in SELECT.
AGG_IN_SELECT_NO_PIVOT
          Column which is aggregated in SELECT, cannot appear in PIVOT.
AVG_SUM_ONLY_NUMERIC
          Average and sum aggregation can be applied only on numeric columns.
CANNOT_BE_IN_GROUP_BY
          Column can not be in group by because it has an aggregation.
CANNOT_BE_IN_PIVOT
          Column can not be in pivot because it has an aggregation.
CANNOT_BE_IN_WHERE
          Column can not be in where because it has an aggregation.
CANNOT_GROUP_WITNOUT_AGG
          Cannot use GROUP BY when no aggregations are defined in SELECT.
CANNOT_PIVOT_WITNOUT_AGG
          Cannot use PIVOT when no aggregations are defined in SELECT.
COL_AGG_NOT_IN_SELECT
          Column which is aggregated in SELECT, cannot appear in GROUP BY.
COL_IN_ORDER_MUST_BE_IN_SELECT
          Column which appears in ORDER BY, must be in SELECT as well, because SELECT contains aggregated columns.
COLUMN_ONLY_ONCE
          Column cannot appear more than once.
FORMAT_COL_NOT_IN_SELECT
          Column which is referenced in FORMAT, is not part of SELECT clause.
INVALID_AGG_TYPE
          Invalid aggregation type.
INVALID_OFFSET
          Invalid value for row offset.
INVALID_SKIPPING
          Invalid value for row skipping.
LABEL_COL_NOT_IN_SELECT
          Column which is referenced in LABEL, is not part of SELECT clause.
NO_AGG_IN_ORDER_WHEN_PIVOT
          Column cannot be aggregated in ORDER BY when PIVOT is used.
NO_COL_IN_GROUP_AND_PIVOT
          Column cannot appear both in GROUP BY and in PIVOT.
NO_COLUMN
          Column in query is missing from the data table.
PARSE_ERROR
          An error when parsing the query.
SELECT_WITH_AND_WITHOUT_AGG
          Column can not appear in select with and without aggregation.
 
Method Summary
 String getMessage(com.ibm.icu.util.ULocale ulocale)
          Returns a localized message for this reason type and locale.
 String getMessageWithArgs(com.ibm.icu.util.ULocale ulocale, String... args)
          Returns a localized message for this reason type and locale.
static MessagesEnum valueOf(String name)
          Returns the enum constant of this type with the specified name.
static MessagesEnum[] 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

NO_COLUMN

public static final MessagesEnum NO_COLUMN
Column in query is missing from the data table.


AVG_SUM_ONLY_NUMERIC

public static final MessagesEnum AVG_SUM_ONLY_NUMERIC
Average and sum aggregation can be applied only on numeric columns.


INVALID_AGG_TYPE

public static final MessagesEnum INVALID_AGG_TYPE
Invalid aggregation type.


PARSE_ERROR

public static final MessagesEnum PARSE_ERROR
An error when parsing the query.


CANNOT_BE_IN_GROUP_BY

public static final MessagesEnum CANNOT_BE_IN_GROUP_BY
Column can not be in group by because it has an aggregation.


CANNOT_BE_IN_PIVOT

public static final MessagesEnum CANNOT_BE_IN_PIVOT
Column can not be in pivot because it has an aggregation.


CANNOT_BE_IN_WHERE

public static final MessagesEnum CANNOT_BE_IN_WHERE
Column can not be in where because it has an aggregation.


SELECT_WITH_AND_WITHOUT_AGG

public static final MessagesEnum SELECT_WITH_AND_WITHOUT_AGG
Column can not appear in select with and without aggregation.


COL_AGG_NOT_IN_SELECT

public static final MessagesEnum COL_AGG_NOT_IN_SELECT
Column which is aggregated in SELECT, cannot appear in GROUP BY.


CANNOT_GROUP_WITNOUT_AGG

public static final MessagesEnum CANNOT_GROUP_WITNOUT_AGG
Cannot use GROUP BY when no aggregations are defined in SELECT.


CANNOT_PIVOT_WITNOUT_AGG

public static final MessagesEnum CANNOT_PIVOT_WITNOUT_AGG
Cannot use PIVOT when no aggregations are defined in SELECT.


AGG_IN_SELECT_NO_PIVOT

public static final MessagesEnum AGG_IN_SELECT_NO_PIVOT
Column which is aggregated in SELECT, cannot appear in PIVOT.


FORMAT_COL_NOT_IN_SELECT

public static final MessagesEnum FORMAT_COL_NOT_IN_SELECT
Column which is referenced in FORMAT, is not part of SELECT clause.


LABEL_COL_NOT_IN_SELECT

public static final MessagesEnum LABEL_COL_NOT_IN_SELECT
Column which is referenced in LABEL, is not part of SELECT clause.


ADD_COL_TO_GROUP_BY_OR_AGG

public static final MessagesEnum ADD_COL_TO_GROUP_BY_OR_AGG
Column should be added to GROUP BY, removed from SELECT, or aggregated in SELECT.


AGG_IN_ORDER_NOT_IN_SELECT

public static final MessagesEnum AGG_IN_ORDER_NOT_IN_SELECT
Aggregation found in ORDER BY but was not found in SELECT.


NO_AGG_IN_ORDER_WHEN_PIVOT

public static final MessagesEnum NO_AGG_IN_ORDER_WHEN_PIVOT
Column cannot be aggregated in ORDER BY when PIVOT is used.


COL_IN_ORDER_MUST_BE_IN_SELECT

public static final MessagesEnum COL_IN_ORDER_MUST_BE_IN_SELECT
Column which appears in ORDER BY, must be in SELECT as well, because SELECT contains aggregated columns.


NO_COL_IN_GROUP_AND_PIVOT

public static final MessagesEnum NO_COL_IN_GROUP_AND_PIVOT
Column cannot appear both in GROUP BY and in PIVOT.


INVALID_OFFSET

public static final MessagesEnum INVALID_OFFSET
Invalid value for row offset.


INVALID_SKIPPING

public static final MessagesEnum INVALID_SKIPPING
Invalid value for row skipping.


COLUMN_ONLY_ONCE

public static final MessagesEnum COLUMN_ONLY_ONCE
Column cannot appear more than once.

Method Detail

values

public static MessagesEnum[] 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 (MessagesEnum c : MessagesEnum.values())
    System.out.println(c);

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

valueOf

public static MessagesEnum valueOf(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:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

getMessageWithArgs

public String getMessageWithArgs(com.ibm.icu.util.ULocale ulocale,
                                 String... args)
Returns a localized message for this reason type and locale.

Parameters:
locale - The locale.
args - An array of arguments.
Returns:
A localized message given a reason type and locale.

getMessage

public String getMessage(com.ibm.icu.util.ULocale ulocale)
Returns a localized message for this reason type and locale.

Parameters:
locale - The locale.
Returns:
A localized message given a reason type and locale.


Copyright © 2012 Google. All Rights Reserved.