Oracle™ Business Intelligence Beans Java API Reference
Release 10
g (9.0.4)
Part number B12159_01


oracle.dss.selection
Class Selection

java.lang.Object
  |
  +--oracle.dss.selection.Selection
All Implemented Interfaces:
java.lang.Cloneable, java.util.EventListener, Persistable, java.beans.PropertyChangeListener, java.io.Serializable, StringXMLizable, VectorClone

public class Selection
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable, VectorClone, Persistable, java.beans.PropertyChangeListener

Specifies a set of members for a particular dimension, such as Product. It consists of a series of ordered Step objects (which specify the set of members) and a SortSpec object (which specifies the sort specification).

See Also:
Serialized Form

Field Summary
static java.lang.String DIMENSION_STATE
          State Management support

 

Constructor Summary
Selection()
          Constructor that does not specify any arguments.
Selection(java.lang.String dimension)
          Constructor that specifies a dimension.
Selection(java.util.Vector dimensions)
          Constructor that specifies tuple dimensions.

 

Method Summary
 void addDrillLevelStep(DrillLevelStep step)
           
 void addPropertyChangeListener(java.beans.PropertyChangeListener l)
          Adds the specified PropertyChangeListener object to this Selection object to listen for property changes.
 int addStep(Step s)
          Adds the specifed Step object to the end of the series of Step objects that are contained in this Selection object.
 int addStep(Step s, int pos)
          Adds the specifed Step object to the specified position in the series of Step objects that are contained in this Selection object.
 boolean clearDrillStep()
          Indicates whether the DrillStep object is cleared when this selection is put into a query.
 java.lang.Object clone()
          Creates a copy of this Selection object.
 boolean equals(java.lang.Object obj)
          Indicates whether one Selection object is equivalent to another Selection object.
 java.lang.String getDescription()
          Retrieves the description of this Selection object.
 java.lang.Object getDim()
          Retrieves either the single string dimension name or the list of tuple dimension names, if present.
 java.lang.String getDimension()
          Retrieves the dimension of this Selection object.
 java.util.Vector getDimensions()
          Retrieves the list of dimensions for a selection that is based on tuple steps.
 interface getDrillStep()
          Retrieves the DrillStep object (if any) that is contained in this Selection object.
 java.lang.Object getHier()
          Retrieves either the single string hierarchy name or the list of tuple hierarchy names, if present.
 java.util.Vector getHierarchies()
          Retrieves the list of hierarchies for a selection that is based on tuple steps.
 java.lang.String getHierarchy()
          Retrieves the hierarchy of this Selection object.
 java.lang.String getName()
          Retrieves the name of this Selection object.
 PersistableAttributes getPersistableAttributes(PersistableAttributes oldAttrs)
          Retrieves the attributes of the component, for searching.
 AggregateInfo[] getPersistableComponents()
          Retrieves a list of the Persistable components that this Persistable component aggregates.
 SortSpec getSortSpec()
          Retrieves the SortSpec object (if any) that is contained in this Selection object.
 Step getStep(int i)
          Retrieves the Step object at the specified position in the series of Step objects that are contained in this Selection object.
 int getStepCount()
          Retrieves the number of Step objects that are contained in this Selection object.
 int getStepIndex(Step step)
          Returns the index of the given Step object.
 java.lang.String getXMLAsString()
          Retrieves the XML representation of the component.
 boolean hasAsymmetricDrill()
          Determines whether the Selection contains any asymmetric drills.
 void initialize(java.util.Hashtable env)
          Initializes the component with the persistence environment.
 boolean isAsymmetric()
          Indicates whether this Selection object will produce an asymmetric result when it is evaluated.
 boolean isForDimension(java.lang.String dimension)
          Indicates whether this Selection object contains information for the specified dimension.
 boolean isTupleSelection()
          Indicates whether the selection is a tuple selection.
 void moveStep(int start, int end)
          Moves a Step object to a new position within the series of Step objects that are contained in this Selection object.
 void removeAllPropertyChangeListeners()
          Removes all the PropertyChangeListener objects from this Selection object.
 void removeAllSteps()
          Removes all Step objects from this Selection object.
 void removePropertyChangeListener(java.beans.PropertyChangeListener l)
          Removes the specified PropertyChangeListener object from this Selection object.
 void removeQuerySteps()
          Removes all query steps, except for the sorting and drill steps.
 int removeStep(int pos)
          Removes the Step object from the specified position in the series of Step objects that are contained in this Selection object.
 int removeStep(Step s)
          Removes the specified Step object from this Selection object.
 void setClearDrillStep(boolean clear)
          Specifies that the DrillStep object is cleared when this selection is put into a query.
 void setDescription(java.lang.String description)
          Specifies the description of this Selection object.
 void setDimension(java.lang.String dimension)
          Specifies the dimension of this Selection object.
 void setDimensions(java.util.Vector dimensions)
          Specifies the list of dimensions for a selection that is based on tuple steps.
 void setDrillStep( drillStep)
          Specifies the DrillStep object that is contained in this Selection object.
 void setHierarchies(java.util.Vector hierarchies)
          Specifies the list of hierarchies for a selection that is based on tuple steps.
 void setHierarchy(java.lang.String hierarchy)
          Specifies the hierarchy of this Selection object and automatically fires a PropertyChangeEvent object.
 void setHierarchy(java.lang.String hierarchy, boolean update)
          Specifies the hierarchy of this Selection object.
 void setName(java.lang.String name)
          Specifies the name of this Selection object.
 void setPersistableAttributes(PersistableAttributes attrs)
          Specifies attributes that can be used for searching in the repository.
 void setPersistableComponents(AggregateInfo[] persistables)
          Specifies a list of Persistable components that this Persistable component aggregates.
 void setSortSpec(SortSpec sortSpec)
          Specifies the SortSpec object that is contained in this Selection object.
 boolean setXMLAsString(java.lang.String xml)
          Specifies the XML representation of the component.
 java.lang.String toString()
          Generates the string representation of this Selection object.

 

Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait

 

Methods inherited from interface java.beans.PropertyChangeListener
propertyChange

 

Field Detail

DIMENSION_STATE

public static final java.lang.String DIMENSION_STATE
State Management support
Constructor Detail

Selection

public Selection()
Constructor that does not specify any arguments.

Selection

public Selection(java.lang.String dimension)
Constructor that specifies a dimension.
Parameters:
dimension - The name of the dimension.

Selection

public Selection(java.util.Vector dimensions)
Constructor that specifies tuple dimensions.
Parameters:
dimensions - The list of tuple dimensions.
Method Detail

setDimension

public void setDimension(java.lang.String dimension)
Specifies the dimension of this Selection object.
Parameters:
dimension - The name of the dimension.

getDimension

public java.lang.String getDimension()
Retrieves the dimension of this Selection object.
Returns:
The name of the dimension.

getDim

public java.lang.Object getDim()
Retrieves either the single string dimension name or the list of tuple dimension names, if present.
Returns:
The dimension name or the list of tuple dimension names.

setDimensions

public void setDimensions(java.util.Vector dimensions)
Specifies the list of dimensions for a selection that is based on tuple steps.
Parameters:
dimensions - The vector list of dimensions.

getDimensions

public java.util.Vector getDimensions()
Retrieves the list of dimensions for a selection that is based on tuple steps.
Returns:
The list of dimensions.

isTupleSelection

public boolean isTupleSelection()
Indicates whether the selection is a tuple selection.
Returns:
true if this is a tuple selection; false if it is not.

isForDimension

public boolean isForDimension(java.lang.String dimension)
Indicates whether this Selection object contains information for the specified dimension.
Parameters:
dimension - The name of the dimension (case insensitive).
Returns:
true if this Selection object contains information for the specified dimension; false if it does not.

setName

public void setName(java.lang.String name)
Specifies the name of this Selection object.
Parameters:
name - The name of this Selection object.

getName

public java.lang.String getName()
Retrieves the name of this Selection object.
Returns:
The name of this Selection object.

setDescription

public void setDescription(java.lang.String description)
Specifies the description of this Selection object.
Parameters:
description - The description of this Selection object.

getDescription

public java.lang.String getDescription()
Retrieves the description of this Selection object.
Returns:
The description of this Selection object.

setHierarchy

public void setHierarchy(java.lang.String hierarchy,
                         boolean update)
Specifies the hierarchy of this Selection object.
Parameters:
hierarchy - The name of the hierarchy.
update - true if a PropertyChangeEvent object is to be fired; false if it is not.

setHierarchy

public void setHierarchy(java.lang.String hierarchy)
Specifies the hierarchy of this Selection object and automatically fires a PropertyChangeEvent object.
Parameters:
hierarchy - The name of the hierarchy.

getHierarchy

public java.lang.String getHierarchy()
Retrieves the hierarchy of this Selection object.
Returns:
The name of the hierarchy.

getHier

public java.lang.Object getHier()
Retrieves either the single string hierarchy name or the list of tuple hierarchy names, if present.
Returns:
The hierarchy name or the list of tuple hierarchy names.

setHierarchies

public void setHierarchies(java.util.Vector hierarchies)
Specifies the list of hierarchies for a selection that is based on tuple steps.
Parameters:
hierarchies - The vector list of hierarchies.

getHierarchies

public java.util.Vector getHierarchies()
Retrieves the list of hierarchies for a selection that is based on tuple steps.
Returns:
The list of hierarchies.

getStep

public Step getStep(int i)
Retrieves the Step object at the specified position in the series of Step objects that are contained in this Selection object.
Parameters:
i - The position of the Step object.
Returns:
The Step object at the specified position.

moveStep

public void moveStep(int start,
                     int end)
Moves a Step object to a new position within the series of Step objects that are contained in this Selection object.
Parameters:
start - The position of the Step object to move.
end - The position to which the Step object is to be moved.

getStepCount

public int getStepCount()
Retrieves the number of Step objects that are contained in this Selection object.
Returns:
The number of Step objects.

addStep

public int addStep(Step s)
Adds the specifed Step object to the end of the series of Step objects that are contained in this Selection object. If the Step object is a MemberStep object, and the Step object at the end of the series is also a MemberStep object, then the two MemberStep objects are merged.
Parameters:
s - The Step object to add.
Returns:
The number of Step objects that are contained in this Selection object after the specified Step object has been added.

addStep

public int addStep(Step s,
                   int pos)
Adds the specifed Step object to the specified position in the series of Step objects that are contained in this Selection object.
Parameters:
s - The Step object to add.
pos - The position at which the Step object is to be added.
Returns:
The number of Step objects that are contained in this Selection object after the specified Step object has been added.

removeStep

public int removeStep(int pos)
Removes the Step object from the specified position in the series of Step objects that are contained in this Selection object.
Parameters:
pos - The position at which theStep object is to be removed.
Returns:
The number of Step objects that are contained in this Selection object after the Step object has been removed.

removeStep

public int removeStep(Step s)
Removes the specified Step object from this Selection object.
Parameters:
s - The Step object to remove.
Returns:
The number of Step objects that are contained in this Selection object after the specified Step object has been removed.

removeAllSteps

public void removeAllSteps()
Removes all Step objects from this Selection object.

removeQuerySteps

public void removeQuerySteps()
Removes all query steps, except for the sorting and drill steps.

setSortSpec

public void setSortSpec(SortSpec sortSpec)
Specifies the SortSpec object that is contained in this Selection object.
Parameters:
sortSpec - The SortSpec object.

getSortSpec

public SortSpec getSortSpec()
Retrieves the SortSpec object (if any) that is contained in this Selection object.
Returns:
The SortSpec object.

setClearDrillStep

public void setClearDrillStep(boolean clear)
Specifies that the DrillStep object is cleared when this selection is put into a query.
Parameters:
clear - true if the DrillStep is cleared; false if the DrillStep is not cleared.

clearDrillStep

public boolean clearDrillStep()
Indicates whether the DrillStep object is cleared when this selection is put into a query.
Returns:
true if the DrillStep is cleared; false if the DrillStep is not cleared.

setDrillStep

public void setDrillStep( drillStep)
Specifies the DrillStep object that is contained in this Selection object.
Parameters:
drillStep - The DrillStep object.

getDrillStep

public getDrillStep()
Retrieves the DrillStep object (if any) that is contained in this Selection object.
Returns:
The DrillStep object.

addDrillLevelStep

public void addDrillLevelStep(DrillLevelStep step)

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener l)
Adds the specified PropertyChangeListener object to this Selection object to listen for property changes.
Parameters:
l - The PropertyChangeListener object to add.

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener l)
Removes the specified PropertyChangeListener object from this Selection object.
Parameters:
l - The PropertyChangeListener object to remove.

removeAllPropertyChangeListeners

public void removeAllPropertyChangeListeners()
Removes all the PropertyChangeListener objects from this Selection object.

equals

public boolean equals(java.lang.Object obj)
Indicates whether one Selection object is equivalent to another Selection object.
Overrides:
equals in class java.lang.Object
Parameters:
obj - The Selection object with which to compare.
Returns:
true if the objects are completely equal; false if they are not.

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Creates a copy of this Selection object.
Specified by:
clone in interface VectorClone
Returns:
A copy of this Selection object.
Throws:
java.lang.CloneNotSupportedException - If cloning is not supported for any fields.

isAsymmetric

public boolean isAsymmetric()
Indicates whether this Selection object will produce an asymmetric result when it is evaluated.
Returns:
true if this Selection object is asymmetric; false if it is not.

hasAsymmetricDrill

public boolean hasAsymmetricDrill()
Determines whether the Selection contains any asymmetric drills.
Returns:
true if there is at least one asymmetric drill step in this Selection; false if there is not.

initialize

public void initialize(java.util.Hashtable env)
Description copied from interface: Persistable
Initializes the component with the persistence environment. The persistence service calls this method when it loads the component, so that the component can use environment properties to initialize itself. Environment properties are defined in the Context interface in JNDI.
Specified by:
initialize in interface Persistable
Following copied from interface: oracle.dss.util.persistence.Persistable
Parameters:
env - Environment properties.

getPersistableComponents

public AggregateInfo[] getPersistableComponents()
Retrieves a list of the Persistable components that this Persistable component aggregates.
Specified by:
getPersistableComponents in interface Persistable
Returns:
An array of AggregateInfo objects, which contains information to restore the relationships among this component and its aggregate components.

setPersistableComponents

public void setPersistableComponents(AggregateInfo[] persistables)
Specifies a list of Persistable components that this Persistable component aggregates. This Persistable component should then restore the relationships with the Persistable components that are contained in the list.
Specified by:
setPersistableComponents in interface Persistable
Parameters:
persistables - An array of AggregateInfo objects.

getXMLAsString

public java.lang.String getXMLAsString()
Description copied from interface: StringXMLizable
Retrieves the XML representation of the component. This method is called by the persistence service when the component is saved to the BI Beans Catalog.
Specified by:
getXMLAsString in interface StringXMLizable
Following copied from interface: oracle.dss.util.persistence.StringXMLizable
Returns:
The XML representation of this component.
Throws:
BIPersistenceException - If a problem occurs in getting the XML.

setXMLAsString

public boolean setXMLAsString(java.lang.String xml)
                       throws BIPersistenceException
Description copied from interface: StringXMLizable
Specifies the XML representation of the component. The persistence service calls this method when the component is restored from the BI Beans Catalog.
Specified by:
setXMLAsString in interface StringXMLizable
Following copied from interface: oracle.dss.util.persistence.StringXMLizable
Parameters:
name - The XML representation of the component.
Returns:
true the XML was successfully set, false if not.
Throws:
BIPersistenceException - If a problem occurs in setting the XML.

getPersistableAttributes

public PersistableAttributes getPersistableAttributes(PersistableAttributes oldAttrs)
Retrieves the attributes of the component, for searching. The attributes are used by the persistence service, when users search the repository for components that have particular attribute values.
Specified by:
getPersistableAttributes in interface Persistable
Parameters:
oldAttrs - The searchable attributes that the application has defined for this component.
Returns:
The full set of attributes for the component.

setPersistableAttributes

public void setPersistableAttributes(PersistableAttributes attrs)
Specifies attributes that can be used for searching in the repository.
Specified by:
setPersistableAttributes in interface Persistable
Parameters:
attrs - PersistableAttributes that specify search attributes for the component.

toString

public java.lang.String toString()
Generates the string representation of this Selection object.
Overrides:
toString in class java.lang.Object
Returns:
The string representation of this Selection object.

getStepIndex

public int getStepIndex(Step step)
Returns the index of the given Step object.
Parameters:
step - The Step object.
Returns:
The index of the Step object.

Oracle™ Business Intelligence Beans Java API Reference
Release 10
g (9.0.4)
Part number B12159_01


Copyright © 2003, Oracle. All Rights Reserved.