com.sas.iquery.execution2
Class AbstractIQResultSetMetaData

com.sas.iquery.execution2.AbstractIQResultSetMetaData
All Implemented Interfaces:
IQResultSetMetaData
Direct Known Subclasses:
IQOlapResultSetMetaData, IQRelationalResultSetMetaData

public abstract class AbstractIQResultSetMetaData
implements IQResultSetMetaData

Abstract implementation of IQResultSetMetadata interface. An abstract implementation is provided, so that we can provide a reasonable default implementation of the IQResultSetMetadata interface for both OLAP and relational result sets.


Constructor Summary
protected AbstractIQResultSetMetaData()
           
protected AbstractIQResultSetMetaData(BusinessQuery bq)
           
 
Method Summary
protected  void addStringToDataItem(java.lang.String string, DataItem dataItem)
           
 java.util.Map<java.lang.Integer,java.util.List<DrillPath>> getAllDrillPaths()
          The IQResultSetMetaData implementation of #getAllDrillPaths() throws an UnsupportedOperationException.
 DataItem getDataItem(java.lang.Object uniquePhysicalObject)
          Returns the data item associated with this physical object.
 java.util.List<DataItem> getDataItems()
          Returns the list of data items used to create the result set.
 java.util.List<DrillPath> getDrillPaths(DataItem di)
          The IQResultSetMetaData implementation of #getDrillPaths(DataItem) throws an UnsupportedOperationException.
 java.util.List<DrillPath> getDrillPaths(int axis)
          The IQResultSetMetaData implementation of #getDrillPaths(int) throws an UnsupportedOperationException.
 java.util.List<java.lang.String> getUniqueNames()
          Returns a list of unique names are included in this result set.
 boolean isDrillable()
          The AbstractIQResultSetMetadata implementation of #isDrillable returns false.
protected  DataItem stringToDataItem(java.lang.String name)
           
 

Constructor Detail

AbstractIQResultSetMetaData

protected AbstractIQResultSetMetaData()

AbstractIQResultSetMetaData

protected AbstractIQResultSetMetaData(BusinessQuery bq)
Parameters:
bq -
Method Detail

getUniqueNames

@NonNull
public java.util.List<java.lang.String> getUniqueNames()
Description copied from interface: IQResultSetMetaData
Returns a list of unique names are included in this result set.

Example 1 (OLAP):

Below defines the string object in this list for a unique level name for the hierarchy of Product and level of Product Group.

[Product].[Product_Category]

Example 2 (OLAP):

Below defines the string object in this list for the Measures labeled "Sales Sum".

[Measures].[SALES]

Specified by:
getUniqueNames in interface IQResultSetMetaData
Returns:
a list of names
See Also:
IQResultSetMetaData.getUniqueNames()

getDataItems

@NonNull
public java.util.List<DataItem> getDataItems()
Description copied from interface: IQResultSetMetaData
Returns the list of data items used to create the result set.

Specified by:
getDataItems in interface IQResultSetMetaData
Returns:
a list of DataItem
See Also:
IQResultSetMetaData.getDataItems()

addStringToDataItem

protected void addStringToDataItem(java.lang.String string,
                                   DataItem dataItem)

stringToDataItem

protected DataItem stringToDataItem(java.lang.String name)

getDataItem

public DataItem getDataItem(java.lang.Object uniquePhysicalObject)
Description copied from interface: IQResultSetMetaData
Returns the data item associated with this physical object.

Specified by:
getDataItem in interface IQResultSetMetaData
Parameters:
uniquePhysicalObject - which can be a String object (either tuple unique name, level name, or member name), a MeasureInterface object, a HierarchyInterface object, or some other, yet to be defined, object.
Returns:
the DataItem associated with this physical object
See Also:
IQResultSetMetaData.getDataItem(java.lang.Object)

isDrillable

public boolean isDrillable()
The AbstractIQResultSetMetadata implementation of #isDrillable returns false.

Subclasses that support drilling will return true.

Return true if this result set metadata supports drilling. If drilling is not supported, methods such getDrillPaths() will throw an UnsupportedOperationException.

Specified by:
isDrillable in interface IQResultSetMetaData
Throws:
ExecutionException
{@link - UnsupportedOperationException} if the subclass does not support drilling

getDrillPaths

public java.util.List<DrillPath> getDrillPaths(int axis)
                                        throws ExecutionException
The IQResultSetMetaData implementation of #getDrillPaths(int) throws an UnsupportedOperationException.

Subclasses that support drilling should provide their own implementation.

Return a list of drill path objects, representing the user's current drill state into the result set.

Specified by:
getDrillPaths in interface IQResultSetMetaData
Parameters:
axis - the axis as defined in AxisInterface
Throws:
ExecutionException
{@link - UnsupportedOperationException} if the subclass does not support drilling

getDrillPaths

public java.util.List<DrillPath> getDrillPaths(DataItem di)
                                        throws ExecutionException
The IQResultSetMetaData implementation of #getDrillPaths(DataItem) throws an UnsupportedOperationException.

Subclasses that support drilling should provide their own implementation.

Return the list of drill paths for this data item.

Specified by:
getDrillPaths in interface IQResultSetMetaData
Returns:
a list of DrillPath objects.
Throws:
ExecutionException
{@link - UnsupportedOperationException} if the subclass does not support drilling

getAllDrillPaths

public java.util.Map<java.lang.Integer,java.util.List<DrillPath>> getAllDrillPaths()
                                                                            throws ExecutionException
The IQResultSetMetaData implementation of #getAllDrillPaths() throws an UnsupportedOperationException.

Subclasses that support drilling should provide their own implementation.

Return a map, in which the key is the axis and the value is a list of drill path objects for each axis.

Specified by:
getAllDrillPaths in interface IQResultSetMetaData
Returns:
a list, in which each value is a list of drill path objects
Throws:
ExecutionException
{@link - UnsupportedOperationException} if the subclass does not support drilling



Copyright © 2009 SAS Institute Inc. All Rights Reserved.