|
Oracle™ Business Intelligence Beans Java API Reference | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--oracle.dss.rules.discriminator.CompositeDiscriminator
Discriminator that combines two Discriminator objects, for complex rules that are based on more than one kind of information. For example, you might want to italicize values for December 1999 that are greater than 500,000. To do this, you would create a QDRDiscriminator to specify the "December 1999" condition, and a NumberValueDiscriminator to specify the "greater than 500,000" condition. Then you would create a CompositeDiscriminator to combine the two conditions.
This class supports the following conditional operators: AND, OR, and NOT. Note that the NOT operation uses only the left operand.
QDRDiscriminator, NumberValueDiscriminator, DiscriminatorRule, Serialized Form| Field Summary | |
static int |
ANDConditional AND (&&). |
static int |
NOTLogical NOT (!). |
static int |
ORConditional OR (||). |
| Constructor Summary | |
CompositeDiscriminator()Constructor that does not specify base discriminators or an operator. | |
CompositeDiscriminator(Discriminator l, Discriminator r, int condOp)Constructor that specifies the base discriminators and the operator. | |
| Method Summary | |
boolean |
applies(RuleContext context)Specifies whether the composite condition is met by the specified RuleContext. |
java.lang.Object |
clone()Clones this CompositeDiscriminator. |
boolean |
equals(java.lang.Object o) |
int |
getCondOperator()Retrieves the conditional operator of this CompositeDiscriminator. |
Discriminator |
getLeft()Retrieves the left Descriminator. |
Discriminator |
getRight()Retrieves the right Descriminator. |
interface |
getXML(boolean allProperties, ComponentTypeConverter converter, boolean emptyElement)Retrieves XML that represents properties and their values in the form of and ObjectNode. |
void |
setCondOperator(int condOp)Specifies the conditional operator for this CompositeDiscriminator. |
void |
setLeft(Discriminator discriminator)Specifies the left Discriminator. |
void |
setRight(Discriminator discriminator)Specifies the right Discriminator. |
boolean |
setXML( node, ComponentTypeConverter converter, java.lang.String version, int reset)Specifies XML that represents properties and values. |
| Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int AND
CompositeDiscriminator will apply only when both base Discriminators apply.public static final int OR
CompositeDiscriminator will apply when either of the base Discriminators apply.public static final int NOT
CompositeDiscriminator will apply when the base Discriminator (the left operand) does not apply. When you use this operator, you only need one Discriminator.| Constructor Detail |
public CompositeDiscriminator()
setLeft and setRight methods to set the base discriminators. Call the setCondOperator to specify the conditional operator.
public CompositeDiscriminator(Discriminator l,
Discriminator r,
int condOp)
l - The left Discriminator.r - The right Discriminator.int - A constant that specifies the conditional operator to use for this composite.| Method Detail |
public java.lang.Object clone()
CompositeDiscriminator.clone in interface DiscriminatorCompositeDiscriminator.public int getCondOperator()
CompositeDiscriminator.CompositeDiscriminator uses to compare the two base discriminators.AND, OR, NOTpublic void setCondOperator(int condOp)
CompositeDiscriminator.condOp - A constant that represents the conditional operator that CompositeDiscriminator uses to compare the two base discriminators. Valid constants are listed in the See Also section.AND, OR, NOTpublic Discriminator getLeft()
Descriminator.Discriminator that is the left operand in the composite condition.public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic void setLeft(Discriminator discriminator)
Discriminator.The - Discriminator to use as the left operand in the composite condition.public Discriminator getRight()
Descriminator.Discriminator that is the right operand in the composite condition.public void setRight(Discriminator discriminator)
Discriminator.The - Discriminator to use as the right operand in the composite condition.public boolean applies(RuleContext context)
RuleContext. This method passes the RuleContext to the applies method of each base Discriminator and evaluates the resulting conditional expression.applies in interface Discriminatorcontext - The context of the item to be painted.true if the RuleContext meets the complex condition in this CompositeDiscriminator, false if not.
public boolean setXML( node,
ComponentTypeConverter converter,
java.lang.String version,
int reset)
Discriminator.setXML in interface DiscriminatorXMLnode - ObjectNode that has the properties and their values.converter - A converter that converts component strings to integers and integers to strings.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.true if XML is properly applied, false if the XML cannot be applied.Rule.RESET_NONE, Rule.RESET_XML_PROPERTIES, Rule.RESET_EVERYTHING
public getXML(boolean allProperties,
ComponentTypeConverter converter,
boolean emptyElement)
ObjectNode.getXML in interface DiscriminatorXMLallProperties - true to store all property values in XML, false to store only values that are different from default values.converter - A converter that converts component strings to integers and integers to strings.emptyElement - true if an empty element needs to be returned when none of the property values have changed from default. false if null should should be returned when none of the property values have changed from default. This argument is considered only if allProperties is false.
|
Oracle™ Business Intelligence Beans Java API Reference | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||