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


oracle.dss.selection
Class OlapQDR

java.lang.Object
  |
  +--oracle.dss.util.QDR
        |
        +--oracle.dss.selection.OlapQDR
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable, VectorClone

public class OlapQDR
extends QDR
implements VectorClone

Qualified data reference with level and/or hierarchy information in a member.

See Also:
Serialized Form

Constructor Summary
OlapQDR()
          Constructor for an empty OlapQDR that does not specify the Measure dimension.
OlapQDR(OlapQDR qdr)
          Constructor for a copy of an existing OlapQDR.
OlapQDR(QDR qdr)
          Constructor to convert a QDR into an OlapQDR
OlapQDR(java.lang.String measureDim)
          Constructor for an empty OlapQDR that specifies the Measure dimension.
OlapQDR(java.lang.String measureDim, java.lang.String dimMemberPairs)
          Constructor that specifies members for more than one dimension, by specifying a String for the member-dimension/hier/level pairs.
OlapQDR(java.lang.String measureDim, java.lang.String dim, OlapQDRMember member)
          Constructor that specifies a member for one dimension, by specifying the dimension String and the member object.
OlapQDR(java.lang.String measureDim, java.lang.String dim, java.lang.String member, java.lang.String hierarchy, java.lang.String level)
          Constructor that specifies a member for one dimension, along with its hierarchy and level, by specifying the dimension String and the member, hierarchy, and level objects.

 

Method Summary
 void addDimMemberPair(java.lang.String dim, OlapQDRMember member)
          Adds a dimension-member pair to this OlapQDR.
 void addDimMemberPair(java.lang.String dimension, java.lang.String member)
          Adds a dimension-member pair to this QDR.
 void addDimMemberPair(java.lang.String dimension, java.lang.String member, java.lang.String hierarchy, java.lang.String level)
          Adds a dimension-member pair to this OlapQDR.
 boolean equals(java.lang.Object obj,  comparator)
          Specifies whether this QDR is equivalent to the specified object.
 boolean equals(OlapQDR q2,  comparator)
          Specifies whether this QDR is equivalent to the specified QDR.
 java.lang.String getDimMemberPairs()
          Retrieves the dimension-member pairs of this OlapQDR, when the OlapQDRMembers are of type FIXED.
 java.lang.String getTagName()
          Retrieves the name used for persisting this QDR in XML.
 boolean isDimensionOnlyQDR()
          Indicates whether this OlapQDR is a dimension-only OlapQDR.
 boolean isEmpty()
          Returns true if this OlapQDR is "empty": has no measure dim and no member pairs
 boolean isProperSubsetOf(OlapQDR q2,  comparator)
          Specifies whether this QDR is a proper subset of the specified QDR.
 boolean isProperSupersetOf(OlapQDR q2,  comparator)
          Specifies whether this QDR is a proper superset of the specified QDR.
 boolean isSubsetOf(OlapQDR q2,  comparator)
          Specifies whether this QDR is a subset of the specified QDR.
 boolean isSupersetOf(OlapQDR q2,  comparator)
          Specifies whether this QDR is a superset of the specified QDR.
 void setDimMemberPairs(java.lang.String dimMemberPairs)
          Specifies a series of dimension/hier/level-member pairs, where the members are of type FIXED.

 

Methods inherited from class oracle.dss.util.QDR
addDimMemberPair, clone, equals, equals, getDimensions, getDimMember, getMeasureDim, getTarget, isProperSubsetOf, isProperSupersetOf, isSubsetOf, isSupersetOf, removeDimMemberPair, setTarget, size, toString

 

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

 

Methods inherited from interface oracle.dss.util.VectorClone
clone

 

Constructor Detail

OlapQDR

public OlapQDR()
Constructor for an empty OlapQDR that does not specify the Measure dimension. When you use this constructor, the Measure dimension for this OlapQDR is null. This OlapQDR will not be associated with a particular Measure. The getMeasureDim method will return null.

OlapQDR

public OlapQDR(QDR qdr)
Constructor to convert a QDR into an OlapQDR

OlapQDR

public OlapQDR(OlapQDR qdr)
Constructor for a copy of an existing OlapQDR. When you use this constructor, this OlapQDR uses the same Measure dimension as the specified OlapQDR. This constructor clones the dimensions and the members from the specified OlapQDR.
Parameters:
qdr - The OlapQDR to copy.

OlapQDR

public OlapQDR(java.lang.String measureDim)
Constructor for an empty OlapQDR that specifies the Measure dimension.
Parameters:
measureDim - The name of the Measure dimension.

OlapQDR

public OlapQDR(java.lang.String measureDim,
               java.lang.String dim,
               java.lang.String member,
               java.lang.String hierarchy,
               java.lang.String level)
Constructor that specifies a member for one dimension, along with its hierarchy and level, by specifying the dimension String and the member, hierarchy, and level objects. This constructor specifies the Measure dimension and also adds one dimension-member pair.
Parameters:
measureDim - The name of Measure dimension.
dim - The name of the dimension that you are limiting, such as "Geography".
member - The member to which you are limiting the dimension. You pass a String that identifies the member to which you are limiting the dimension, such as "Paris". This constructor creates a QDRMember object from the dim and member parameters.
hierarchy - The member's hierarchy to which you are limiting the dimension. This constructor creates an OlapQDRMember object from the dim, member, hierarchy, and level parameters.

OlapQDR

public OlapQDR(java.lang.String measureDim,
               java.lang.String dim,
OlapQDRMember member)
Constructor that specifies a member for one dimension, by specifying the dimension String and the member object. This constructor specifies the Measure dimension and also adds one dimension-member pair.
Parameters:
measureDim - The name of Measure dimension.
dim - The name of the dimension that you are limiting, such as "Geography".
member - The member to which you are limiting the dimension.

OlapQDR

public OlapQDR(java.lang.String measureDim,
               java.lang.String dimMemberPairs)
Constructor that specifies members for more than one dimension, by specifying a String for the member-dimension/hier/level pairs. This constructor specifies the Measure dimension and also adds the dimension/hier/level-member pairs specified in the dimMemberPairs parameter.

The format of the string is: "Dimension:Member:Hierarchy:Level;Dimension:Member:Hierarchy:Level". You can specify several dimension/hier/level-member pairs. The hierarchy and level are optional.

You cannot use this constructor if any of the members need to have a type other than FIXED.

Parameters:
measureDim - The name of the Measure dimension.
dimMemberPairs - The formatted String that specifies the dimensions, hierarchies, and levels to limit and the members to limit them to. Use colons (:) to separate a dimension, a member, a hierarchy, and/or a level. Use semicolons (;) to separate dimension-member/hier/level pairs.
See Also:
QDRMember.FIXED
Method Detail

isEmpty

public boolean isEmpty()
Returns true if this OlapQDR is "empty": has no measure dim and no member pairs

setDimMemberPairs

public void setDimMemberPairs(java.lang.String dimMemberPairs)
Specifies a series of dimension/hier/level-member pairs, where the members are of type FIXED. This method takes a formatted String and creates dimension-member pairs, where the members are single members, such as "PARIS" or "MAY2000". Use colons (:) to separate a dimension and a member, hierarchy, level. Use semicolons (;) to separate one dimension/hier/level-member pair from the next dimension/hier/level-member pair. For example, to limit three dimensions, the format of the String is:

Dimension:Member:Hierarchy:Level;Dimension:Member:Hierarchy:Level;Dimension:Member:Hierarchy:Level

Note that no dimension or member names can contain colons or semicolons. All members must be specified in the String, not as objects.

Overrides:
setDimMemberPairs in class QDR
Parameters:
dimMemberPairs - The formatted String that specifies the dimensions to limit and the single members to limit them to. If a dimension/hier/level-member pair in dimMemberPairs is malformed, then this method ignores that dimension/hier/level-member pair and begins parsing at the next semicolon.
See Also:
OlapQDRMember, QDRMember.FIXED

getDimMemberPairs

public java.lang.String getDimMemberPairs()
Retrieves the dimension-member pairs of this OlapQDR, when the OlapQDRMembers are of type FIXED. This method returns a String that specifies all of the dimension-member pairs in the OlapQDR. You can use this method only if all of the members in this OlapQDR are of type FIXED or if this is a dimension-only OlapQDR. If this is a dimension-only OlapQDR, then this method returns only the dimension name.

Semicolons separate one dimension-member pair from another, and colons separate the dimension from the member.

For example, if the OlapQDR refers to Units of TVs (in the standard hierarchy, level L3) sold in Dublin (from the Standard hierarchy) in May (from the YTD hierarchy) by catalog, the String will look something like this:

"MEASURE_DIM:UNITS;PRODUCT:TVS:STANDARD:L3;GEOGRAPHY:DUBLIN:STANDARD;MONTH:MAY:YTD;CHANNEL:CATALOG"

The String that this method returns is suitable to pass to the setDimMemberPairs method.

Overrides:
getDimMemberPairs in class QDR
Returns:
The string of dimension-member pairs in this OlapQDR. If this is a dimension-only OlapQDR, then this method returns the dimension name.
See Also:
setDimMemberPairs(java.lang.String), addDimMemberPair(String, String)

addDimMemberPair

public void addDimMemberPair(java.lang.String dimension,
                             java.lang.String member)
Adds a dimension-member pair to this QDR. This method creates a new QDRMember object and adds the OlapQDRMember to this QDR.
Overrides:
addDimMemberPair in class QDR
Parameters:
dimension - The name of the dimension that you are limiting, such as "Geography".
member - The name of the member to which you want to limit dimension. When you specify a member, then the resulting OlapQDRMember has type FIXED. If you pass null, then the resulting OlapQDRMember has type VARIES.
See Also:
addDimMemberPair(String, OlapQDRMember), OlapQDRMember, QDRMember.FIXED, QDRMember.VARIES

addDimMemberPair

public void addDimMemberPair(java.lang.String dim,
OlapQDRMember member)
Adds a dimension-member pair to this OlapQDR. Adding a dimension-member pair to a OlapQDR makes the OlapQDR more restrictive. For example, if a OlapQDR has only one dimension-member pair, such as one which limits Month to May, then the OlapQDR refers to all the data in a data source where Month is May. If you add a second dimension-member pair, such one that limits Product to Shoes, then the OlapQDR refers only to data where Month is May and Product is Shoes.

If dimension is already limited in this OlapQDR, then the limitation changes to the specified member. For example, if a OlapQDR limits Month to May, and you specify "Month" and a OlapQDRMember that represents June, then Month will be limited to June.

If dimension is null, then the dimension-member pair is ignored, and this OlapQDR is exactly as it was before the method is executed.

If this OlapQDR refers to all of the members of a single dimension (that is, is a dimension-only OlapQDR), and you pass a OlapQDRMember that has any type other than VARIES, then this OlapQDR loses its dimension-only nature, and it limits the specified dimension to the specified member.

Parameters:
dim - The name of the dimension that you are limiting, such as "Geography".
member - The member to which you are limiting the dimension. If you pass null, then this method uses a OlapQDRMember of type VARIES for the member.

addDimMemberPair

public void addDimMemberPair(java.lang.String dimension,
                             java.lang.String member,
                             java.lang.String hierarchy,
                             java.lang.String level)
Adds a dimension-member pair to this OlapQDR. This method creates a new OlapQDRMember object and adds the OlapQDRMember to this OlapQDR.
Parameters:
dimension - The name of the dimension that you are limiting, such as "Geography".
member - The name of the member to which you want to limit dimension. When you specify a member, then the resulting OlapQDRMember has type FIXED. If you pass null, then the resulting OlapQDRMember has type VARIES.
hierarchy - The member's corresponding hierarchy
level - The member's corresponding level
See Also:
QDR.addDimMemberPair(String, QDRMember), QDRMember, QDRMember.FIXED, QDRMember.VARIES

isDimensionOnlyQDR

public boolean isDimensionOnlyQDR()
Indicates whether this OlapQDR is a dimension-only OlapQDR. A dimension-only OlapQDR refers only to all of the members of one dimension. For example, this method returns true if this OlapQDR refers only to the Product dimension.

Such a OlapQDR has one dimension-member pair, and the member of that pair has type VARIES.

Overrides:
isDimensionOnlyQDR in class QDR
Returns:
trueif this is a dimension-only OlapQDR, false if this OlapQDR limits one or more dimensions to a single member.
See Also:
QDRMember.VARIES

equals

public boolean equals(OlapQDR q2,
                       comparator)
Specifies whether this QDR is equivalent to the specified QDR. Two QDR objects are equal if they both have the same dimension-member pairs. The dimension-member pairs do not have to be in the same order.

Dimensions that have varied members are ignored in this comparison, unless both this QDR and q2 are dimension-only QDRs.

Parameters:
q2 - The QDR to which you want to compare this QDR.
comparator - An Object implementing the Comparison interface to allow two levels with different values to be compared for equivalence if their hierarchies are not equal
Returns:
true if all the dimension-member pairs in this QDR are the same as the dimension member pairs in the specified QDR and vice versa, false if any dimension-member pairs differ or if the specified QDR is null.
See Also:
QDRMember.VARIES

equals

public boolean equals(java.lang.Object obj,
                       comparator)
Specifies whether this QDR is equivalent to the specified object. Two QDR objects are equal if they both have the same dimension-member pairs. The dimension-member pairs do not have to be in the same order.

Dimensions that have varied members are ignored in this comparison, unless both this QDR and q2 are dimension-only QDRs.

Parameters:
q2 - The QDR to which you want to compare this QDR.
comparator - An Object implementing the Comparison interface to allow two levels with different values to be compared for equivalence if their hierarchies are not equal
Returns:
true if all the dimension-member pairs in this QDR are the same as the dimension member pairs in the specified QDR and vice versa, false if any dimension-member pairs differ or if the specified QDR is null. Also returns false if obj is not a QDR.
See Also:
QDRMember.VARIES

isProperSupersetOf

public boolean isProperSupersetOf(OlapQDR q2,
                                   comparator)
Specifies whether this QDR is a proper superset of the specified QDR. A QDR is a proper superset of another QDR when it refers to the all of the values of the other QDR and to more values. A proper superset limits fewer dimensions than the QDR of which it is a superset.

For example, say you have the following QDR objects:

QdrTwo is a proper superset of QdrOne, because it refers to all of the data values that QdrOne refers to, and it refers to more values. QdrOne refers only to Shoes, but QdrTwo refers to other products as well.

QdrThree is a proper superset of QdrOne, because it is equivalent to QdrTwo. Note that the order of the dimension-member pairs does not matter.

QdrFour is not a proper superset of QdrOne, because it refers to June, while QdrOne refers to May.

The type of each member in the comparison is also important. Members with type FIXED are more restrictive than members of type LIST, and members of type LIST are more restrictive than members of type VARIES. The following example illustrates the effect of the member type. Suppose you have the following members in two QDR objects:

In this example, QdrTwo is a proper superset of QdrThree, and QdrOne is a proper superset of QdrTwo.

If two QDR objects are equivalent, then each is a superset of the other, but neither QDR is a proper superset of the other.

Parameters:
comparator - An Object implementing the Comparison interface to allow two levels with different values to be compared for equivalence if their hierarchies are not equal
q2 - The QDR to which you want to compare this QDR.
Returns:
true if this QDR refers to some, but not all, of the data that q2 refers to, false if this QDR refers to different data, exactly the same data, or more data.
See Also:
isSupersetOf(oracle.dss.selection.OlapQDR, oracle.dss.metadataUtil.Comparison), QDRMember.FIXED, QDRMember.VARIES, QDRMember.LIST, QDRMember.getType()

isProperSubsetOf

public boolean isProperSubsetOf(OlapQDR q2,
                                 comparator)
Specifies whether this QDR is a proper subset of the specified QDR. A QDR is a proper subset of another QDR when it refers to the some, but not all, of the values of the other QDR. A proper subset limits more dimensions than the QDR of which it is a subset.

For example, say you have the following QDR objects:

QdrTwo is a proper subset of QdrOne, because it refers to a subset of the data values that QdrOne refers to. QdrOne refers to all products and all channels, but QdrTwo refers only to socks sold by direct channel. Both QDR objects refer to the Sales measure and to the month of May. Note that the order of the dimension-member pairs does not matter.

The type of each member in the comparison is also important. Members with type VARIES are less restrictive than members of type LIST, and members of type LIST are less restrictive than members of type FIXED. The following example illustrates the effect of the member type. Suppose you have the following members in two QDR objects:

In this example, QdrTwo is a proper subset of QdrOne, and QdrThree is a proper subset of QdrTwo.

If two QDR objects are equivalent, then each is a subset of the other, but neither QDR is a proper subset of the other.

Parameters:
q2 - The QDR to which you want to compare this QDR.
comparator - An Object implementing the Comparison interface to allow two levels with different values to be compared for equivalence if their hierarchies are not equal
Returns:
true if q2 refers to some, but not all, of the data that this QDR refers to, false if q2 refers to different data, exactly the same data, or more data.
See Also:
isSubsetOf(oracle.dss.selection.OlapQDR, oracle.dss.metadataUtil.Comparison), QDRMember.FIXED, QDRMember.VARIES, QDRMember.LIST, QDRMember.getType()

isSubsetOf

public boolean isSubsetOf(OlapQDR q2,
                           comparator)
Specifies whether this QDR is a subset of the specified QDR. A subset differs from a proper subset in that a subset can be equivalent to the other QDR of which it is a subset.

For example, say you have the following QDR objects:

QdrTwo, QdrThree, and QdrFour are all subsets of QdrOne. Note that the order of dimension-member pairs does not matter.

The type of each member in the comparison is also important. Members with type VARIES are less restrictive than members of type LIST, and members of type LIST are less restrictive than members of type FIXED. The following example illustrates the effect of the member type. Suppose you have the following members in two QDR objects:

In this example, QdrTwo is a proper subset of QdrOne, and QdrThree is a proper subset of QdrTwo.

Parameters:
q2 - The QDR to which you want to compare this QDR.
comparator - An Object implementing the Comparison interface to allow two levels with different values to be compared for equivalence if their hierarchies are not equal
Returns:
true if q2 refers to some or all of the data that this QDR refers to, false if q2 refers to different data, or to more data, than this QDR refers to.
See Also:
isProperSubsetOf(oracle.dss.selection.OlapQDR, oracle.dss.metadataUtil.Comparison), QDRMember.FIXED, QDRMember.VARIES, QDRMember.LIST, QDRMember.getType()

isSupersetOf

public boolean isSupersetOf(OlapQDR q2,
                             comparator)
Specifies whether this QDR is a superset of the specified QDR. A superset differs from a proper superset in that a superset can be equivalent to the QDR of which it is a superset.

For example, say you have the following QDR objects:

QdrTwo, QdrThree, and QdrFour are all supersets of QdrOne. Note that the order of the dimension-member pairs does not matter.

The type of each member in the comparison is also important. Members with type FIXED are more restrictive than members of type LIST, and members of type LIST are more restrictive than members of type VARIES. The following example illustrates the effect of the member type. Suppose you have the following members in two QDR objects:

In this example, QdrTwo is a proper superset of QdrThree, and QdrOne is a proper superset of QdrTwo.

If two QDR objects are equivalent, then each is a superset of the other, but neither QDR is a proper superset of the other.

Parameters:
q2 - The QDR to which you want to compare this QDR.
comparator - An Object implementing the Comparison interface to allow two levels with different values to be compared for equivalence if their hierarchies are not equal
Returns:
true if this QDR refers to some or all of the data that q2 refers to, false if this QDR refers to different data, or to more data, than q2 refers to.
See Also:
isProperSupersetOf(oracle.dss.selection.OlapQDR, oracle.dss.metadataUtil.Comparison), QDRMember.FIXED, QDRMember.VARIES, QDRMember.LIST, QDRMember.getType()

getTagName

public java.lang.String getTagName()
Retrieves the name used for persisting this QDR in XML.
Overrides:
getTagName in class QDR
Returns:
The XML name of this QDR.

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


Copyright © 2003, Oracle. All Rights Reserved.