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

com.sas.iquery.metadata.business
Class Role

com.sas.iquery.metadata.business.Role
All Implemented Interfaces:
com.sas.util.LocalizableToStringInterface

public class Role

Specifies the different multidimensional roles that a data item can take when it is used in the list of result items that is managed by the BusinessQuery interface.

Roles Definition by Data Source Type:


Field Summary
static Role BACKGROUND
          This role is used, when specifying a data item as a result item in a BusinessQuery, to request the result item to be on the BACKGROUND axis in the result set returned by SAS Query Services' data services component when processing the query.
static Role COLUMN
          This role is used, when specifying a data item as a result item in a BusinessQuery, to request a result item to be on the COLUMN axis in the result set returned by SAS Query Services' data services component when processing the query.
static Role HIDDEN
          This role is used, when specifying a data item as a result item in a BusinessQuery, to request the result item to be processed as if it were to be returned as a result item but to not return it in the resultset.
static Role PAGE
          Deprecated. do not use
static Role ROW
          This role is used, when specifying a data item as a result item in a BusinessQuery, to request a result item to be on the ROW axis in the result set returned by SAS Query Services' data services component when processing the query.
 
Method Summary
static boolean isInactiveRole(BusinessQuery query, Role role)
          Checks the role specified for the query specified to see if that role when assigned to a result item will result in the result item being ignored.
static boolean isOutputResultRole(BusinessQuery query, Role role)
          Returns true if the an item using this role will be displayed as an output result on an axis or in a cell.
 

Field Detail

***  This field is subject to change.  ***

ROW

public static final Role ROW
This role is used, when specifying a data item as a result item in a BusinessQuery, to request a result item to be on the ROW axis in the result set returned by SAS Query Services' data services component when processing the query.

If assigning this role is not valid for a given data item in the context of how other data items and their roles are assigned in a query, the query will become invalid and a Reason object is available via the BusinessQuery.getReasonsNotValid() method.


***  This field is subject to change.  ***

COLUMN

public static final Role COLUMN
This role is used, when specifying a data item as a result item in a BusinessQuery, to request a result item to be on the COLUMN axis in the result set returned by SAS Query Services' data services component when processing the query.

If assigning this role is not valid for a given data item in the context of how other data items and their roles are assigned in a query, the query will become invalid and a Reason object is available via the BusinessQuery.getReasonsNotValid() method.


***  This field is subject to change.  ***

BACKGROUND

public static final Role BACKGROUND
This role is used, when specifying a data item as a result item in a BusinessQuery, to request the result item to be on the BACKGROUND axis in the result set returned by SAS Query Services' data services component when processing the query.

If assigning this role is not valid for a given data item in the context of how other data items and their roles are assigned in a query, the query will become invalid and a Reason object is available via the BusinessQuery.getReasonsNotValid() method.


***  This field is subject to change.  ***

PAGE

public static final Role PAGE
Deprecated. do not use
This role is defined for future use (it is NOT currently supported). The role will be used when specifying a data item as a result item in a BusinessQuery, to signify a new Axis for the multidimensional result set. An example of Page role is a BY Group report where the Country has a page role and the other result items are information shown for each Country. The role is only valid when the structure of the data is OLAP.

If assigning this role is not valid for a given data item in the context of how other data items and their roles are assigned in a query, the query will become invalid and a Reason object is available via the BusinessQuery.getReasonsNotValid() method.


***  This field is subject to change.  ***

HIDDEN

public static final Role HIDDEN
This role is used, when specifying a data item as a result item in a BusinessQuery, to request the result item to be processed as if it were to be returned as a result item but to not return it in the resultset.

Several common uses of this role are:

If assigning this role is not valid for a given data item in the context of how other data items and their roles are assigned in a query, the query will become invalid and a Reason object is available via the BusinessQuery.getReasonsNotValid() method.

Method Detail
***  This method is subject to change.  ***

isInactiveRole

public static boolean isInactiveRole(BusinessQuery query,
                                     Role role)
Checks the role specified for the query specified to see if that role when assigned to a result item will result in the result item being ignored. (In Relational and ROLAP this item will still be used to calculate the join path used.)

Parameters:
query - BusinessQuery that is being examined.
role - Selected item's role.
Returns:
true if this Role will inactivate a result item (it may still be used to join tables together) and false otherwise.

***  This method is subject to change.  ***

isOutputResultRole

public static boolean isOutputResultRole(BusinessQuery query,
                                         Role role)
Returns true if the an item using this role will be displayed as an output result on an axis or in a cell. HIDDEN and BACKGROUND will be treated appropriately for the type of selection being used for the query. HIDDEN in OLAP means not visible, BACKGROUND in Relational means not visible.

Parameters:
query -
role -
Returns:
true for roles that will appear in the results of the query
See Also:
isInactiveRole(BusinessQuery,Role)

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




Copyright © 2009 SAS Institute Inc. All Rights Reserved.