|
Query |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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 |
---|
public DataRetrievalUtil()
Method Detail |
---|
public static boolean hasSummarizeableItems(DataSelection ds) throws GenerationException
hasSummarizeableItems(BusinessQuery)
GenerationException
hasSummarizeableItems(BusinessQuery)
public static boolean hasSummarizeableItems(BusinessQuery bq) throws java.lang.IllegalArgumentException
true
if there are items that can be summarized in
the given business query
java.lang.IllegalArgumentException
public static boolean isItemToSummarize(DataItem item) throws java.lang.IllegalArgumentException
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.
item
- the data item to check
true
if the specified item will be summarized
java.lang.IllegalArgumentException
- If the item's total expression is not validpublic static boolean isSummarizableItem(DataItem item) throws GenerationException
item
- The data item to check
true
if the specified item will be summarized
GenerationException
- If the item's total expression is not validpublic static boolean hasValidROLAPAggregation(DataItem item)
item
- a data item that may or may not be used in ROLAP
true
if the specified item's aggregation is supported
by ROLAPpublic static boolean isValidROLAPAggregation(DataItem item, Function aggregation)
item
- a data itemaggregation
- the target aggregation
true
if the specified item and aggregation pair are supported by ROLAPpublic static boolean isValidROLAPAggregation(Function aggregation)
hasValidROLAPAggregation(DataItem)
true
if the specified aggregation is supported by ROLAPpublic static boolean isValidROLAPAggregation(@Nullable FunctionNameID functionNameID)
true
if the specified aggregation is supported by ROLAP.public static boolean isModelROLAP(DataSelection dataSelection) throws GenerationException
Role.ROW
.
dataSelection
- The data selection to test
GenerationException
public static boolean isModelGrandTotal(DataSelection dataSelection) throws GenerationException
This contains the isGrandTotal(DataSelection)
check, but also ensures that
all visible result items have isGrandRole(Role)
.
dataSelection
- the data selection to check
true
if the model meets all criteria for being grand total
GenerationException
public static boolean isModelRanked(@Nullable DataSelection model)
model
- the data selection to check
true
if the data selection is ranked.public static boolean isNonAdditiveMeasure(DataItem resultItem)
resultItem
-
public static boolean isModelDetailed(@Nonnull DataSelection dataSelection)
dataSelection
-
|
Query |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |