|
| Components |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||
com.sas.storage.olap.embedded.ResultSetMetadata
public class ResultSetMetadata
Used for building embedded multidimensional ResultSetMetadata, which defines the structure and contents of the resultset. This metadata is specific to the ResultSet, and it is not the same as the metadata defining a Cube. In the embedded version the Metadata for a Cube is not available. The topmost level of metadata is represented by the AxisInterface, and this information can be accessed via get/setAxis() method for the result set. A typical query contains two axes, although queries can contain any number of axes. More detailed metadata information can be acquired through the getTuples and getTupleElements methods. The methods are defined in two places. Both are defined directly on the ResultSetMetadataInterface, and they are also available on the AxisInterface and TupleInterface, respectively.
ResultSetMetadataInterface,
ResultSetInterface| Constructor Summary | |
|---|---|
ResultSetMetadata()
Create an empty ResultSetMetadata |
|
ResultSetMetadata(AxisInterface[] axes)
Create a resultSetMetadata with the axes. |
|
| Method Summary | |
|---|---|
void |
addAxis(AxisInterface axis)
Add an axis to this resultset. |
AxisInterface[] |
getAxes(int index,
int count)
Return all the axes including slicer axis set for this restultset metadata. |
AxisInterface |
getAxis(int index)
Return axis at the given index |
TupleElementInterface[] |
getElements(int axisIndex,
int tupleCoordinate,
int index,
int count)
Return the elements associated with a given tuple coordinate and axis starting from index upto count. |
ResultSetInterface |
getResultSet()
Return the resultSet set for this resultSet metadata. |
TupleInterface[] |
getTuples(int axisIndex,
int index,
int count)
Return the number of tuples associated with the axis starting with index upto count. |
AxisInterface |
removeAxis(int axisNumber)
Remove an axis on this result set. |
void |
setAxes(AxisInterface[] axes)
Replace the axes associated with this ResultSet. |
void |
setResultSet(ResultSetInterface resultSet)
Sets the ResultSet that is defined by this metadata. |
void |
setSlicerAxis(AxisInterface slicerAxis)
Set the SlicerAxis on this resultset metadata. |
| Constructor Detail |
|---|
public ResultSetMetadata()
throws OLAPException
OLAPException
public ResultSetMetadata(AxisInterface[] axes)
throws OLAPException
axes - an array of axes ordered from lowest to highest i.e. axis at index
0 of the array is ColumnAxis, 1 is RowAxis, 2 is PageAxis... and the last is SlicerAxis.
The Axis are non null and should not be skipped i.e. cannot have RowAxis without
a ColumnAxis.
OLAPException - if an axis is skipped other than Slicer axis| Method Detail |
|---|
public void setSlicerAxis(AxisInterface slicerAxis)
throws OLAPException
slicerAxis - slicer axis which is the last axis for the result set metadata.
OLAPException - if the slicer axis cannot be set
public void setResultSet(ResultSetInterface resultSet)
throws OLAPException
resultSet - The ResultSet that is defined by this metadata.
OLAPException - if cannot set the resultset
public void addAxis(AxisInterface axis)
throws OLAPException
axis - add the non null axis to this result set. Axis should be one of the axis defined in
AxisInterface. The axis has to be added in order e.g. ColumnAxis then RowAxis etc.
OLAPException - if the axis cannot be added
public void setAxes(AxisInterface[] axes)
throws OLAPException
AxisInterface.COLUMNS_AXIS axis,
followed by AxisInterface.ROWS_AXIS, then AxisInterface.PAGES_AXIS, etc.
Each axis is non-null, that is no axis is skipped. It's not possible to have a PAGESAXIS axis
without a COLUMNS_AXIS and ROWS_AXIS axis.
axes - an array of axes to be set.
OLAPException - if a database error occurs
public AxisInterface removeAxis(int axisNumber)
throws OLAPException
axisNumber - axis to be removed AxisInterface.ROWS_AXIS,
AxisInterface.COLUMNS_AXIS etc...
OLAPException - if cannot remove an axis
public AxisInterface[] getAxes(int index,
int count)
throws OLAPException
getAxes in interface ResultSetMetadataInterfaceindex - beginning index for the number of axes. -1 indicates SlicersAxis.count - number of axis to return. -1 indicates all the remaining axes
OLAPException - if elements cannot be returned
public AxisInterface getAxis(int index)
throws OLAPException
getAxis in interface ResultSetMetadataInterfaceindex - axis number of the aixs to be returned
OLAPExceptionResultSetMetadataInterface.getAxis(int)
public final ResultSetInterface getResultSet()
throws OLAPException
getResultSet in interface ResultSetMetadataInterfaceOLAPException - if the result set cannot be returned
public TupleInterface[] getTuples(int axisIndex,
int index,
int count)
throws OLAPException
getTuples in interface ResultSetMetadataInterfaceaxisIndex - Axis where the tuples are locatedindex - to begin the countcount - number of requested tuples
OLAPException - if elements cannot be returned
public TupleElementInterface[] getElements(int axisIndex,
int tupleCoordinate,
int index,
int count)
throws OLAPException
getElements in interface ResultSetMetadataInterfaceaxisIndex - axis number for the tuple elmentstupleCoordinate - the tuple ordinal on the axisindex - starting indexcount - number of requested elements
OLAPException - if elements cannot be returned
|
| Components |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||