All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Query |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

*** This class is subject to change. ***

## com.sas.iquery.dataservices
Class DataRetrievalUtil

    com.sas.iquery.dataservices.DataRetrievalUtil

    public class DataRetrievalUtil

Utility methods for extracting information from data selections.

Constructor Summary
`DataRetrievalUtil()`

Method Summary
`static boolean` | `hasSummarizeableItems(BusinessQuery bq)` Reports whether the business query contains data items which may be summarized.
`static boolean` | `hasSummarizeableItems(DataSelection ds)` Determines if the business query contains data items which may be summarized.
`static boolean` | `hasValidROLAPAggregation(DataItem item)` Reports whether a data item has an aggregation function which may be used in ROLAP.
`static boolean` | `isItemToSummarize(DataItem item)` Reports whether a data item should be used in relational totals.
`static boolean` | `isModelDetailed(DataSelection dataSelection)` Returns true if the data selection will return detailed (unaggregated) data
`static boolean` | `isModelGrandTotal(DataSelection dataSelection)` Checks if the model is GrandTotal.
`static boolean` | `isModelRanked(DataSelection model)` Checks if a data selection contains a rank filter.
`static boolean` | `isModelROLAP(DataSelection dataSelection)` Reports whether the given data selection is ROLAP.
`static boolean` | `isNonAdditiveMeasure(DataItem resultItem)` Returns true if the item is a non-additive measure
`static boolean` | `isSummarizableItem(DataItem item)` Reports whether a data item should be used in relational totals.
`static boolean` | `isValidROLAPAggregation(DataItem item, Function aggregation)` Reports whether a data item can be used with the given aggregation function in ROLAP.
`static boolean` | `isValidROLAPAggregation(Function aggregation)` Reports whether a given function may be used as a ROLAP aggregation.
`static boolean` | `isValidROLAPAggregation(FunctionNameID functionNameID)` Reports whether the function with the given name may be used as a ROLAP aggregation.

Constructor Detail

### DataRetrievalUtil

    public DataRetrievalUtil()

Method Detail

### hasSummarizeableItems

    public static boolean hasSummarizeableItems(DataSelection ds)
                                         throws GenerationException

  Determines if the business query contains data items which may be summarized. Obsoleted by the more generic `hasSummarizeableItems(BusinessQuery)`

  Returns:
    true if there are items that can be summarized in the DataSelection
  Throws:
    `GenerationException`
  See Also:
    `hasSummarizeableItems(BusinessQuery)`

### hasSummarizeableItems

    public static boolean hasSummarizeableItems(BusinessQuery bq)
                                         throws java.lang.IllegalArgumentException

  Reports whether the business query contains data items which may be summarized.

  Returns:
    `true` if there are items that can be summarized in the given business query
  Throws:
    `java.lang.IllegalArgumentException`

### isItemToSummarize

    public static boolean isItemToSummarize(DataItem item)
                                     throws java.lang.IllegalArgumentException

  Reports whether a data item should be used in relational totals.

  In order for a total value to appear for the data item, it must be numeric. Therefore, detail DataItems with Count will not appear.

  Use this signature when you need an `IllegalArgumentException` to be thrown.

  Parameters:
    `item` - the data item to check
  Returns:
    `true` if the specified item will be summarized
  Throws:
    `java.lang.IllegalArgumentException` - If the item's total expression is not valid

### isSummarizableItem

    public static boolean isSummarizableItem(DataItem item)
                                      throws GenerationException

  Reports whether a data item should be used in relational totals. In order for a total value to appear for the data item, it must be numeric. Therefore, detail DataItems with Count will not appear.

  Parameters:
    `item` - The data item to check
  Returns:
    `true` if the specified item will be summarized
  Throws:
    `GenerationException` - If the item's total expression is not valid

### hasValidROLAPAggregation

    public static boolean hasValidROLAPAggregation(DataItem item)

  Reports whether a data item has an aggregation function which may be used in ROLAP.

  Parameters:
    `item` - a data item that may or may not be used in ROLAP
  Returns:
    `true` if the specified item's aggregation is supported by ROLAP

### isValidROLAPAggregation

    public static boolean isValidROLAPAggregation(DataItem item,
                                                  Function aggregation)

  Reports whether a data item can be used with the given aggregation function in ROLAP.

  Parameters:
    `item` - a data item
    `aggregation` - the target aggregation
  Returns:
    `true` if the specified item and aggregation pair are supported by ROLAP

### isValidROLAPAggregation

    public static boolean isValidROLAPAggregation(Function aggregation)

  Reports whether a given function may be used as a ROLAP aggregation. To test a data item, use `hasValidROLAPAggregation(DataItem)`

  Returns:
    `true` if the specified aggregation is supported by ROLAP

### isValidROLAPAggregation

    public static boolean isValidROLAPAggregation(@Nullable
                                                  FunctionNameID functionNameID)

  Reports whether the function with the given name may be used as a ROLAP aggregation.

  Returns:
    `true` if the specified aggregation is supported by ROLAP.

### isModelROLAP

    public static boolean isModelROLAP(DataSelection dataSelection)
                                throws GenerationException

  Reports whether the given data selection is ROLAP. A data selection is ROLAP if any of its result items have the roles of `Role.ROW`.

  Parameters:
    `dataSelection` - The data selection to test
  Returns:
    true if the given data selection is ROLAP
  Throws:
    `GenerationException`

### isModelGrandTotal

    public static boolean isModelGrandTotal(DataSelection dataSelection)
                                     throws GenerationException

  Checks if the model is GrandTotal.

  This contains the `isGrandTotal(DataSelection)` check, but also ensures that all visible result items have `isGrandRole(Role)`.

  Parameters:
    `dataSelection` - the data selection to check
  Returns:
    `true` if the model meets all criteria for being grand total
  Throws:
    `GenerationException`

### isModelRanked

    public static boolean isModelRanked(@Nullable
                                        DataSelection model)

  Checks if a data selection contains a rank filter.

  Parameters:
    `model` - the data selection to check
  Returns:
    `true` if the data selection is ranked.

### isNonAdditiveMeasure

    public static boolean isNonAdditiveMeasure(DataItem resultItem)

  Returns true if the item is a non-additive measure

  Parameters:
    `resultItem` -
  Returns:

### isModelDetailed

    public static boolean isModelDetailed(@Nonnull
                                          DataSelection dataSelection)

  Returns true if the data selection will return detailed (unaggregated) data

  Parameters:
    `dataSelection` -
  Returns:

*** This class is subject to change. ***

All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Query |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009 SAS Institute Inc. All Rights Reserved.