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


oracle.dss.rules
Class DiscriminatorRule

java.lang.Object
  |
  +--oracle.dss.rules.Rule
        |
        +--oracle.dss.rules.DiscriminatorRule
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable

public class DiscriminatorRule
extends Rule

A Rule that applies under certain conditions but not under other conditions. The conditions are specified in an object that implements the Discriminator interface.

See Also:
Discriminator, ComponentTypeDiscriminator, CompositeDiscriminator, NumberValueDiscriminator, PositionDiscriminator, QDRDiscriminator, ValueDiscriminator, Serialized Form

Fields inherited from class oracle.dss.rules.Rule
RESET_EVERYTHING, RESET_NONE, RESET_XML_PROPERTIES

 

Constructor Summary
DiscriminatorRule()
          Constructor that does not specify a Discriminator.
DiscriminatorRule(Discriminator discriminator, Mergeable mergeable)
          Constructor that specifies a Discriminator and a Mergeable object.

 

Method Summary
 boolean applies(RuleContext context, Mergeable target)
          Indicates whether this DiscriminatorRule applies.
 java.lang.Object clone()
          Clones this object.
 boolean equals(java.lang.Object o)
          Indicates whether the specified object is equivalent to this DiscriminatorRule.
 Discriminator getDiscriminator()
          Retrieves the Discriminator of this DiscriminatorRule.
 interface getXML(boolean allProperties, ComponentTypeConverter dataview)
          Retrieves XML that represents properties and their values in the form of and ObjectNode.
 void setDiscriminator(Discriminator discriminator)
          Specifies the Discriminator for this DiscriminatorRule.
 boolean setXML( node, ComponentTypeConverter converter, java.lang.String version, int reset)
          Specifies XML that represents properties and values.

 

Methods inherited from class oracle.dss.rules.Rule
fireRule, getFixedMergeable, runRule, setFixedMergeable, setXML

 

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

 

Constructor Detail

DiscriminatorRule

public DiscriminatorRule()
Constructor that does not specify a Discriminator. If you use this constructor, call the setDiscriminator method to specify a Discriminator. Call the setFixedMergeable object of the superclass to specify the Mergeable object that has the appropriate properties set.

DiscriminatorRule

public DiscriminatorRule(Discriminator discriminator,
Mergeable mergeable)
Constructor that specifies a Discriminator and a Mergeable object.
Parameters:
discriminator - The object that specifies the conditions under which this Rule applies.
mergeable - The object that specifies the property values that should be set when this Rule applies.
Method Detail

clone

public java.lang.Object clone()
Clones this object.
Overrides:
clone in class Rule
Returns:
The clone of this object.

applies

public boolean applies(RuleContext context,
Mergeable target)
Indicates whether this DiscriminatorRule applies. This method actually calls the applies method of the Discriminator for this DiscriminatorRule and returns its result.
Overrides:
applies in class Rule
Parameters:
context - The context of the item that is to be painted. The Discriminator compares this context with its condition. The DataView provides this parameter.
target - The Mergeable object whose properties will be modified when the rule is fired, if this method returns true. Overriding methods may or may not use this parameter. This must be the same class as the object retrieved by calling the getFixedMergeable method.
Returns:
true if the applies method of the Discriminator returns true, false if it returns false or if there is no Discriminator specified for this DiscriminatorRule.

getDiscriminator

public Discriminator getDiscriminator()
Retrieves the Discriminator of this DiscriminatorRule.
Returns:
The Discriminator that specifies the conditions under which this DiscriminatorRule applies.

setDiscriminator

public void setDiscriminator(Discriminator discriminator)
Specifies the Discriminator for this DiscriminatorRule.
Parameters:
discriminator - A Discriminator object that specifies the conditions under which this DiscriminatorRule applies.

equals

public boolean equals(java.lang.Object o)
Indicates whether the specified object is equivalent to this DiscriminatorRule. The objects are equivalent when both the Discriminator objects and the Mergeable objects for the two DiscriminatorRules are equivalent. Null Discriminator objects are equivalent, and null Mergeable objects are equivalent.
Overrides:
equals in class java.lang.Object
Parameters:
o - The object to compare with this DiscriminatorRule.
Returns:
true if the rules have equivalent discriminators and equivalent Mergeable objects, false if not or if o is null.

setXML

public boolean setXML( node,
ComponentTypeConverter converter,
                      java.lang.String version,
                      int reset)
Specifies XML that represents properties and values. This method applies the values of the properties in the XML to this DiscriminatorRule.
Parameters:
node - ObjectNode that has the properties and their values.
version - The XML version.
reset - A constant that indicates how much to reset when XML is applied. Valid values are listed in the See Also section.
Returns:
true if XML is properly applied, false if the XML cannot be applied.
See Also:
Rule.RESET_NONE, Rule.RESET_XML_PROPERTIES, Rule.RESET_EVERYTHING

getXML

public getXML(boolean allProperties,
ComponentTypeConverter dataview)
Retrieves XML that represents properties and their values in the form of and ObjectNode.
Overrides:
getXML in class Rule
Parameters:
allProperties - true to store all property values in XML, false to store only values that are different from default values.
dataview - A converter that converts component strings to integers and vice versa.
Returns:
XML for the properties and values.

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


Copyright © 2003, Oracle. All Rights Reserved.