org.olap4j.query
public interface Selection
Concrete subclasses of this represent a real selection. Selections include things such as 'children of', 'siblings of', 'descendents of' etc.
This class is different from a Member
because it represents an
abstract member selection (e.g. children of widget' that may not represent
any members whereas a Member represents a single member that is known to
exist.
Modifier and Type | Interface and Description |
---|---|
static class |
Selection.Operator
Defines which selection operators are allowed, relative to
a root member.
|
Modifier and Type | Method and Description |
---|---|
void |
addContext(Selection selection) |
void |
addQueryNodeListener(QueryNodeListener l)
Registers a new listener for a QueryNode.
|
Dimension |
getDimension()
Parent Dimension of the root selection element.
|
Selection.Operator |
getOperator() |
MetadataElement |
getRootElement()
Returns the root selection element of this selection.
|
List<Selection> |
getSelectionContext()
The selection context includes selections from other dimensions that
help determine the entire context of a selection, so drill down is
possible.
|
String |
getUniqueName()
Unique name of the selection root.
|
void |
removeContext(Selection selection) |
void |
removeQueryNodeListener(QueryNodeListener l)
De-registers a new listener for a QueryNode.
|
void |
setOperator(Selection.Operator operator)
Set the selection operator to use.
|
ParseTreeNode |
visit()
Visitor pattern-like function to convert
the selection into a ParseTreeNode.
|
String getUniqueName()
ParseTreeNode visit()
Olap4jNodeConverter.toOlap4j(member, operator);
Dimension getDimension()
MetadataElement getRootElement()
List<Selection> getSelectionContext()
void addContext(Selection selection)
void removeContext(Selection selection)
Selection.Operator getOperator()
void setOperator(Selection.Operator operator)
operator
- Operator to apply on the selection.IllegalArgumentException
- if the operator cannot
be used on the root selection member.void addQueryNodeListener(QueryNodeListener l)
l
- The new listener object, implementation of QueryNodeListenerQueryNodeListener
void removeQueryNodeListener(QueryNodeListener l)
l
- The listener object to de-register.QueryNodeListener